From: Jeremy Allison Date: Mon, 13 Sep 2004 08:04:04 +0000 (+0000) Subject: r2312: Fix for bugid #1667, smbpasswd file could be left locked on X-Git-Tag: samba-4.0.0alpha6~801^2~11238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92c1eba403a1f9d1f2b8dce094fbcc86aa7e8c07;p=thirdparty%2Fsamba.git r2312: Fix for bugid #1667, smbpasswd file could be left locked on some error exits. Jeremy. (This used to be commit e2b0b9fb72559a9629b116a7e063de08a12e9eb1) --- diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 6ebac1c01a5..6bb90852685 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -898,6 +898,8 @@ static BOOL mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con } else { DEBUG(0,("mod_smbfilepwd_entry: Using old smbpasswd format. This is no longer supported.!\n")); DEBUG(0,("mod_smbfilepwd_entry: No changes made, failing.!\n")); + pw_file_unlock(lockfd, &(smbpasswd_state->pw_file_lock_depth)); + fclose(fp); return False; }