diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-08-03 17:54:35 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-08-03 17:54:35 +0000 |
commit | 659fa7f23bb28d316ec6c99a538ee74bc7ffc0a3 (patch) | |
tree | 31ce9604a21b27b3f88c50332251ea570136c817 /usr/local/www/wizards | |
parent | 5064cec7670cffa8efa3d7276ebf13c2c9d5e23c (diff) | |
download | pfsense-659fa7f23bb28d316ec6c99a538ee74bc7ffc0a3.zip pfsense-659fa7f23bb28d316ec6c99a538ee74bc7ffc0a3.tar.gz |
Cleanup authentication code. The basic auth method, the passwd, htpasswd
and pam backing functions have been removed. The basic auth method was
legacy code and the backing functions were redundant with no added value
that I could see. A simplified replacement backing function named
local_backed has been added that authenticates to the local configuration
info which should be identical to system pwdb credentials. Since the
htpassword file is no longer required, sync_webgui_passwords and its
wrapper function system_password_configure have been removed.
The local account management functions were renamed for consistency. A few
minor bugs related to setting local passwords have also been corrected.
Diffstat (limited to 'usr/local/www/wizards')
-rw-r--r-- | usr/local/www/wizards/setup_wizard.xml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml index e6b46bc..1cf882c 100644 --- a/usr/local/www/wizards/setup_wizard.xml +++ b/usr/local/www/wizards/setup_wizard.xml @@ -418,14 +418,10 @@ <stepsubmitphpaction> if($_POST['adminpassword'] != "") { if($_POST['adminpassword'] == $_POST['adminpasswordagain']) { - $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w"); - $salt = md5(time()); - $crypted_pw = crypt($_POST['adminpassword'],$salt); - fwrite($fd, $crypted_pw); - pclose($fd); - $config['system']['password'] = crypt($_POST['adminpassword']); + $admin_user =& getUserEntryByUID(0); + local_user_set_password($admin_user, $_POST['adminpassword']); + local_user_set($admin_user); write_config(); - system_password_configure(); } else { print_info_box_np("Passwords do not match! Please press back in your browser window and correct."); die; |