-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 37830 b: refs/heads/master c: 4865ecf h: refs/heads/master v: v3
- Loading branch information
Serge E. Hallyn
authored and
Linus Torvalds
committed
Oct 2, 2006
1 parent
947b6da
commit 563c0f9
Showing
10 changed files
with
122 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 96b644bdec977b97a45133e5b4466ba47a7a5e65 | ||
refs/heads/master: 4865ecf1315b450ab3317a745a6678c04d311e40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (C) 2004 IBM Corporation | ||
* | ||
* Author: Serge Hallyn <serue@us.ibm.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
* published by the Free Software Foundation, version 2 of the | ||
* License. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include <linux/uts.h> | ||
#include <linux/utsname.h> | ||
#include <linux/version.h> | ||
|
||
/* | ||
* Copy task tsk's utsname namespace, or clone it if flags | ||
* specifies CLONE_NEWUTS. In latter case, changes to the | ||
* utsname of this process won't be seen by parent, and vice | ||
* versa. | ||
*/ | ||
int copy_utsname(int flags, struct task_struct *tsk) | ||
{ | ||
struct uts_namespace *old_ns = tsk->nsproxy->uts_ns; | ||
int err = 0; | ||
|
||
if (!old_ns) | ||
return 0; | ||
|
||
get_uts_ns(old_ns); | ||
|
||
return err; | ||
} | ||
|
||
void free_uts_ns(struct kref *kref) | ||
{ | ||
struct uts_namespace *ns; | ||
|
||
ns = container_of(kref, struct uts_namespace, kref); | ||
kfree(ns); | ||
} |