lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Sep 2006 17:36:59 +0200
From:	Cedric Le Goater <clg@...ibm.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
CC:	Andrew Morton <akpm@...l.org>,
	"Serge E. Hallyn" <serue@...ibm.com>,
	Linux Containers <containers@...ts.osdl.org>
Subject: [patch -mm] utsname namespace : fix unshare when CONFIG_UTS_NS is
 not set

If the kernel is not configured with the CONFIG_UTS_NS, unshare of
ipc namespace will fail and return -EINVAL.

The patch changes the dummy unshare_utsname() to check the clone flags
before returning.

Signed-off-by: Cedric Le Goater <clg@...ibm.com>
Cc: Andrew Morton <akpm@...l.org>
Cc: Serge E. Hallyn <serue@...ibm.com>
Cc: Linux Containers <containers@...ts.osdl.org>

---
 include/linux/utsname.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: 2.6.18-rc6-mm2/include/linux/utsname.h
===================================================================
--- 2.6.18-rc6-mm2.orig/include/linux/utsname.h
+++ 2.6.18-rc6-mm2/include/linux/utsname.h
@@ -60,8 +60,12 @@ static inline void put_uts_ns(struct uts
 static inline int unshare_utsname(unsigned long unshare_flags,
 			struct uts_namespace **new_uts)
 {
-	return -EINVAL;
+	if (unshare_flags & CLONE_NEWUTS)
+		return -EINVAL;
+
+	return 0;
 }
+
 static inline int copy_utsname(int flags, struct task_struct *tsk)
 {
 	return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ