fixed VLAN setup: set the name-type, honor the 'ip' value and use the
[util-vserver.git] / util-vserver / lib / bcaps-v13.c
index a75f8cf..6f9f491 100644 (file)
 #include <linux/capability.h>
 
 #include <string.h>
+#include <strings.h>
 #include <assert.h>
 
-#ifndef CAP_QUOTACTL
-#  define CAP_QUOTACTL VC_CAP_QUOTACTL
+#define DECL(VAL) { #VAL, sizeof(#VAL)-1, 1 << (CAP_ ## VAL) }
+
+#ifndef CAP_AUDIT_WRITE
+#  define CAP_AUDIT_WRITE      29
 #endif
 
-#define DECL(VAL) { #VAL, sizeof(#VAL)-1, 1 << (CAP_ ## VAL) }
+#ifndef CAP_AUDIT_CONTROL
+#  define CAP_AUDIT_CONTROL    30
+#endif
 
 static struct Mapping_uint64 const VALUES[] = {
   DECL(CHOWN),
@@ -64,15 +69,16 @@ static struct Mapping_uint64 const VALUES[] = {
   DECL(SYS_TTY_CONFIG),
   DECL(MKNOD),
   DECL(LEASE),
-  DECL(QUOTACTL),
+  DECL(AUDIT_WRITE),
+  DECL(AUDIT_CONTROL),
 };
 
 inline static char const *
 removePrefix(char const *str, size_t *len)
 {
-  if ((len==0 || *len==0 || *len>=4) &&
+  if ((len==0 || *len==0 || *len>4) &&
       strncasecmp("cap_", str, 4)==0) {
-    if (len && *len>=4) *len -= 4;
+    if (len && *len>4) *len -= 4;
     return str+4;
   }
   else