summaryrefslogtreecommitdiffstats
path: root/pw/pw_nis.c
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended.
* Speed up pw operations that edit /etc/group or /etc/passwdAlan Somers2016-11-181-0/+1
| | | | | | | | | | | | | | r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group corruption on power loss. However, it fixed it by opening those files with O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC with appropriately placed fsync()s instead, which is much faster. Using a ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s. Reviewed by: allanjude, bapt, vangyzen, garga Tested on pfSense by: garga MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8319
* Close some file descriptor leaks in pwAlan Somers2016-10-211-0/+3
| | | | | | MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8245
* Cleanup a bit includesBaptiste Daroussin2015-08-021-0/+1
|
* Rewrite parsing subcommands arguments of pw(8)Baptiste Daroussin2015-08-021-0/+1
| | | | | | | | | | | | | 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 some uneeded headersBaptiste Daroussin2015-05-091-3/+0
|
* In NIS mode first chmod(2) the temporary file and is succeed then rename(2)Baptiste Daroussin2012-11-201-2/+2
|
* Correctly set the password file mode after renaming in NIS modeBaptiste Daroussin2012-11-201-0/+2
|
* Teach pw(8) about how to use pw/gr API to reduce code duplicationBaptiste Daroussin2012-10-301-0/+94
| | | | MFC after: 2 months
* Create the altix project branch. The altix project will add supportMarcel Moolenaar2010-03-101-72/+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.
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
|
* 1) Do not blindly ignore file update errors which may occur due to concurrentDavid Nugent1999-02-231-2/+1
| | | | | | 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
|
* 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-0/+70
NIS maps. Suggested by: Peter Wemm