diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2006-10-02 05:18:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:21 -0400 |
commit | e9ff3990f08e9a0c2839cc22808b01732ea5b3e4 (patch) | |
tree | c638a7b89f0c5e8adc410316d06ca1de8b8dabee /net/ipv4 | |
parent | 0bdd7aab7f0ecd5d337910816aa058c18398628e (diff) |
[PATCH] namespaces: utsname: switch to using uts namespaces
Replace references to system_utsname to the per-process uts namespace
where appropriate. This includes things like uname.
Changes: Per Eric Biederman's comments, use the per-process uts namespace
for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c
[jdike@addtoit.com: UML fix]
[clg@fr.ibm.com: cleanup]
[akpm@osdl.org: build fix]
Signed-off-by: Serge E. 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: Cedric Le Goater <clg@fr.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipconfig.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 1fbb38415b19..99d50065aa79 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -805,7 +805,7 @@ static void __init ic_do_bootp_ext(u8 *ext) | |||
805 | } | 805 | } |
806 | break; | 806 | break; |
807 | case 12: /* Host name */ | 807 | case 12: /* Host name */ |
808 | ic_bootp_string(system_utsname.nodename, ext+1, *ext, __NEW_UTS_LEN); | 808 | ic_bootp_string(utsname()->nodename, ext+1, *ext, __NEW_UTS_LEN); |
809 | ic_host_name_set = 1; | 809 | ic_host_name_set = 1; |
810 | break; | 810 | break; |
811 | case 15: /* Domain name (DNS) */ | 811 | case 15: /* Domain name (DNS) */ |
@@ -816,7 +816,7 @@ static void __init ic_do_bootp_ext(u8 *ext) | |||
816 | ic_bootp_string(root_server_path, ext+1, *ext, sizeof(root_server_path)); | 816 | ic_bootp_string(root_server_path, ext+1, *ext, sizeof(root_server_path)); |
817 | break; | 817 | break; |
818 | case 40: /* NIS Domain name (_not_ DNS) */ | 818 | case 40: /* NIS Domain name (_not_ DNS) */ |
819 | ic_bootp_string(system_utsname.domainname, ext+1, *ext, __NEW_UTS_LEN); | 819 | ic_bootp_string(utsname()->domainname, ext+1, *ext, __NEW_UTS_LEN); |
820 | break; | 820 | break; |
821 | } | 821 | } |
822 | } | 822 | } |
@@ -1368,7 +1368,7 @@ static int __init ip_auto_config(void) | |||
1368 | printk(", mask=%u.%u.%u.%u", NIPQUAD(ic_netmask)); | 1368 | printk(", mask=%u.%u.%u.%u", NIPQUAD(ic_netmask)); |
1369 | printk(", gw=%u.%u.%u.%u", NIPQUAD(ic_gateway)); | 1369 | printk(", gw=%u.%u.%u.%u", NIPQUAD(ic_gateway)); |
1370 | printk(",\n host=%s, domain=%s, nis-domain=%s", | 1370 | printk(",\n host=%s, domain=%s, nis-domain=%s", |
1371 | system_utsname.nodename, ic_domain, system_utsname.domainname); | 1371 | utsname()->nodename, ic_domain, utsname()->domainname); |
1372 | printk(",\n bootserver=%u.%u.%u.%u", NIPQUAD(ic_servaddr)); | 1372 | printk(",\n bootserver=%u.%u.%u.%u", NIPQUAD(ic_servaddr)); |
1373 | printk(", rootserver=%u.%u.%u.%u", NIPQUAD(root_server_addr)); | 1373 | printk(", rootserver=%u.%u.%u.%u", NIPQUAD(root_server_addr)); |
1374 | printk(", rootpath=%s", root_server_path); | 1374 | printk(", rootpath=%s", root_server_path); |
@@ -1478,11 +1478,11 @@ static int __init ip_auto_config_setup(char *addrs) | |||
1478 | case 4: | 1478 | case 4: |
1479 | if ((dp = strchr(ip, '.'))) { | 1479 | if ((dp = strchr(ip, '.'))) { |
1480 | *dp++ = '\0'; | 1480 | *dp++ = '\0'; |
1481 | strlcpy(system_utsname.domainname, dp, | 1481 | strlcpy(utsname()->domainname, dp, |
1482 | sizeof(system_utsname.domainname)); | 1482 | sizeof(utsname()->domainname)); |
1483 | } | 1483 | } |
1484 | strlcpy(system_utsname.nodename, ip, | 1484 | strlcpy(utsname()->nodename, ip, |
1485 | sizeof(system_utsname.nodename)); | 1485 | sizeof(utsname()->nodename)); |
1486 | ic_host_name_set = 1; | 1486 | ic_host_name_set = 1; |
1487 | break; | 1487 | break; |
1488 | case 5: | 1488 | case 5: |