Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=78d832f62643ac6209beccbfb29228314423935e
Commit:     78d832f62643ac6209beccbfb29228314423935e
Parent:     62b3e920ed7612f318126f9c9b37c6a8dcd4199e
Author:     Serge E. Hallyn <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 26 21:32:22 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Mar 27 09:05:15 2007 -0700

    [PATCH] utsns: fix !CONFIG_UTS_NS behavior
    
    When CONFIG_UTS_NS=n, clone(CLONE_NEWUTS) quietly refuses.  So correctly 
does
    not unshare a new uts namespace, but also does not return -EINVAL.
    
    Fix this to return -EINVAL so the caller knows his request was denied.
    
    Signed-off-by: Serge E. Hallyn <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/utsname.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/utsname.h b/include/linux/utsname.h
index a4555fe..e10267d 100644
--- a/include/linux/utsname.h
+++ b/include/linux/utsname.h
@@ -70,6 +70,8 @@ static inline int unshare_utsname(unsigned long unshare_flags,
 
 static inline int copy_utsname(int flags, struct task_struct *tsk)
 {
+       if (flags & CLONE_NEWUTS)
+               return -EINVAL;
        return 0;
 }
 static inline void put_uts_ns(struct uts_namespace *ns)
-
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