summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-12-13 23:12:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-12-13 23:12:26 +0000
commit8ef1f1b171407cfa4b9bdbba61f92944a13b1e87 (patch)
tree8c0df183538a21ce59839a591e8a3c12d8898004
parent9bb3e055fbcd765efcccc51186ab67e580e8fc25 (diff)
downloadpfsense-8ef1f1b171407cfa4b9bdbba61f92944a13b1e87.zip
pfsense-8ef1f1b171407cfa4b9bdbba61f92944a13b1e87.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.
-rw-r--r--etc/inc/pfsense-utils.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index c598e98..7e0e29b 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2513,6 +2513,9 @@ function sync_webgui_passwords() {
return 1;
}
+ 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 */
OpenPOWER on IntegriCloud