aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorSerge E. Hallyn <serue@us.ibm.com>2006-10-02 05:18:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-02 10:57:21 -0400
commit4865ecf1315b450ab3317a745a6678c04d311e40 (patch)
tree6cf5d3028f8642eba2a8094eb413db080cc9219c /init
parent96b644bdec977b97a45133e5b4466ba47a7a5e65 (diff)
[PATCH] namespaces: utsname: implement utsname namespaces
This patch defines the uts namespace and some manipulators. Adds the uts namespace to task_struct, and initializes a system-wide init namespace. It leaves a #define for system_utsname so sysctl will compile. This define will be removed in a separate patch. [akpm@osdl.org: build fix, cleanup] Signed-off-by: Serge Hallyn <serue@us.ibm.com> Cc: Kirill Korotaev <dev@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Andrey Savochkin <saw@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig8
-rw-r--r--init/version.c23
2 files changed, 22 insertions, 9 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f7a04d0daf07..b0ea97554473 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -182,6 +182,14 @@ config TASK_DELAY_ACCT
182 182
183 Say N if unsure. 183 Say N if unsure.
184 184
185config UTS_NS
186 bool "UTS Namespaces"
187 default n
188 help
189 Support uts namespaces. This allows containers, i.e.
190 vservers, to use uts namespaces to provide different
191 uts info for different servers. If unsure, say N.
192
185config AUDIT 193config AUDIT
186 bool "Auditing support" 194 bool "Auditing support"
187 depends on NET 195 depends on NET
diff --git a/init/version.c b/init/version.c
index e290802c6bd2..8f28344d9c70 100644
--- a/init/version.c
+++ b/init/version.c
@@ -12,22 +12,27 @@
12#include <linux/utsname.h> 12#include <linux/utsname.h>
13#include <linux/utsrelease.h> 13#include <linux/utsrelease.h>
14#include <linux/version.h> 14#include <linux/version.h>
15#include <linux/sched.h>
15 16
16#define version(a) Version_ ## a 17#define version(a) Version_ ## a
17#define version_string(a) version(a) 18#define version_string(a) version(a)
18 19
19int version_string(LINUX_VERSION_CODE); 20int version_string(LINUX_VERSION_CODE);
20 21
21struct new_utsname system_utsname = { 22struct uts_namespace init_uts_ns = {
22 .sysname = UTS_SYSNAME, 23 .kref = {
23 .nodename = UTS_NODENAME, 24 .refcount = ATOMIC_INIT(2),
24 .release = UTS_RELEASE, 25 },
25 .version = UTS_VERSION, 26 .name = {
26 .machine = UTS_MACHINE, 27 .sysname = UTS_SYSNAME,
27 .domainname = UTS_DOMAINNAME, 28 .nodename = UTS_NODENAME,
29 .release = UTS_RELEASE,
30 .version = UTS_VERSION,
31 .machine = UTS_MACHINE,
32 .domainname = UTS_DOMAINNAME,
33 },
28}; 34};
29 35EXPORT_SYMBOL_GPL(init_uts_ns);
30EXPORT_SYMBOL(system_utsname);
31 36
32const char linux_banner[] = 37const char linux_banner[] =
33 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" 38 "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"