summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/fileupd.c
Commit message (Collapse)AuthorAgeFilesLines
* Teach pw(8) about how to use pw/gr API to reduce code duplicationbapt2012-10-301-135/+0
| | | | MFC after: 2 months
* Shift file locking to source file instead of temp file. This fixeskensmith2004-03-081-4/+2
| | | | | | | | | | | data buffering issue that corrupts files if two pw(8)'s run at the same time as well as changing pw(8) so it uses the same locking mechanism as PAM, vipw(8), pwd_mkdb(8), etc. PR: bin/23501 Submitted by: Alex Kapranoff <alex (at) kapran (dot) bitmcnit (dot) bryansk (dot) su> Approved by: rwatson (mentor) MFC after: 5 days
* Clean up error handling in fileupdate(), which now returns 0 on successdavidn1999-10-261-27/+35
| | | | | | | | | | | | 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$peter1999-08-281-1/+1
|
* 1) Do not blindly ignore file update errors which may occur due to concurrentdavidn1999-02-231-10/+5
| | | | | | updating 2) Add -V <etcdir>, which allows maintaining user/group database in alternate locations other than /etc.
* Fix race condition in pw caused by multiple instances of pwd_mkdb beingnate1998-07-161-3/+14
| | | | | | | | | | | | | | | | | run at the same time. Notes: The fileupdate function is still somewhat broken. Instead of returning a failure code if it can't modify the original file it renames the .new file and continues as though nothing is wrong. This will cause the lock on the original file to be lost and could lead to a similar race condition. I left that portion of the code alone since I feel that the maintainer of the code would have a better concept of how he wants to handle errors in that function than I do. PR: bin/6787 Submitted by: Craig Spannring <cts@internetcds.com>
* Use err(3) instead of local redefinition. Add rcsid string.charnier1997-10-101-2/+5
|
* 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.
* 1) 200 users per group limitation removed and pwdavidn1996-12-211-13/+48
| | | | | | | 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 samplejoerg1996-12-101-12/+6
| | | | | | copyright. Submitted by: David Nugent
* pw(8) -- a backend utility to manage the user and group databases.joerg1996-12-091-0/+159
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