summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vipw (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-5/+5
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* unveiling _PATH_MASTERPASSWD_LOCK requires an "r" permissionrobert2019-03-251-2/+2
| | | | | | as well in order to be able to do stat(1) on the lock file ok deraadt@
* add unveil(2) to vipw(8)mestre2018-09-271-1/+10
| | | | | | | | | | | | | | | | | The files needed to be unveiled directly or indirectly via libutil are the following: - _PATH_MASTERPASSWD_LOCK - write/create permissions - _PATH_MASTERPASSWD - read permission - _PATH_BSHELL - execute permission - _PATH_PWD_MKDB - execute permission _PATH_MASTERPASSWD gets read and then _PATH_MASTERPASSWD_LOCK is created and the content of the former is written on the latter. After this _PATH_BSHELL spawns an EDITOR (vi(1) by default) and at the end then _PATH_PWD_MKDB is ran to update the _PATH_MASTERPASSWD based in what was actually changed in _PATH_MASTERPASSWD_LOCK. OK deraadt@
* Useless includejca2017-07-121-2/+1
| | | | from Matthew Martin
* Move <fcntl.h> to its alphabetic spot and add __dead attribute to usage()tb2017-06-291-5/+5
| | | | ok mestre
* - Remove -? since parameters don't make sense for this command (but still keepmestre2016-11-071-3/+3
| | | | | default case to have usage() explaining that) - Replace exit(3) with return to enable SSP
* Refer to /etc/passwd consistently as the "legacy password file" andtb2016-08-141-3/+3
| | | | | | remove some references to differences between versions 6 and 7. ok jmc, millert, tedu
* pledge "stdio rpath wpath cpath fattr proc exec"deraadt2015-10-161-1/+4
|
* remove the first comma from constructs like ", and," and ", or,": you can usejmc2015-03-131-4/+4
| | | | | "and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
* Repair the termination condition of a write(2) loop.schwarze2014-05-071-2/+2
| | | | | | | | | | Since _PATH_MASTERPASSWD_LOCK is on a local file system in any sane setup and written to in blocking mode, i don't see how write(2) could return before having written everything, so this maybe wasn't an actual bug, but it should be repaired anyway, if only for clarity and extra safety. From Ben Cornett <ben at lantern dot is>; ok millert@.
* Use futimens() instead of futimes() to avoid converting to/frommillert2011-08-191-9/+6
| | | | struct timeval. OK guenther@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-11/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* copy in FILES from pw_lock.3 to vipw.8: as nick points out, it should atjmc2007-11-191-2/+15
| | | | | | | least document /etc/ptmp; while i'm at it, might as well tidy it up and make it consistent across these pages;
* Deal with timespec vs. timeval precision issues. Fixes a problemmillert2007-11-171-1/+4
| | | | | | where the "no changes" case was not properly detected due to timespec supporting nanosec resolution but timeval only supporting microsec resolution. OK deraadt@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* fix SEE ALSO;jmc2004-03-121-2/+2
|
* Cipher type is set in login.conf, not passwd.conf these days; Otto Moerbeekmillert2003-06-141-3/+3
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-022-12/+4
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Instead of stashing the timestamp on the pw temp file before eachmillert2003-01-241-10/+7
| | | | | | | edit, just stash it once in copyfile(). This fixes the check for whether or not changes have been made (based on the timestamp) for cases like when the _shadow group is missing but is fixed by the admin during the next edit.
* ansideraadt2003-01-241-8/+5
|
* minor KNFderaadt2002-05-301-1/+1
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-2/+2
|
* Better file change detection:millert2001-08-191-3/+12
| | | | | o when copying to temp file set utimes on temp file equal to original o use st_mtimespec instead of st_mtime for better granularity
* extra arg to pw_mkdbmillert2001-08-161-1/+1
|
* Update for pw_mkdb(3) interface change. All but vipw and userdel canmillert2000-11-261-1/+1
| | | | specify a username (and thus avoid rebuilding the while database).
* Remove hard sentence breaks. Add $OpenBSD$ tags where appropriate. Some otheraaron2000-03-191-4/+7
| | | | cleanup along the way.
* Check size as well as mtime when deciding whether or not the filemillert1999-05-291-1/+2
| | | | | was changed during edit. Crontab patch from <andrew@untraceable.net>. It may be better to simply do a real compare inline.
* remove argument from .Os macros so value in /usr/share/tmac/mdoc/doc-commonaaron1999-05-231-2/+2
| | | | is used instead; kwesterback@home.com
* all .Nm macros should have an argument in SYNOPSIS; also misc cleanupaaron1999-04-021-2/+2
|
* cleanupaaron1999-03-121-7/+8
|
* $OpenBSD$deraadt1997-09-211-2/+1
|
* include link to passwd.confprovos1997-02-251-0/+5
|
* getopt(3) returns -1 when out of args, not EOF, whee!millert1997-01-151-1/+1
|
* better error messagederaadt1996-09-011-1/+1
|
* gone long agoderaadt1996-08-132-0/+0
|
* libutilderaadt1996-05-224-282/+20
|
* initial import of NetBSD treederaadt1995-10-185-0/+498