summaryrefslogtreecommitdiffstats
path: root/usr/local/www/themes/pfsense
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-03-18 17:48:36 +0545
committerPhil Davis <phil.davis@inf.org>2015-03-18 17:48:36 +0545
commit926e0a2fca6ae143665d18482cc62dac23c814b6 (patch)
treee4e1d049b619e44d428f92d2c5ce87465911f566 /usr/local/www/themes/pfsense
parente554970781bf8745dfc672e1ce496d10c22e7389 (diff)
downloadpfsense-926e0a2fca6ae143665d18482cc62dac23c814b6.zip
pfsense-926e0a2fca6ae143665d18482cc62dac23c814b6.tar.gz
Cleanup code path when adding a new user
1) Only attempt to delete the oldusername if it actually was non-empty - at the moment errors are logged in the system log when adding a new user, because the code was trying to delete the user name "". 2) Call local_user_set() first to create (change, whatever) the user record. This makes the user record exist for a new user. Then call local_user_set_groups() to sort out what groups the user should be in or not in. The existing code would fail to add a new user to the specified group/s because local_user_set_groups() was called too early, before the user actually existed. Typical system log errors from the old code: Mar 18 17:10:31 php-fpm[9542]: /system_usermanager.php: Tried to remove user but got user pw instead. Bailing. Mar 18 17:10:31 php-fpm[9542]: /system_usermanager.php: The command '/usr/sbin/pw groupmod admins -g 1999 -M '0,2003,2006,2008' 2>&1' returned exit code '67', the output was 'pw: user `2008' does not exist' From looking at the code history, I think this has been this way for a long time, not a new bug at all. Discussed in forum: https://forum.pfsense.org/index.php?topic=90700.msg501766#msg501766
Diffstat (limited to 'usr/local/www/themes/pfsense')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud