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 /arch/powerpc/kernel/syscalls.c | |
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 'arch/powerpc/kernel/syscalls.c')
-rw-r--r-- | arch/powerpc/kernel/syscalls.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index 9b69d99a9103..d358866b880f 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c | |||
@@ -260,7 +260,7 @@ long ppc_newuname(struct new_utsname __user * name) | |||
260 | int err = 0; | 260 | int err = 0; |
261 | 261 | ||
262 | down_read(&uts_sem); | 262 | down_read(&uts_sem); |
263 | if (copy_to_user(name, &system_utsname, sizeof(*name))) | 263 | if (copy_to_user(name, utsname(), sizeof(*name))) |
264 | err = -EFAULT; | 264 | err = -EFAULT; |
265 | up_read(&uts_sem); | 265 | up_read(&uts_sem); |
266 | if (!err) | 266 | if (!err) |
@@ -273,7 +273,7 @@ int sys_uname(struct old_utsname __user *name) | |||
273 | int err = 0; | 273 | int err = 0; |
274 | 274 | ||
275 | down_read(&uts_sem); | 275 | down_read(&uts_sem); |
276 | if (copy_to_user(name, &system_utsname, sizeof(*name))) | 276 | if (copy_to_user(name, utsname(), sizeof(*name))) |
277 | err = -EFAULT; | 277 | err = -EFAULT; |
278 | up_read(&uts_sem); | 278 | up_read(&uts_sem); |
279 | if (!err) | 279 | if (!err) |
@@ -289,19 +289,19 @@ int sys_olduname(struct oldold_utsname __user *name) | |||
289 | return -EFAULT; | 289 | return -EFAULT; |
290 | 290 | ||
291 | down_read(&uts_sem); | 291 | down_read(&uts_sem); |
292 | error = __copy_to_user(&name->sysname, &system_utsname.sysname, | 292 | error = __copy_to_user(&name->sysname, &utsname()->sysname, |
293 | __OLD_UTS_LEN); | 293 | __OLD_UTS_LEN); |
294 | error |= __put_user(0, name->sysname + __OLD_UTS_LEN); | 294 | error |= __put_user(0, name->sysname + __OLD_UTS_LEN); |
295 | error |= __copy_to_user(&name->nodename, &system_utsname.nodename, | 295 | error |= __copy_to_user(&name->nodename, &utsname()->nodename, |
296 | __OLD_UTS_LEN); | 296 | __OLD_UTS_LEN); |
297 | error |= __put_user(0, name->nodename + __OLD_UTS_LEN); | 297 | error |= __put_user(0, name->nodename + __OLD_UTS_LEN); |
298 | error |= __copy_to_user(&name->release, &system_utsname.release, | 298 | error |= __copy_to_user(&name->release, &utsname()->release, |
299 | __OLD_UTS_LEN); | 299 | __OLD_UTS_LEN); |
300 | error |= __put_user(0, name->release + __OLD_UTS_LEN); | 300 | error |= __put_user(0, name->release + __OLD_UTS_LEN); |
301 | error |= __copy_to_user(&name->version, &system_utsname.version, | 301 | error |= __copy_to_user(&name->version, &utsname()->version, |
302 | __OLD_UTS_LEN); | 302 | __OLD_UTS_LEN); |
303 | error |= __put_user(0, name->version + __OLD_UTS_LEN); | 303 | error |= __put_user(0, name->version + __OLD_UTS_LEN); |
304 | error |= __copy_to_user(&name->machine, &system_utsname.machine, | 304 | error |= __copy_to_user(&name->machine, &utsname()->machine, |
305 | __OLD_UTS_LEN); | 305 | __OLD_UTS_LEN); |
306 | error |= override_machine(name->machine); | 306 | error |= override_machine(name->machine); |
307 | up_read(&uts_sem); | 307 | up_read(&uts_sem); |