summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-12-13 23:12:17 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-12-13 23:12:17 +0000
commit4882f3f07d9dc868a8308d22d9d7e60e781c4c75 (patch)
tree797689bc3d3c31c13d156e2476e18b8ac7838dec /etc
parente5cbd73039cf36fd19fce2606b794636fd3435f2 (diff)
downloadpfsense-4882f3f07d9dc868a8308d22d9d7e60e781c4c75.zip
pfsense-4882f3f07d9dc868a8308d22d9d7e60e781c4c75.tar.gz
If /etc/pwd.db.tmp exists when we are syncing the password database then remove the temporary file prior to attempting to sync.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 3271a4c..38228bd 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2412,6 +2412,8 @@ function sync_webgui_passwords() {
fclose($fd);
chmod("{$g['varrun_path']}/htpasswd", 0600);
$crypted_pw = $config['system']['password'];
+ if(file_exists("/etc/pwd.db.tmp"))
+ unlink("/etc/pwd.db.tmp");
mwexec("/usr/sbin/pwd_mkdb -d /etc -p /etc/master.passwd");
mwexec("/usr/sbin/pwd_mkdb -p /etc/master.passwd");
/* sync root */
@@ -3620,4 +3622,4 @@ function is_wan_interface_up($interface) {
return false;
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud