From: Daniel Hokka Zakrisson Date: Thu, 23 Nov 2006 21:30:01 +0000 (+0000) Subject: Use CLONE_NEWUTS|CLONE_NEWIPC so it works with 2.6.19. X-Git-Tag: release-0.30.212~28 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f043732c06b99e98740f32a949663a384ee404b;hp=f5dbe45b60edf550f856188fa9e837a34d43a2e6;p=util-vserver.git Use CLONE_NEWUTS|CLONE_NEWIPC so it works with 2.6.19. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2395 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/src/vnamespace.c b/src/vnamespace.c index 628dbe2..aa42d19 100644 --- a/src/vnamespace.c +++ b/src/vnamespace.c @@ -36,6 +36,13 @@ #define ENSC_WRAPPERS_VSERVER 1 #include +#ifndef CLONE_NEWUTS +# define CLONE_NEWUTS 0x04000000 +#endif +#ifndef CLONE_NEWIPC +# define CLONE_NEWIPC 0x08000000 +#endif + #define CMD_HELP 0x1000 #define CMD_VERSION 0x1001 @@ -95,9 +102,9 @@ newNamespace(char const *cmd) signal(SIGCHLD, SIG_DFL); #ifdef NDEBUG - pid = sys_clone(CLONE_NEWNS|CLONE_VFORK|SIGCHLD, 0); + pid = sys_clone(CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_VFORK|SIGCHLD, 0); #else - pid = sys_clone(CLONE_NEWNS|SIGCHLD, 0); + pid = sys_clone(CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWIPC|SIGCHLD, 0); #endif switch (pid) {