summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-01-14 13:17:38 -0800
committerJeremy Allison <jra@samba.org>2009-01-14 13:17:38 -0800
commitb3e6247a9eb27835a71d6b42b33b51a48f35b862 (patch)
tree0b0fba1c3a31a80bddeb2affa146b6e42366fa26 /source3/passdb
parente3ef19b9b9ae76c059ddff58324102c7de210f6d (diff)
downloadsamba-b3e6247a9eb27835a71d6b42b33b51a48f35b862.tar.gz
samba-b3e6247a9eb27835a71d6b42b33b51a48f35b862.tar.bz2
samba-b3e6247a9eb27835a71d6b42b33b51a48f35b862.zip
Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery.
Jeremy.
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_smbpasswd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index f72638bed5..b72e0f2cba 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -100,7 +100,7 @@ static bool do_file_lock(int fd, int waitsecs, int type)
alarm(0);
CatchSignal(SIGALRM, SIGNAL_CAST oldsig_handler);
- if (gotalarm) {
+ if (gotalarm && ret == -1) {
DEBUG(0, ("do_file_lock: failed to %s file.\n",
type == F_UNLCK ? "unlock" : "lock"));
return False;