History log of /freebsd-10-stable/usr.sbin/pw/pw_conf.c
Revision Date Author Comments
# 326849 14-Dec-2017 eugen

MFC r326738: pw(8): correct expiration period handling
and command line overrides to preconfigured values for -e, -p and -w flags.

Use non-negative symbols instead of magic values
in passwd_val/pw_password functions.

PR: 223431
Submitted by: Yuri Pankov (in part, patch for the manual)
Approved by: mav (mentor)
Relnotes: yes


# 305750 12-Sep-2016 asomers

MFC r302778

pw should sanitize the argument of -w.

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.


# 292965 30-Dec-2015 bapt

MFC: r292846, r292847, r292849

Restore dryrun support for pw groupmod
Remove useless assignement of linelen
Simplify code for parsing extra groups


# 287084 23-Aug-2015 bapt

MFC: r285133,r285136,r285137,r285156,r285157,r285158,r285256,r285318,r285395,
r285396,r285398,r285401,r285403,r285405,r285406,r285408,r285409,r285411,
r285412,r285413,r285415,r285418,r285430,r285433,r285434,r285442,r285948,
r285984,r285985,r285989,r285996,r285997,r286045,r286047,r286066,r286150,
r286151,r286152,r286154,r286155,r286156,r286157,r286173,r286196,r286197,
r286198,r286199,r286200,r286201,r286202,r286203,r286204,r286210,r286211,
r286217,r286218,r286258,r286259,r286341,r286775,r286982,r286986,r286991,
r286993

Validate most pw inputs.
Rewrite the way parsing sub arguments is made to simplify code and improve
maintenability
Add -y (NIS) to userdel/usermod
pw userdel -r <rootdir> now deletes directories in the rootdir
Only parse pw.conf when needed
Reject usermod and userdel if the user concerned is not on the user database
supposed to be manipulated


# 285092 03-Jul-2015 bapt

MFC: r274011,r274022,r274453,r274542,r274632,r274727,r275653,r275656,r275657,
r275658,r275829,r277652,r277764,r278475,r278767,r278819,r278902,r279256,
r282681,r282683,r282685,r282686,r282687,r282697,r282698,r282699,r282700,
r282709,r282712,r282713,r282716,r282718,r282719,r282720,r282721,r283809,
r283810,r283811,r283814,r283815,r283816,r283818,r283841,r283842,r283843,
r283961,r283962,r284110,r284111,r284112,r284113,r284114,r284117,r284118,
r284119,r284120,r284121,r284122,r284123,r284124,r284126,r284128,r284129,
r284130,r284133,r284135,r284137,r284139,r284140,r284148,r284149,r284392

Lots of cleanup in the pw(8) code
Add pw -R <rootdir>
Add lots of regression tests
More accurate error messages

Approved by: re (kib)
Sponsored by: gandi.net


# 268346 06-Jul-2014 bapt

MFH: r264781, r267669, r267670

Simplify reading pw.conf(5) by using getline(3)

Removed compatibility with pre FreeBSD 2.2 pw_mkdb command [1]
Fix some broken indentattion [1]

Fix changing the username [2]

PR: 189172 [1], 189173 [2]
Submitted by: fullermd@over-yonder.net [1][2]


# 287084 23-Aug-2015 bapt

MFC: r285133,r285136,r285137,r285156,r285157,r285158,r285256,r285318,r285395,
r285396,r285398,r285401,r285403,r285405,r285406,r285408,r285409,r285411,
r285412,r285413,r285415,r285418,r285430,r285433,r285434,r285442,r285948,
r285984,r285985,r285989,r285996,r285997,r286045,r286047,r286066,r286150,
r286151,r286152,r286154,r286155,r286156,r286157,r286173,r286196,r286197,
r286198,r286199,r286200,r286201,r286202,r286203,r286204,r286210,r286211,
r286217,r286218,r286258,r286259,r286341,r286775,r286982,r286986,r286991,
r286993

Validate most pw inputs.
Rewrite the way parsing sub arguments is made to simplify code and improve
maintenability
Add -y (NIS) to userdel/usermod
pw userdel -r <rootdir> now deletes directories in the rootdir
Only parse pw.conf when needed
Reject usermod and userdel if the user concerned is not on the user database
supposed to be manipulated


# 285092 03-Jul-2015 bapt

MFC: r274011,r274022,r274453,r274542,r274632,r274727,r275653,r275656,r275657,
r275658,r275829,r277652,r277764,r278475,r278767,r278819,r278902,r279256,
r282681,r282683,r282685,r282686,r282687,r282697,r282698,r282699,r282700,
r282709,r282712,r282713,r282716,r282718,r282719,r282720,r282721,r283809,
r283810,r283811,r283814,r283815,r283816,r283818,r283841,r283842,r283843,
r283961,r283962,r284110,r284111,r284112,r284113,r284114,r284117,r284118,
r284119,r284120,r284121,r284122,r284123,r284124,r284126,r284128,r284129,
r284130,r284133,r284135,r284137,r284139,r284140,r284148,r284149,r284392

Lots of cleanup in the pw(8) code
Add pw -R <rootdir>
Add lots of regression tests
More accurate error messages

Approved by: re (kib)
Sponsored by: gandi.net


# 268346 06-Jul-2014 bapt

MFH: r264781, r267669, r267670

Simplify reading pw.conf(5) by using getline(3)

Removed compatibility with pre FreeBSD 2.2 pw_mkdb command [1]
Fix some broken indentattion [1]

Fix changing the username [2]

PR: 189172 [1], 189173 [2]
Submitted by: fullermd@over-yonder.net [1][2]