summaryrefslogtreecommitdiffstats
path: root/pw/tests/pw_useradd_test.sh
Commit message (Collapse)AuthorAgeFilesLines
* New Makefile, freebsd reallocarray.c, freebsd strtonum for 12/13 compat, ↵Cameron Katri2021-02-101-497/+0
| | | | delete tests
* pw: fix the checks in boolean_str() after r326738. Add related testYuri Pankov2018-10-211-0/+22
| | | | | | | | | cases for `pw useradd -D -w`. PR: 231649 Reviewed by: eugen Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D17299
* Allow the "@" and "!" characters in passwd file GECOS fields.David Bright2018-03-011-3/+3
| | | | | | | | | | | | | | | | Two PRs (152084 & 210187) request allowing the "@" and/or "!" characters in the passwd file GECOS field. The man page for pw does not mention that those characters are disallowed, Linux supports those characters in this field, and the "@" character in particular would be useful for storing email addresses in that field. PR: 152084, 210187 Submitted by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org> Reported by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org> Reviewed by: delphij (secteam), vangyzen MFC after: 1 week Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D14519
* pw useradd: Validate the user name before creating the entryEd Maste2017-08-191-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previouly it was possible to create users with spaces in the name with: pw useradd -u 1234 -g 1234 -n 'test user' The "-g 1234" is relevant, without it the name was already rejected as expected: [fk@test ~]$ sudo pw useradd -u 1234 -n 'test user' pw: invalid character ` ' at position 4 in userid/group name Bug unintentionally found with a salt config without explicit name entry: test user: user.present: - uid: 1234 - gid: 1234 - fullname: Test user - shell: /usr/local/bin/bash - home: /home/test - groups: - wheel - salt "Luckily" salt modules rarely bother with input validation either ... PR: 221416 Submitted by: Fabian Keil Obtained from: ElectroBSD MFC after: 1 week
* Add a regression test for r31512 fixBaptiste Daroussin2017-03-251-0/+14
| | | | | PR: 217934 MFC after: 1 week
* Rename tests from <foo> to <foo>_test to match the FreeBSD test suiteEnji Cooper2017-03-231-0/+422
naming scheme usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test to avoid collisions with the renamed FreeBSD test. MFC after: 1 week Sponsored by: Dell EMC Isilon