]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2312: Fix for bugid #1667, smbpasswd file could be left locked on
authorJeremy Allison <jra@samba.org>
Mon, 13 Sep 2004 08:04:04 +0000 (08:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:39 +0000 (10:52 -0500)
some error exits.
Jeremy.

source/passdb/pdb_smbpasswd.c

index 6ebac1c01a5a4b3f6d929c1a6ac9b27a50d5cdaa..6bb90852685ad74b5b8651bf28946d45f830752e 100644 (file)
@@ -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;
     }