Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond to...
[amitay/samba.git] / source3 / smbd / server.c
index 09ad8d8ea55af057d8fea68b266929d1c5b634d2..fb0efd2ae5202ed5315e3cd4b972e8783c89e6fb 100644 (file)
@@ -1047,6 +1047,14 @@ extern void build_options(bool screen);
        gain_root_privilege();
        gain_root_group_privilege();
 
+       /*
+        * Ensure we have CAP_KILL capability set on Linux,
+        * where we need this to communicate with threads.
+        * This is inherited by new threads, but not by new
+        * processes across exec().
+        */
+       set_effective_capability(KILL_CAPABILITY);
+
        fault_setup((void (*)(void *))exit_server_fault);
        dump_core_setup("smbd");