summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/pw.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup a bit includesbapt2015-08-021-13/+3
|
* Remove dead codebapt2015-08-021-11/+0
|
* Rewrite parsing subcommands arguments of pw(8)bapt2015-08-021-4/+24
| | | | | | | | | | | | | 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.
* Improve strtounumbapt2015-07-301-2/+2
| | | | | | | | | Fix many style bugs Better variable naming Use C99 'restrict' were apropriate Fix potential errno race Submitted by: bde
* Create a strtounum function using the same API as strtonumbapt2015-07-291-0/+4
| | | | | This function returns uintmax_t Use this function to convert to gid_t/uid_t
* Separate usernext/groupnext from the main functionsbapt2015-07-111-0/+2
|
* Refactor input validationbapt2015-06-071-2/+2
| | | | | Mutualize code to validate inputs of both 'user' and 'group' command Test that the input name fits into MAXLOGNAME
* Add a new global struct pwconf to store etcpath, rootdir and struct userconfbapt2015-06-071-26/+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 backbapt2015-06-071-1/+1
| | | | to char *, change pw_checkname to directly take char * in input
* Simplify reading pw.conf(5) by using getline(3)bapt2014-04-221-0/+1
|
* Teach pw(8) about how to use pw/gr API to reduce code duplicationbapt2012-10-301-9/+0
| | | | MFC after: 2 months
* Stop hard-coding default directory mode as 0777.jkim2011-03-081-0/+1
|
* Add home directory creation mode to pw.conf(5) and be a bitle2007-03-301-0/+1
| | | | more specific about the effect of the current umask on -M.
* The variable `arglist' has internal linkage in pw.c, don't declare it as externstefanf2005-02-101-1/+1
| | | | here.
* Fix a harmless format string bogon and mark a function as __printflike().kris2001-07-051-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
* Back out the previous change to the queue(3) interface.jake2000-05-261-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Add new functionality "lock" and "unlock" to provide a simple passworddavidn1999-10-261-0/+2
| | | | | | locking mechanism for users. This works by prepending the string "*LOCKED*" to the password field in master.passwd to prevent successful decoding.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* 1) Do not blindly ignore file update errors which may occur due to concurrentdavidn1999-02-231-1/+3
| | | | | | 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.charnier1997-10-101-2/+1
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-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 rebuildingdavidn1997-01-051-1/+6
| | | | | | NIS maps. Suggested by: Peter Wemm
* 1) 200 users per group limitation removed and pwdavidn1996-12-211-3/+2
| | | | | | | 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.
* Allow 8-bit characters in the passwd gecos field, and adds a paragraphdavidn1996-12-191-1/+2
| | | | | to the mangpage explaining the consequences (to be updated at a later date after login class conf support is added).
* Copyright update by the author, to be more in line with our samplejoerg1996-12-101-12/+6
| | | | | | copyright. Submitted by: David Nugent
* Upgrade from the author, reflecting all my wishes resulting out of thejoerg1996-12-091-15/+2
| | | | | | | | sysinstall use of this tool (plus some bug fixes). 2.2 candidate... Submitted by: David Nugent <davidn@nserver.usn.blaze.net.au>
* pw(8) -- a backend utility to manage the user and group databases.joerg1996-12-091-0/+142
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>
OpenPOWER on IntegriCloud