summaryrefslogtreecommitdiffstats
path: root/pw/tests/pw_usermod.sh
Commit message (Collapse)AuthorAgeFilesLines
* Really restore the old behaviour for pw usermod -mBaptiste Daroussin2017-01-221-0/+21
| | | | | | | | It again reinstall missing skel files without overwriting changed one Add a regression test about it Reported by: ae MFC after: 3 days
* pw should sanitize the argument of -w.Alan Somers2016-07-131-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise, it will silently disable the login for the selected account if the argument is unrecognizable. usr.sbin/pw/pw.h usr.sbin/pw/pw_conf.c usr.sbin/pw/pw_user.c Use separate rules to validate boolean parameters and passwd parameters. Error out if a password parameter cannot be parsed. usr.sbin/pw/tests/Makefile usr.sbin/pw/tests/crypt.c usr.sbin/pw/tests/pw_useradd.sh usr.sbin/pw/tests/pw_usermod.sh Add tests for the validation. Also, enhance existing password-related tests to actually validate that the correct hash is written to master.passwd. Reviewed by: bapt MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6840
* Add regression tests for a bug reported in stable/10Baptiste Daroussin2015-08-051-0/+9
| | | | | While pw(8) on head is not affected it is worth adding more regression tests ensuring this bug will not happen unnoticed in the futur
* Rewrite parsing subcommands arguments of pw(8)Baptiste Daroussin2015-08-021-3/+46
| | | | | | | | | | | | | Now each subcommands checks its arguments in a dedicated functions. This helps improving input validation, code readability/maintainability While here: - Add a -y option to pw userdel/usermod so it can maintain NIS servers if nispasswd is not defined in pw.conf(5) - Allow pw -r <rootdir> to remove directory with userdel -r - Fix bug when renaming a user which was not renaming the user name it groups it is a member of. - Only parse pw.conf(5) when needed.
* Validate input of pw usermod -h and pwusermod -HBaptiste Daroussin2015-07-041-0/+37
| | | | | | | Push the code that set the password into a separate function to improve readability Add regression tests about pw usermod -h and pw usermod -H
* In case of rename validate the length of the new nameBaptiste Daroussin2015-06-071-3/+24
| | | | Check early that the new name fits MAXLOGNAME and store it in pwconf
* Add tests for pw -NBrad Davis2014-12-161-0/+56
| | | | | | PR: 150449 Submitted by: Robert O'Neil <oneil.rs@gmail.com> Approved by: will
* Add some tests for user modification. [1]Brad Davis2014-12-091-0/+56
Fix a missing test in the Makefile from my previous commit. PR: 195834 [1] Submitted by: Robert O'Neil <oneil.rs@gmail.com> Approved by: will