s3: Add DAC_OVERRIDE capability support
authorAbhidnya Joshi <achirmul@in.ibm.com>
Tue, 10 Dec 2013 08:10:21 +0000 (09:10 +0100)
committerChristof Schmitt <cs@samba.org>
Mon, 16 Dec 2013 17:11:03 +0000 (10:11 -0700)
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
source3/include/smb.h
source3/lib/system.c

index 16aef875ea24732f854e20958d3cd9b1380355ea..9fe0533b97037d03ea11a104e8a7c04d10377aaf 100644 (file)
@@ -743,7 +743,8 @@ minimum length == 24.
 enum smbd_capability {
     KERNEL_OPLOCK_CAPABILITY,
     DMAPI_ACCESS_CAPABILITY,
-    LEASE_CAPABILITY
+    LEASE_CAPABILITY,
+    DAC_OVERRIDE_CAPABILITY
 };
 
 /*
index f2512908b052bff24554f6274dffb50ccd36df15..af72b2a8d3883a13acd81af05622ddcd0c02e33c 100644 (file)
@@ -785,6 +785,10 @@ static bool set_process_capability(enum smbd_capability capability,
                        cap_vals[num_cap_vals++] = CAP_LEASE;
 #endif
                        break;
+               case DAC_OVERRIDE_CAPABILITY:
+#ifdef CAP_DAC_OVERRIDE
+                       cap_vals[num_cap_vals++] = CAP_DAC_OVERRIDE;
+#endif
        }
 
        SMB_ASSERT(num_cap_vals <= ARRAY_SIZE(cap_vals));