Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | pw should sanitize the argument of -w. | Alan Somers | 2016-07-13 | 1 | -1/+19 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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 | ||||
* | Simplify code for parsing extra groups | Baptiste Daroussin | 2015-12-29 | 1 | -1/+1 |
| | |||||
* | Use intmax_t rather than long long | Baptiste Daroussin | 2015-08-02 | 1 | -2/+2 |
| | |||||
* | Fix build on 32bits | Baptiste Daroussin | 2015-08-02 | 1 | -2/+2 |
| | |||||
* | Cleanup a bit includes | Baptiste Daroussin | 2015-08-02 | 1 | -4/+4 |
| | |||||
* | Rewrite parsing subcommands arguments of pw(8) | Baptiste Daroussin | 2015-08-02 | 1 | -31/+30 |
| | | | | | | | | | | | | | 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. | ||||
* | Remove things that crept in after badly checked revert | Baptiste Daroussin | 2015-08-01 | 1 | -2/+0 |
| | |||||
* | Partial revert of r286152 | Baptiste Daroussin | 2015-08-01 | 1 | -0/+2 |
| | | | | More work needed on the cli validation | ||||
* | Fix build | Baptiste Daroussin | 2015-08-01 | 1 | -0/+1 |
| | |||||
* | Fix formatting of new code | Baptiste Daroussin | 2015-08-01 | 1 | -20/+26 |
| | | | | | | | Fix sorting or errstr Remove useless initialisation or errstr Reported by: bde | ||||
* | Validate expiration days and password days from commmand line and pw.conf | Baptiste Daroussin | 2015-08-01 | 1 | -4/+12 |
| | |||||
* | Validate the max_uid/max_gid boundaries and entry type in pw.conf | Baptiste Daroussin | 2015-08-01 | 1 | -7/+23 |
| | |||||
* | Cast uid/git to uintmax_t when using printf-like functions so the size of | Baptiste Daroussin | 2015-08-01 | 1 | -4/+5 |
| | | | | uid/gid size remains a implementation detail | ||||
* | Replace custom string array with stringlist(3) | Baptiste Daroussin | 2015-07-11 | 1 | -15/+8 |
| | |||||
* | Remove useless cast in printf and printf-like functions: | Baptiste Daroussin | 2015-05-31 | 1 | -4/+4 |
| | | | | use %u for uid_t and gid_t | ||||
* | Move cleanup functions to the right place | Baptiste Daroussin | 2015-05-31 | 1 | -2/+3 |
| | |||||
* | Remove useless test before free() | Baptiste Daroussin | 2015-05-31 | 1 | -2/+1 |
| | |||||
* | Return early in case we cannot read the configuration file | Baptiste Daroussin | 2015-05-31 | 1 | -110/+111 |
| | | | | This drops one level of indentation | ||||
* | Use calloc(3) instead of malloc(3) + memset(3) | Baptiste Daroussin | 2015-05-10 | 1 | -2/+4 |
| | | | | While here check the return of calloc(3) | ||||
* | The initial logic for allocating the new string was wrong, the conversion | Baptiste Daroussin | 2015-05-10 | 1 | -5/+2 |
| | | | | | to strndup(3) duplicated the same mistake, actually strdup(3) is good enough to allocate the new string. | ||||
* | Use strndup(3) instead of malloc(3) + memcpy(3) | Baptiste Daroussin | 2015-05-10 | 1 | -7/+11 |
| | | | | Check the return of strndup | ||||
* | Remove useless call to extendarray | Baptiste Daroussin | 2015-05-10 | 1 | -1/+0 |
| | |||||
* | Remove now unused LNBUFSZ buffer size | Baptiste Daroussin | 2015-05-09 | 1 | -3/+0 |
| | |||||
* | Return from the function as early as possible | Baptiste Daroussin | 2015-05-09 | 1 | -117/+116 |
| | | | | This reduces the depth of the if statements and improves clarity of the code | ||||
* | Use sbuf(9) instead of homebrewed buffered string | Baptiste Daroussin | 2015-05-09 | 1 | -48/+46 |
| | |||||
* | Simplify reading pw.conf(5) by using getline(3) | Baptiste Daroussin | 2014-04-22 | 1 | -24/+11 |
| | |||||
* | Stop hard-coding default directory mode as 0777. | Jung-uk Kim | 2011-03-08 | 1 | -2/+2 |
| | |||||
* | Add home directory creation mode to pw.conf(5) and be a bit | Lukas Ertl | 2007-03-30 | 1 | -0/+15 |
| | | | | more specific about the effect of the current umask on -M. | ||||
* | Handle snprintf() returning < 0 (not just -1) | Brian Somers | 2001-08-20 | 1 | -2/+2 |
| | | | | MFC after: 2 weeks | ||||
* | Handle snprintf() returning -1. | Brian Somers | 2001-08-20 | 1 | -0/+4 |
| | | | | MFC after: 2 weeks | ||||
* | Make the comment generated in /etc/pw.conf match reality | Doug Barton | 2000-12-18 | 1 | -1/+1 |
| | | | | | PR: misc/23451 Submitted by: Ben Rosengart, ben@narcissus.net | ||||
* | Catch up to the fact that we now have tcsh in the tree. | David Nugent | 2000-07-16 | 1 | -1/+2 |
| | |||||
* | $Id$ -> $FreeBSD$ | Peter Wemm | 1999-08-28 | 1 | -1/+1 |
| | |||||
* | Remove some more warnings. | David Nugent | 1999-07-28 | 1 | -2/+3 |
| | |||||
* | 1) Do not blindly ignore file update errors which may occur due to concurrent | David Nugent | 1999-02-23 | 1 | -3/+2 |
| | | | | | | updating 2) Add -V <etcdir>, which allows maintaining user/group database in alternate locations other than /etc. | ||||
* | Use err(3) instead of local redefinition. Add rcsid string. | Philippe Charnier | 1997-10-10 | 1 | -2/+5 |
| | |||||
* | Unquote default group in pw.conf. | David Nugent | 1997-09-01 | 1 | -1/+2 |
| | | | | | PR: 4365 Submitted by: "Andrew L. Moore" <alm@mclink.com> | ||||
* | Revert $FreeBSD$ to $Id$ | Peter Wemm | 1997-02-22 | 1 | -1/+1 |
| | |||||
* | Make the long-awaited change from $Id$ to $FreeBSD$ | Jordan K. Hubbard | 1997-01-14 | 1 | -1/+1 |
| | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. | ||||
* | Adds optional NIS passwd file updating and optionally rebuilding | David Nugent | 1997-01-05 | 1 | -1/+13 |
| | | | | | | NIS maps. Suggested by: Peter Wemm | ||||
* | 1) 200 users per group limitation removed and pw | David Nugent | 1996-12-21 | 1 | -114/+142 |
| | | | | | | | will handle lines of any length in /etc/group. 2) Fixed bug with usermod -d not updating user's home directory. 3) Minor formatting display changes/fixes with *show -P. | ||||
* | Copyright update by the author, to be more in line with our sample | Joerg Wunsch | 1996-12-10 | 1 | -12/+6 |
| | | | | | | copyright. Submitted by: David Nugent | ||||
* | pw(8) -- a backend utility to manage the user and group databases. | Joerg Wunsch | 1996-12-09 | 1 | -0/+458 |
sysinstall's new User&group menu will use it, hence it's a 2.2 candidate despite of providing new functionality. Submitted by: David L. Nugent, <davidn@blaze.net.au> |