From b3e6247a9eb27835a71d6b42b33b51a48f35b862 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 14 Jan 2009 13:17:38 -0800 Subject: Fix bug #6035 - Possible race between fcntl F_SETLKW and alarm delivery. Jeremy. --- source3/passdb/pdb_smbpasswd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/passdb') 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; -- cgit