mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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. [[email protected]: build fix, cleanup] Signed-off-by: Serge Hallyn <[email protected]> Cc: Kirill Korotaev <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Herbert Poetzl <[email protected]> Cc: Andrey Savochkin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
96b644bdec
commit
4865ecf131
9 changed files with 121 additions and 12 deletions
|
|
@ -182,6 +182,14 @@ config TASK_DELAY_ACCT
|
|||
|
||||
Say N if unsure.
|
||||
|
||||
config UTS_NS
|
||||
bool "UTS Namespaces"
|
||||
default n
|
||||
help
|
||||
Support uts namespaces. This allows containers, i.e.
|
||||
vservers, to use uts namespaces to provide different
|
||||
uts info for different servers. If unsure, say N.
|
||||
|
||||
config AUDIT
|
||||
bool "Auditing support"
|
||||
depends on NET
|
||||
|
|
|
|||
|
|
@ -12,22 +12,27 @@
|
|||
#include <linux/utsname.h>
|
||||
#include <linux/utsrelease.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#define version(a) Version_ ## a
|
||||
#define version_string(a) version(a)
|
||||
|
||||
int version_string(LINUX_VERSION_CODE);
|
||||
|
||||
struct new_utsname system_utsname = {
|
||||
.sysname = UTS_SYSNAME,
|
||||
.nodename = UTS_NODENAME,
|
||||
.release = UTS_RELEASE,
|
||||
.version = UTS_VERSION,
|
||||
.machine = UTS_MACHINE,
|
||||
.domainname = UTS_DOMAINNAME,
|
||||
struct uts_namespace init_uts_ns = {
|
||||
.kref = {
|
||||
.refcount = ATOMIC_INIT(2),
|
||||
},
|
||||
.name = {
|
||||
.sysname = UTS_SYSNAME,
|
||||
.nodename = UTS_NODENAME,
|
||||
.release = UTS_RELEASE,
|
||||
.version = UTS_VERSION,
|
||||
.machine = UTS_MACHINE,
|
||||
.domainname = UTS_DOMAINNAME,
|
||||
},
|
||||
};
|
||||
|
||||
EXPORT_SYMBOL(system_utsname);
|
||||
EXPORT_SYMBOL_GPL(init_uts_ns);
|
||||
|
||||
const char linux_banner[] =
|
||||
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
|
||||
|
|
|
|||
Loading…
Reference in a new issue