From f58761eaddf67fc32b33351a73ff06d386c738ba Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 28 Sep 1998 23:10:08 +0000 Subject: Added fix from gildea@intouchsys.com - smbpasswd file could be left locked. Jeremy. (This used to be commit 71ab5c367cf54f4b821aaf056f283f48d7eb4638) --- source3/passdb/smbpass.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c index d2a69ee9a6..0347df4ee9 100644 --- a/source3/passdb/smbpass.c +++ b/source3/passdb/smbpass.c @@ -684,7 +684,11 @@ static BOOL mod_smbfilepwd_entry(struct smb_passwd* pwd, BOOL override) } } - if (!found_entry) return False; + if (!found_entry) { + pw_file_unlock(lockfd, &pw_file_lock_depth); + fclose(fp); + return False; + } DEBUG(6, ("mod_smbfilepwd_entry: entry exists\n")); -- cgit