summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use -1 to indicate an invalid uid/gid, not UID_MAX and GID_MAX.millert2019-10-171-6/+6
| | | | This is the userland portion. OK deraadt@ sashan@
* 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.
* Go back to hard-coding 4096 for the bucket size for now.millert2018-10-091-5/+1
| | | | | Using the optimal filesystem block size results in a larger file on the install media.
* Account from the fact that we store ech entry three times whenmillert2018-09-181-3/+8
| | | | | | estimating the number of hash table elements. Also set the bucket size to be the optimal file system block size instead of hard-coding to 4096. OK tb@
* Assorted simple improvements:schwarze2017-09-101-22/+23
| | | | | | | | | | - Considerably simplify the first paragraph; suggested by Raf Czlonka. - No need to say twice that "file" must be in the correct format. - Clarify which file is checked by -c. - Clarify that -p creates passwd(5) in addition, not instead. - Simplify reference to the master.passwd(5) format. - Turn one sentence into a standard EXIT STATUS section. - New HISTORY and AUTHORS sections, based on the CSRG archive CDs.
* remove reference to 6th ed.tedu2016-08-161-3/+3
|
* Refer to /etc/passwd consistently as the "legacy password file" andtb2016-08-141-5/+3
| | | | | | remove some references to differences between versions 6 and 7. ok jmc, millert, tedu
* remove mention of dbm(3) and surrounding cruft; ok jmc@naddy2016-05-091-12/+2
|
* change Xrs from now-defunct db(3) to dbopen(3); this wasn;t ajmc2015-11-301-6/+4
| | | | | | | straight replace: thanks both to schwarze and maja for feedback on how to rewrite parts; i've snuck in an rcs id->openbsd id change in dev_mkdb too;
* revert sys/kern/kern_pledge.c 1.103 and reenable pledge in pwd_mkdbsemarie2015-11-051-3/+1
| | | | ok deraadt@
* quick fix for a regression introduced by sys/kern/kern_pledge.c 1.103semarie2015-11-051-1/+3
| | | | ok benno phessler
* pledge "stdio rpath wpath cpath getpw fattr flock"deraadt2015-10-161-1/+4
|
* These no longer need to be static. The ramdisk's no longer reach-aroundderaadt2015-10-121-4/+1
| | | | | and use the one in the base install, but have their own copy. ok millert sthen miod daniel
* missing va_end(); OK deraadtgsoares2015-08-271-1/+2
|
* add missing prototypederaadt2015-08-191-1/+3
|
* Write (uid_t)-1 as -1 instead of UID_MAX in the v7 passwd file.millert2015-04-241-7/+26
| | | | OK deraadt@
* Convert error/errorx/errorc functions -> fatal/fatalx/fatalc andmillert2015-04-151-61/+59
| | | | | make then take a printf format string instead of requiring the caller to snprintf into a buffer first. OK deraadt@
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-8/+11
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* Delete secret or secret-derived data with explicit_bzero.doug2014-08-251-2/+2
| | | | | concept ok deraadt@ diff looks ok tedu@
* Use errc/warnc to simplify code.guenther2014-05-201-9/+15
| | | | | | Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
* Obvious .Xr fixes, found while testing mandocdb(8).schwarze2014-01-201-3/+3
|
* Remove 13 years old compiler bug workaround on m68k. Apparently fixed or sweptmiod2012-11-021-5/+1
| | | | | | under the rug as part of the bunch of compiler fixes in the last 10+ years. No objection from espie@ (who doesn't remember exactly what the issue used to be)
* Don't leak the fds we open in cp() to copy one file from another.oga2010-01-081-1/+3
| | | | | | from Igor Zinovik; thanks! ok millert@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-15/+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
* Typo: chance -> changeajacoutot2009-10-041-3/+3
| | | | ok millert@
* Add _PW_BUF_LEN define and use it instead of hard-coding 1024 formillert2008-06-251-3/+3
| | | | the buffer size. OK deraadt@
* sync the synopsis and usage; "usage:" is lowercasesobrado2008-03-171-4/+3
| | | | ok jmc@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* tidy up synopsis and options list; from Igor Sobradojmc2007-02-181-15/+15
|
* Change ``etc'' to ``/etc'' for consistency with the rest of th epage.ray2006-08-271-2/+2
| | | | OK jmc@.
* Actually, /etc/passwd is 6th Edition-style, not 7th. The only realmillert2004-10-121-4/+4
| | | | | | diff between /etc/passwd in 6th and 7th was the crypt() algorithm used and we no longer put encrypted passwords in /etc/passwd. From Matthew Gregan; OK otto@
* spacingderaadt2004-08-081-19/+13
|
* Be more clear about where the source file is coming from and what willotto2004-03-091-4/+10
| | | | | happen to it. ok millert@ cedric@
* () to (void)deraadt2003-06-281-3/+3
|
* - section reorderjmc2003-06-121-8/+7
| | | | | | - macro fixes - kill whitespace at EOL - new sentence, new line
* Sanity check username length and convert to ANSI function headers.millert2003-06-081-24/+13
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-022-13/+5
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Clarify the -d option and allow the passwd file argument to not bemillert2003-04-132-10/+20
| | | | | a fully qualified pathname if -d was specified (since we take the basename in that case anyway). deraadt@ OK
* Check strdup() rval for NULL; noticed by mpech@millert2003-03-281-3/+4
|
* Rename shadow group to _shadowmillert2002-11-211-3/+3
| | | | | This means the instructions in the previous commit are now wrong (replace shadow with _shadow and all will be well).
* Add a "shadow" group and make the shadow passwd db readable by thatmillert2002-11-211-2/+17
| | | | | | | | | | | | | | | group. This changes getpw* to always try the shadow db first and then fall back to the db w/o password hashes. In the future, /usr/libexec/auth/login_passwd (and others) will be setgid shadow instead of setuid root. OK deraadt@ If you track -current you should do the following: o add group shadow to /etc/group o chgrp shadow /etc/spwd.db o chmod 640 /etc/spwd.db o rebuild and install src/usr.sbin/pwd_mkdb You do not need to rebuild libc yet, but it would't hurt to do so.
* Document why it's static.art2002-06-271-1/+3
|
* minor KNFderaadt2002-06-021-3/+3
|
* more strlcat and strlcpyderaadt2002-05-291-4/+4
|
* more strcpy/sprintf death; mpech okderaadt2002-05-221-3/+3
|
* 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-11/+11
|
* skip to uid field, not gidmpech2001-09-171-4/+5
| | | | millert@ ok
* Add -s flag to only update secure .db file (/etc/spwd.db). Can bemillert2001-08-162-29/+52
| | | | used in conjunction with -u user when only the password has changed.
* Section shuffling; mpech@prosoft.org.lvaaron2001-06-081-19/+19
|
* Close PR 1854; mpech@prosoft.org.lvmillert2001-06-071-6/+7
| | | | | o use correct db pointers o don't try to star out an empty password