summaryrefslogtreecommitdiffstats
path: root/pw/pw_conf.c
Commit message (Collapse)AuthorAgeFilesLines
* Simplify code for parsing extra groupsBaptiste Daroussin2015-12-291-1/+1
|
* Use intmax_t rather than long longBaptiste Daroussin2015-08-021-2/+2
|
* Fix build on 32bitsBaptiste Daroussin2015-08-021-2/+2
|
* Cleanup a bit includesBaptiste Daroussin2015-08-021-4/+4
|
* Rewrite parsing subcommands arguments of pw(8)Baptiste Daroussin2015-08-021-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 revertBaptiste Daroussin2015-08-011-2/+0
|
* Partial revert of r286152Baptiste Daroussin2015-08-011-0/+2
| | | | More work needed on the cli validation
* Fix buildBaptiste Daroussin2015-08-011-0/+1
|
* Fix formatting of new codeBaptiste Daroussin2015-08-011-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.confBaptiste Daroussin2015-08-011-4/+12
|
* Validate the max_uid/max_gid boundaries and entry type in pw.confBaptiste Daroussin2015-08-011-7/+23
|
* Cast uid/git to uintmax_t when using printf-like functions so the size ofBaptiste Daroussin2015-08-011-4/+5
| | | | uid/gid size remains a implementation detail
* Replace custom string array with stringlist(3)Baptiste Daroussin2015-07-111-15/+8
|
* Remove useless cast in printf and printf-like functions:Baptiste Daroussin2015-05-311-4/+4
| | | | use %u for uid_t and gid_t
* Move cleanup functions to the right placeBaptiste Daroussin2015-05-311-2/+3
|
* Remove useless test before free()Baptiste Daroussin2015-05-311-2/+1
|
* Return early in case we cannot read the configuration fileBaptiste Daroussin2015-05-311-110/+111
| | | | This drops one level of indentation
* Use calloc(3) instead of malloc(3) + memset(3)Baptiste Daroussin2015-05-101-2/+4
| | | | While here check the return of calloc(3)
* The initial logic for allocating the new string was wrong, the conversionBaptiste Daroussin2015-05-101-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 Daroussin2015-05-101-7/+11
| | | | Check the return of strndup
* Remove useless call to extendarrayBaptiste Daroussin2015-05-101-1/+0
|
* Remove now unused LNBUFSZ buffer sizeBaptiste Daroussin2015-05-091-3/+0
|
* Return from the function as early as possibleBaptiste Daroussin2015-05-091-117/+116
| | | | This reduces the depth of the if statements and improves clarity of the code
* Use sbuf(9) instead of homebrewed buffered stringBaptiste Daroussin2015-05-091-48/+46
|
* Simplify reading pw.conf(5) by using getline(3)Baptiste Daroussin2014-04-221-0/+503
|
* Create the altix project branch. The altix project will add supportMarcel Moolenaar2010-03-101-516/+0
| | | | | | | for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting is a two-module system, consisting of a base compute module and a CPU expansion module. SGI's NUMAFlex architecture can be an excellent platform to test CPU affinity and NUMA-aware features in FreeBSD.
* Add home directory creation mode to pw.conf(5) and be a bitLukas Ertl2007-03-301-0/+15
| | | | more specific about the effect of the current umask on -M.
* Handle snprintf() returning < 0 (not just -1)Brian Somers2001-08-201-2/+2
| | | | MFC after: 2 weeks
* Handle snprintf() returning -1.Brian Somers2001-08-201-0/+4
| | | | MFC after: 2 weeks
* Make the comment generated in /etc/pw.conf match realityDoug Barton2000-12-181-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 Nugent2000-07-161-1/+2
|
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
|
* Remove some more warnings.David Nugent1999-07-281-2/+3
|
* 1) Do not blindly ignore file update errors which may occur due to concurrentDavid Nugent1999-02-231-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 Charnier1997-10-101-2/+5
|
* Unquote default group in pw.conf.David Nugent1997-09-011-1/+2
| | | | | PR: 4365 Submitted by: "Andrew L. Moore" <alm@mclink.com>
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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 rebuildingDavid Nugent1997-01-051-1/+13
| | | | | | NIS maps. Suggested by: Peter Wemm
* 1) 200 users per group limitation removed and pwDavid Nugent1996-12-211-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 sampleJoerg Wunsch1996-12-101-12/+6
| | | | | | copyright. Submitted by: David Nugent
* pw(8) -- a backend utility to manage the user and group databases.Joerg Wunsch1996-12-091-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>