remove CAP_OPENDEV
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 30 Oct 2003 00:36:39 +0000 (00:36 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 30 Oct 2003 00:36:39 +0000 (00:36 +0000)
added CAP_QUOTACTL

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@305 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/chcontext.c
util-vserver/src/reducecap.c

index 21a8a15..5e4fc1b 100644 (file)
 #include "linuxcaps.h"
 #include "vserver.h"
 
+#ifndef CAP_QUOTACTL
+#  define CAP_QUOTACTL 29
+#endif
+
 static void usage()
 {
        fprintf (stderr,"chcontext version %s\n",VERSION);
@@ -132,7 +136,8 @@ int main (int argc, char *argv[])
                |(1<<CAP_SYS_NICE)
                |(1<<CAP_SYS_RESOURCE)
                |(1<<CAP_SYS_TIME)
-               |(1<<CAP_MKNOD);
+               |(1<<CAP_MKNOD)
+               |(1<<CAP_QUOTACTL);
        const char *hostname=NULL, *domainname=NULL;
 
        for (i=1; i<argc; i++){
@@ -209,6 +214,7 @@ int main (int argc, char *argv[])
                                {"CAP_SYS_RESOURCE",CAP_SYS_RESOURCE},
                                {"CAP_SYS_TIME",        CAP_SYS_TIME},
                                {"CAP_MKNOD",           CAP_MKNOD},
+                               {"CAP_QUOTACTL",        CAP_QUOTACTL},
                                {NULL,0}
                        };
                        int j;
index 0f02813..7124b11 100644 (file)
 #include "linuxcaps.h"
 #include "vserver.h"
 
+#ifndef CAP_QUOTACTL
+#  define CAP_QUOTACTL 29
+#endif
+
 extern int capget (struct __user_cap_header_struct *, struct __user_cap_data_struct *);
 extern int capset (struct __user_cap_header_struct *, struct __user_cap_data_struct *);
 
@@ -73,7 +77,7 @@ static void reducecap_print(struct __user_cap_data_struct *user)
                "CAP_SYS_TTY_CONFIG",
                "CAP_MKNOD",
                "CAP_LEASE",
-               "CAP_OPENDEV",
+               "CAP_QUOTACTL",
                NULL
        };
        int i;
@@ -124,7 +128,8 @@ int main (int argc, char *argv[])
                |(1<<CAP_SYS_NICE)
                |(1<<CAP_SYS_RESOURCE)
                |(1<<CAP_SYS_TIME)
-               |(1<<CAP_MKNOD);
+               |(1<<CAP_MKNOD)
+               |(1<<CAP_QUOTACTL);
        int i;
        for (i=1; i<argc; i++){
                const char *arg = argv[i];
@@ -188,6 +193,7 @@ int main (int argc, char *argv[])
                                {"--SYS_RESOURCE",CAP_SYS_RESOURCE},
                                {"--SYS_TIME",  CAP_SYS_TIME},
                                {"--MKNOD",             CAP_MKNOD},
+                               {"--QUOTACTL",          CAP_QUOTACTL},
                                {NULL,0}
                        };
                        int j;