summaryrefslogtreecommitdiffstats
path: root/source/smbd/server.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-01-28 14:55:32 -0800
committerKarolin Seeger <kseeger@samba.org>2010-02-24 16:25:09 +0100
commit153357b9bb4d70a168c81cb9ff2da437eae823fc (patch)
tree80eac239dafe445a0518458f010546303bf751f2 /source/smbd/server.c
parent7d9b391ed61a01dfe189dd91a2531c4e2a9a901f (diff)
downloadsamba-153357b9bb4d70a168c81cb9ff2da437eae823fc.tar.gz
samba-153357b9bb4d70a168c81cb9ff2da437eae823fc.tar.xz
samba-153357b9bb4d70a168c81cb9ff2da437eae823fc.zip
Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond to a read or write.
Only works on Linux kernels 2.6.26 and above. Grants CAP_KILL capability to allow Linux threads under different euids to send signals to each other. Same as mater commit 899bd0005f56dcc1e95c3988d41ab3f628bb15db. Jeremy. (cherry picked from commit cbf09baa90f5c4cfa8a0019ccc79211d72d13629)
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r--source/smbd/server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 51294847307..23c8c12a625 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -1240,6 +1240,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");