Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix pkg groupshow <gid> | Baptiste Daroussin | 2016-12-10 | 1 | -1/+1 |
| | | | | | | PR: 204676 Submitted by: longwitz@incore.de MFC after: 2 days | ||||
* | Fix typo preventing pw {user,group}next -C from working as expected | Baptiste Daroussin | 2016-06-04 | 1 | -1/+1 |
| | | | | | Reported by: Mike Selnet via forums.freebsd.org MFC after: 3 days | ||||
* | Restore dryrun support for pw groupmod | Baptiste Daroussin | 2015-12-28 | 1 | -0/+5 |
| | |||||
* | Initialize `quiet` to false so `pw groupnext` again prints out the next gid | Enji Cooper | 2015-10-19 | 1 | -1/+1 |
| | | | | | | | | | by default Reported by: Florian Degner <f.degner@gmx.de> MFC after: 1 week PR: 203876 Sponsored by: EMC / Isilon Storage Division | ||||
* | Avoid calling strlen() where we can use the strspn() return value. | Ed Schouten | 2015-08-03 | 1 | -4/+4 |
| | |||||
* | Split some extra long lines | Baptiste Daroussin | 2015-08-02 | 1 | -2/+4 |
| | |||||
* | Cleanup a bit includes | Baptiste Daroussin | 2015-08-02 | 1 | -2/+2 |
| | |||||
* | Fix regression: report if a group already exists when creating it | Baptiste Daroussin | 2015-08-02 | 1 | -0/+2 |
| | |||||
* | Rewrite parsing subcommands arguments of pw(8) | Baptiste Daroussin | 2015-08-02 | 1 | -246/+511 |
| | | | | | | | | | | | | | 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. | ||||
* | Cast uid/git to uintmax_t when using printf-like functions so the size of | Baptiste Daroussin | 2015-08-01 | 1 | -3/+4 |
| | | | | uid/gid size remains a implementation detail | ||||
* | Remove now unused variable | Baptiste Daroussin | 2015-07-11 | 1 | -3/+0 |
| | |||||
* | Rework groupmod modification: | Baptiste Daroussin | 2015-07-11 | 1 | -61/+29 |
| | | | | | Use gr_add(3) when possible to avoid code duplication. Use a simpler logic to delete members of a group | ||||
* | Make a separate groupdel/userdel from the main function | Baptiste Daroussin | 2015-07-11 | 1 | -17/+27 |
| | |||||
* | Make separate functions to show users and groups | Baptiste Daroussin | 2015-07-11 | 1 | -16/+35 |
| | |||||
* | Move the quiet flag into the configuration structure | Baptiste Daroussin | 2015-07-11 | 1 | -1/+1 |
| | |||||
* | Separate usernext/groupnext from the main functions | Baptiste Daroussin | 2015-07-11 | 1 | -12/+15 |
| | |||||
* | Do not try to set password on group if the group is added as a consequence of | Baptiste Daroussin | 2015-07-09 | 1 | -1/+1 |
| | | | | | | of creating a user (regression from r285136) Reported by: Fabian Keil <fk@fabiankeil.de> | ||||
* | Also validate inputs of pw groupmod -h and groupmod -H | Baptiste Daroussin | 2015-07-04 | 1 | -46/+46 |
| | |||||
* | backout remove of -q option for pw [user|group] next | Baptiste Daroussin | 2015-06-08 | 1 | -2/+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 typo | Baptiste Daroussin | 2015-06-08 | 1 | -1/+1 |
| | |||||
* | Remove '-q' support for pw [user|group] next | Baptiste Daroussin | 2015-06-07 | 1 | -5/+2 |
| | | | | | | 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 duplicate checking | Baptiste Daroussin | 2015-06-07 | 1 | -8/+7 |
| | |||||
* | In case of rename validate the length of the new name | Baptiste Daroussin | 2015-06-07 | 1 | -5/+4 |
| | | | | Check early that the new name fits MAXLOGNAME and store it in pwconf | ||||
* | Refactor input validation | Baptiste Daroussin | 2015-06-07 | 1 | -36/+26 |
| | | | | | Mutualize code to validate inputs of both 'user' and 'group' command Test that the input name fits into MAXLOGNAME | ||||
* | Handle pretty print (-P) via global pwconf | Baptiste Daroussin | 2015-06-07 | 1 | -9/+7 |
| | |||||
* | Handle dryrun (-N) via global pwconf | Baptiste Daroussin | 2015-06-07 | 1 | -1/+1 |
| | |||||
* | Add a new global struct pwconf to store etcpath, rootdir and struct userconf | Baptiste Daroussin | 2015-06-07 | 1 | -1/+2 |
| | | | | | Do not add anymore -R and -V to arglist Add an error message if both -V and -R are set in arguments | ||||
* | Instead of always casting the pw_checkname input to u_char * and casting it back | Baptiste Daroussin | 2015-06-07 | 1 | -2/+2 |
| | | | | to char *, change pw_checkname to directly take char * in input | ||||
* | Cast to gid_t for groups not uid_t | Baptiste Daroussin | 2015-05-31 | 1 | -1/+1 |
| | |||||
* | 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 | ||||
* | Cast -1 to uid_t and bump WARNING level to 3 | Baptiste Daroussin | 2015-05-31 | 1 | -1/+1 |
| | |||||
* | Make pw_user()/pw_group() more consitent about errors | Baptiste Daroussin | 2015-05-31 | 1 | -12/+9 |
| | | | | | | | | Some of errors were returned to the main function, some others caused a direct exit via err(3). The main function is only interested in EXIT_SUCCESS, so in all other cases replace warn(3) + return err by err(3) | ||||
* | Revert r277652 | Baptiste Daroussin | 2015-01-26 | 1 | -5/+1 |
| | | | | | | uid and gid are never and should never be negative. The pw(8) manpage clearly states the -u and -g arguments are for uids/gids, hence using negative values is abusing a bug in former versions of pw(8) | ||||
* | Allow negative numbers in -u and -g options | Baptiste Daroussin | 2015-01-24 | 1 | -1/+5 |
| | | | | | PR: 196514 MFC after: 1 week | ||||
* | Do not delete the group wheel when bad argument is passed to pw groupdel -g | Baptiste Daroussin | 2014-10-28 | 1 | -0/+5 |
| | | | | | | | | | | | | Check that the -g argument is actually a number, if not report an error. This argument is converted without checking with atoi(3) later so without this check it converts any alpha entries into 0 meaning it deletes the group wheel Add a regression test about it PR: 90114 Reported by: bkoenig@cs.tu-berlin.de MFC after: 1 week | ||||
* | When a group is renamed then the group has been invalidated for sure. | Baptiste Daroussin | 2014-10-28 | 1 | -3/+6 |
| | | | | | | | | | In that case get the group information using the new name. Add a regression test about this bug PR: 193704 Reported by: az | ||||
* | Stop pw(8) from segfaulting when given certain input | Julian Elischer | 2014-03-06 | 1 | -6/+13 |
| | | | | | | | PR:187310 Submitted by: Kim Shrier Obtained from: bug MFC after: 1 week | ||||
* | Fix a regression in "pw group show" introduced r242349: | Baptiste Daroussin | 2012-12-27 | 1 | -1/+1 |
| | | | | | | | print a newline after printing each group line. PR: bin/174731 Submitted by: Jan Beich <jbeich@tormail.org> | ||||
* | Remove useless check for NULL prior to free. | Eitan Adler | 2012-12-05 | 1 | -2/+1 |
| | | | | | Approved by: cperciva MFC after: 2 weeks | ||||
* | Teach pw(8) about how to use pw/gr API to reduce code duplication | Baptiste Daroussin | 2012-10-30 | 1 | -2/+3 |
| | | | | MFC after: 2 months | ||||
* | Add the groupmod '-d' option to pw to allow the deletion of existing users | Sean Farley | 2008-02-23 | 1 | -15/+80 |
| | | | | | | | | | | 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) | Sean Farley | 2008-02-23 | 1 | -2/+1 |
| | | | | | Approved by: wes (mentor) MFC after: 5 days | ||||
* | Add a `-H <fd>' option that is like `-h <fd>', but accepts an already | Ian Dowse | 2004-01-11 | 1 | -2/+9 |
| | | | | | | | encrypted password on the specified file descriptor. PR: bin/22033 MFC after: 2 weeks | ||||
* | Localize time/date. | Andrey A. Chernov | 2000-06-22 | 1 | -2/+2 |
| | | | | | Use ISO 8601 date in logs. Fix wrong argument type in ctype functions. | ||||
* | Portability fixes for other bsd4.4 derivatives. | David Nugent | 2000-01-15 | 1 | -3/+4 |
| | |||||
* | Add new functionality "lock" and "unlock" to provide a simple password | David Nugent | 1999-10-26 | 1 | -2/+4 |
| | | | | | | locking mechanism for users. This works by prepending the string "*LOCKED*" to the password field in master.passwd to prevent successful decoding. | ||||
* | Clean up error handling in fileupdate(), which now returns 0 on success | David Nugent | 1999-10-26 | 1 | -5/+20 |
| | | | | | | | | | | | | instead of a boolean. This replicated through he front-end sub-functions relating to add, delete, modify entries in passwd & group files Errno is now preserved so output of errc()/warnc() will be less obfuscated by subsequent errors when reporting the problem. Add more intelligent error handling when attempting to modify/delete NIS entries with no corresponding local database entry. [MFC to stable in a couple of weeks to keep both in sync] | ||||
* | $Id$ -> $FreeBSD$ | Peter Wemm | 1999-08-28 | 1 | -1/+1 |
| | |||||
* | 1) Do not blindly ignore file update errors which may occur due to concurrent | David Nugent | 1999-02-23 | 1 | -13/+12 |
| | | | | | | 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 | -15/+19 |
| |