Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix a repeated typo: rootir -> rootdir. | wblock | 2015-10-09 | 1 | -11/+11 |
| | | | | | Approved by: bapt MFC after: 1 week | ||||
* | Cleanup a bit includes | bapt | 2015-08-02 | 1 | -3/+4 |
| | |||||
* | Rewrite parsing subcommands arguments of pw(8) | bapt | 2015-08-02 | 1 | -261/+35 |
| | | | | | | | | | | | | | 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. | ||||
* | Partial revert of r286152 | bapt | 2015-08-01 | 1 | -10/+0 |
| | | | | More work needed on the cli validation | ||||
* | Validate expiration days and password days from commmand line and pw.conf | bapt | 2015-08-01 | 1 | -0/+10 |
| | |||||
* | Create a strtounum function using the same API as strtonum | bapt | 2015-07-29 | 1 | -3/+3 |
| | | | | | This function returns uintmax_t Use this function to convert to gid_t/uid_t | ||||
* | Check uid/gid used when creating a user/group are not larger than ↵ | bapt | 2015-07-28 | 1 | -2/+2 |
| | | | | | | | UID_MAX/GID_MAX PR: 173977 Reported by: nvass@gmx.com | ||||
* | when -n is passed to any pw subcommand it is always expected to be considered as | bapt | 2015-07-28 | 1 | -8/+1 |
| | | | | | | | | a name so do not try to convert it to an id if it is a numeric value PR: 31933 Reported by: ted@impulse.net Sponsored by: gandi.net | ||||
* | Really fix -o | bapt | 2015-07-13 | 1 | -1/+1 |
| | |||||
* | Fix logic of check duplicates that has been inverted | bapt | 2015-07-13 | 1 | -1/+2 |
| | |||||
* | Rework the home directory creation and copy or the skel content to use *at | bapt | 2015-07-12 | 1 | -0/+4 |
| | | | | | | | | | functions This allows to simplify the code a bit for -R by not having to keep modifying path and also prepare the code to improve support -R in userdel While here, add regression tests for the functionality | ||||
* | Make getarg return NULL if args is NULL | bapt | 2015-07-12 | 1 | -1/+6 |
| | |||||
* | check the gecos format early: at the moment the -c option is parsed | bapt | 2015-07-11 | 1 | -0/+3 |
| | |||||
* | Make a separate groupdel/userdel from the main function | bapt | 2015-07-11 | 1 | -0/+3 |
| | |||||
* | Make separate functions to show users and groups | bapt | 2015-07-11 | 1 | -0/+6 |
| | |||||
* | Move the quiet flag into the configuration structure | bapt | 2015-07-11 | 1 | -1/+4 |
| | |||||
* | Do not try to set password on group if the group is added as a consequence of | bapt | 2015-07-09 | 1 | -0/+1 |
| | | | | | | of creating a user (regression from r285136) Reported by: Fabian Keil <fk@fabiankeil.de> | ||||
* | Validate input of pw usermod -h and pwusermod -H | bapt | 2015-07-04 | 1 | -0/+30 |
| | | | | | | | 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 | ||||
* | backout remove of -q option for pw [user|group] next | bapt | 2015-06-08 | 1 | -3/+5 |
| | | | | | | While the return code is broken, some corner case usage depends on the functionnality, so backout until we get better regression tests covering those corner case usage. | ||||
* | Fix mistakes than came along with r284139 | bapt | 2015-06-07 | 1 | -2/+2 |
| | |||||
* | Remove '-q' support for pw [user|group] next | bapt | 2015-06-07 | 1 | -5/+3 |
| | | | | | | the intent of -q in this command is to return as exit status the value of the next group/user id, which does not make sense given exit status are limited to values between 0 and 255. | ||||
* | Fix setting uid/gid min/max via pw | bapt | 2015-06-07 | 1 | -4/+13 |
| | |||||
* | Fix generating configuration file | bapt | 2015-06-07 | 1 | -1/+2 |
| | |||||
* | Fix duplicate checking | bapt | 2015-06-07 | 1 | -0/+4 |
| | |||||
* | In case of rename validate the length of the new name | bapt | 2015-06-07 | 1 | -0/+5 |
| | | | | Check early that the new name fits MAXLOGNAME and store it in pwconf | ||||
* | Refactor input validation | bapt | 2015-06-07 | 1 | -6/+43 |
| | | | | | Mutualize code to validate inputs of both 'user' and 'group' command Test that the input name fits into MAXLOGNAME | ||||
* | Handle -7 via gloval pwconf | bapt | 2015-06-07 | 1 | -0/+3 |
| | |||||
* | Initialize conf using menset(3) | bapt | 2015-06-07 | 1 | -3/+1 |
| | |||||
* | Handle pretty print (-P) via global pwconf | bapt | 2015-06-07 | 1 | -0/+4 |
| | |||||
* | Handle dryrun (-N) via global pwconf | bapt | 2015-06-07 | 1 | -1/+5 |
| | |||||
* | Handle -C and -Y locally and stop adding them to arglist | bapt | 2015-06-07 | 1 | -5/+15 |
| | |||||
* | Add a new global struct pwconf to store etcpath, rootdir and struct userconf | bapt | 2015-06-07 | 1 | -30/+26 |
| | | | | | Do not add anymore -R and -V to arglist Add an error message if both -V and -R are set in arguments | ||||
* | New pw -R rootdir option | bapt | 2015-06-03 | 1 | -27/+52 |
| | | | | | | | | This allows to set an alternate root directory in which the users/groups will be manipulated Requested by: gjb, ian Tested by: gjb | ||||
* | Use asprintf instead of malloc + snprintf and test the memory allocation | bapt | 2015-05-31 | 1 | -2/+3 |
| | |||||
* | Fix wrong message when using pw -V with a non existent directory | bapt | 2014-11-12 | 1 | -0/+8 |
| | | | | | | | Add a regression test about it PR: 194971 Submitted by: Freddy DISSAUX <bugzilla@dsx.bsdsx.fr> | ||||
* | Teach pw(8) about how to use pw/gr API to reduce code duplication | bapt | 2012-10-30 | 1 | -4/+0 |
| | | | | MFC after: 2 months | ||||
* | Add the groupmod '-d' option to pw to allow the deletion of existing users | scf | 2008-02-23 | 1 | -1/+2 |
| | | | | | | | | | | from a group without the need to perform the same operation by replacing the existing list via the '-M' option. The '-M' option requires someone to fetch the existing members with pw, deleting the undesired members from the list and sending the altered list back to pw. Approved by: wes (mentor) MFC after: 5 days | ||||
* | style(9) (verified no object changes) | scf | 2008-02-23 | 1 | -1/+1 |
| | | | | | Approved by: wes (mentor) MFC after: 5 days | ||||
* | Add home directory creation mode to pw.conf(5) and be a bit | le | 2007-03-30 | 1 | -0/+1 |
| | | | | more specific about the effect of the current umask on -M. | ||||
* | Add -M argument to usage() output. | le | 2007-03-30 | 1 | -0/+2 |
| | |||||
* | Introduce the new option -M to allow to set the permissions of | le | 2007-03-26 | 1 | -3/+2 |
| | | | | | | | | the user's newly created home directory. If omitted, it's derived from the current umask. PR: bin/16880, bin/83253 (partially), bin/104248 MFC in: 1 month | ||||
* | o Fix groupadd getopt line and make 'pw groupadd -o' work. | maxim | 2006-09-18 | 1 | -1/+1 |
| | | | | | | PR: bin/100684 Submitted by: Devon H. O'Dell MFC after: 3 weeks | ||||
* | Add a `-H <fd>' option that is like `-h <fd>', but accepts an already | iedowse | 2004-01-11 | 1 | -4/+6 |
| | | | | | | | encrypted password on the specified file descriptor. PR: bin/22033 MFC after: 2 weeks | ||||
* | Fix the type of the NULL arg to execl() | brian | 2001-07-09 | 1 | -1/+1 |
| | | | | Idea from: Theo de Raadt <deraadt@openbsd.org> | ||||
* | Fix a harmless format string bogon and mark a function as __printflike(). | kris | 2001-07-05 | 1 | -1/+1 |
| | | | | | | | There is still one instance of non-constant format string use inside that function, but it's hard to fix. MFC after: 1 week | ||||
* | Document the lock and unlock commands. This fixes a segmentation fault. | dd | 2001-03-14 | 1 | -0/+10 |
| | | | | | PR: 25187 Approved by: nik | ||||
* | Convert to use the <sys/queue.h> macros rather than fiddling with the queue | ben | 2000-12-29 | 1 | -2/+2 |
| | | | | | | structure internals. Reviewed by: markm | ||||
* | Add `_PATH_DEVZERO'. | obrien | 2000-12-09 | 1 | -1/+1 |
| | | | | Use _PATH_* where where possible. | ||||
* | Localize ctype too. | ache | 2000-06-24 | 1 | -1/+1 |
| | | | | Add weekday to showuser expired fields | ||||
* | Localize time/date. | ache | 2000-06-22 | 1 | -0/+3 |
| | | | | | Use ISO 8601 date in logs. Fix wrong argument type in ctype functions. |