Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=32df81cbd5b41d281cc3d7e7ff6a98ac6201e197
Commit:     32df81cbd5b41d281cc3d7e7ff6a98ac6201e197
Parent:     48986f06b6bc6f435debcfad0a748ce35f0a52df
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 28 16:21:38 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Nov 29 09:24:53 2007 -0800

    Isolate the UTS namespace's domainname and hostname back
    
    Commit 7d69a1f4a72b18876c99c697692b78339d491568 ("remove CONFIG_UTS_NS
    and CONFIG_IPC_NS") by Cedric Le Goater accidentally removed the code
    that prevented the uts->hostname and uts->domainname values from being
    overwritten from another namespace.
    
    In other words, setting hostname/domainname via sysfs (echo xxx >
    /proc/sys/kernel/(host|domain)name) cased the new value to be set in
    init UTS namespace only.
    
    Return the isolation back.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Acked-by: Cedric Le Goater <[EMAIL PROTECTED]>
    Acked-by: Serge Hallyn <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/utsname_sysctl.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index c76c064..fe3a56c 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -18,6 +18,10 @@
 static void *get_uts(ctl_table *table, int write)
 {
        char *which = table->data;
+       struct uts_namespace *uts_ns;
+
+       uts_ns = current->nsproxy->uts_ns;
+       which = (which - (char *)&init_uts_ns) + (char *)uts_ns;
 
        if (!write)
                down_read(&uts_sem);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to