summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorDavid O'Neill <dmo@samba.org>2001-01-25 16:36:42 +0000
committerDavid O'Neill <dmo@samba.org>2001-01-25 16:36:42 +0000
commitfcfaebda7fb35989e62bc317287896c410c7833b (patch)
treed3c0d163236fa1946d7832664ee9dba0239e2b21 /source3/smbd
parent4f7b2b7083e4b4e6541633a5e2ffddb7989229a0 (diff)
downloadsamba-fcfaebda7fb35989e62bc317287896c410c7833b.tar.gz
samba-fcfaebda7fb35989e62bc317287896c410c7833b.tar.bz2
samba-fcfaebda7fb35989e62bc317287896c410c7833b.zip
Changes from APPLIANCE_HEAD:
source/smbd/server.c source/nmbd/nmbd.c - Fixed a very subtle bug with signals. Seems that POSIX requires that the signal mask be inhereted. So, if you happen to kick off smbd/nmbd from code that has the mask set on SIGUSR1, you lose messages. (This used to be commit b4c98196fc65e8b3bce928296e854987622eae78)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index c895972b0e..a13f34d506 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -651,6 +651,11 @@ static void usage(char *pname)
BlockSignals(True,SIGUSR2);
#endif
+ /* POSIX demands that signals are inherited. If the invoking process has
+ * these signals masked, we will have problems, as we won't recieve them. */
+ BlockSignals(False, SIGHUP);
+ BlockSignals(False, SIGUSR1);
+
/* we want total control over the permissions on created files,
so set our umask to 0 */
umask(0);