summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb
Commit message (Collapse)AuthorAgeFilesLines
* Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived softwareimp2004-08-072-8/+0
| | | | (with permission of addtional copyright holders where appropriate)
* Add 'i' to the getopt string.imp2004-08-051-1/+1
| | | | Noticed by: jhein
* Add support for ignoring locking failures. This is only enabled whenimp2004-07-212-4/+19
| | | | | | | | | | you've specified a directory. It is intended to be used in building custom releases over NFS where locking may be unreliable at best and there is no contention that the locking is designed to arbitrate. Other uses of this flag are discouraged. Document same in usage and man page (including the warning about unwise). Sponsored by: Timing Solutions
* Two style related changes:imp2004-07-211-5/+5
| | | | | | | (1) use strlcpy instead of strncpy since the use here of the latter was incorrect. (2) Move 'N' case into proper sorted order (sorted the same way that ls sorts its args).
* Mechanically kill hard sentence breaks.ru2004-07-021-5/+10
|
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+4
|
* When updating a single entry (i.e. when the `-u' option is given),nectar2003-04-281-13/+29
| | | | | | | | | | | | | | | do not add the "\xFF" "VERSION" key --- it should only be added once ALL entries have been updated. While I'm here, correct the logic that detects whether or not the user-ID has changed so that it works even if all entries have not yet been updated to the new format. Users missing-in-action were Reported by: tjr, Vallo Kallaste <vallo@estcard.ee>, leafy <leafy@leafy.idv.tw> Sponsored by: DARPA, Network Associates Laboratories
* Revert the definitions of _PW_KEY* to their previous values. There isnectar2003-04-181-19/+25
| | | | | | | | | | at least one consumer outside of libc and pwd_mkdb. Adjust the versioning in libc and pwd_mkdb accordingly. named was the application affected, and that fact was first Reported by: Zherdev Anatoly <tolyar@mx.ru> Sponsored by: DARPA, Network Associates Laboratories
* = Implement thread-safe versions of the getpwent(3) and getgrent(3)nectar2003-04-171-11/+124
| | | | | | | | | | | | | | | | | | | | | | family of functions using the new nsdispatch(3) core. Remove arbitrary size limits when using the thread-safe versions. = Re-implement the traditional getpwent(3)/getgrent(3) functions on top of the thread-safe versions. = Update the on-disk format of the hashed version of the passwd(5) databases to allow for versioned entries. The legacy version is `3'. (Don't ask.) = Add support for version `4' entries in the passwd(5) database. Entries in this format are identical to version 3 entries except that all integers are stored as 32-bit integers in network byte order (big endian). = pwd_mkdb is updated to generate both version 3 and version 4 entries. Sponsored by: DARPA, Network Associates Laboratories
* style.Makefile(5)obrien2003-04-041-2/+1
|
* Uniformly refer to a file system as "file system".ru2002-12-121-1/+1
| | | | Approved by: re
* The .Nm utilitycharnier2002-07-141-4/+6
|
* WARNS=4 cleanup, de-__P()alfred2002-07-112-12/+14
|
* Consistancy check: s/file system/filesystem/gtrhodes2002-05-161-1/+1
|
* When reporting that a line is too long, include the line number in thedd2002-03-091-1/+5
| | | | | | | | error message. While I'm here, add a note that the "line too long" message isn't always accurate. PR: 35395 Submitted by: andrew@ugh.net.au
* Explicitly use int32_t for on-disk records for pw_change and pw_expire,peter2001-10-271-8/+11
| | | | | | since that is what we use now and this insulates us from any time_t tweaks here. We can define a record format that uses 64 bit times if/when we need to.
* It's bad enough to capitalize the name of the executable at thedd2001-08-041-1/+1
| | | | | beginning of the sentence, but at the very least it shouldn't be done in the middle of a sentence!
* Perform a major cleanup of the usr.sbin Makefiles.obrien2001-07-201-4/+5
| | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before.
* Remove whitespace at EOL.dd2001-07-151-2/+2
|
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for usr.sbin/ to 8.ru2001-03-201-1/+0
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-4/+4
|
* Add nsswitch support. By creating an /etc/nsswitch.conf file, you cannectar2000-09-064-215/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | configure FreeBSD so that various databases such as passwd and group can be looked up using flat files, NIS, or Hesiod. = Hesiod has been added to libc (see hesiod(3)). = A library routine for parsing nsswitch.conf and invoking callback functions as specified has been added to libc (see nsdispatch(3)). = The following C library functions have been modified to use nsdispatch: . getgrent, getgrnam, getgrgid . getpwent, getpwnam, getpwuid . getusershell . getaddrinfo . gethostbyname, gethostbyname2, gethostbyaddr . getnetbyname, getnetbyaddr . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr = host.conf has been removed from src/etc. rc.network has been modified to warn that host.conf is no longer used at boot time. In addition, if there is a host.conf but no nsswitch.conf, the latter is created at boot time from the former. Obtained from: NetBSD
* Fix various unsigned vs signed errors that caused problems with uidspaul2000-03-092-11/+20
| | | | | | | and gids bigger than 16 bits. Added checks for uids and gids that are bigger than 32 bits. Approved by: jkh (partly, this fix is bigger than I first intended)
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-011-1/+2
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* Replace the -q option to pwd_mkdb with a test for PW_SCAN_BIG_IDS insheldonh1999-12-023-12/+18
| | | | | | | | | | | the environment. This allows big ID warnings to be suppressed for vipw and chpass as well. Since the environment variable test is only performed for callers of pw_scan() that do not set pw_big_ids_warning, the test can still be overriden. Currently, chpass and pwd_mkdb are the only users of pw_scan() and neither of them overrides the environment variable test.
* Allow empty UIDs if we are processing NIS records. I am not entirelyeivind1999-11-221-2/+4
| | | | | | | | happy with how this end up and will re-visit the entire empty field problem, but this patch solves the NIS problem for now. Submitted by: Dan Nelson <dan@emsphone.com> PR: 14865,14984
* Add to pwd_mkdb a -q option to silence warnings about large IDs. Add asheldonh1999-11-154-5/+26
| | | | | | | | | suitably ominous warning in the manual page. The diff applied is not the one provided in the attributed PR. PR: 13344 Reviewed by: bde
* Flag empty UID entries as errors (to stop typos from turning intoeivind1999-11-061-1/+6
| | | | alternate root accounts).
* Unifdef -DPASSWD_IGNORE_COMMENTS. This wasn't really optional andpeter1999-09-062-7/+2
| | | | we have enough pseudo-options already.
* Back out previous commit. I mistook passing commentary from bde forsheldonh1999-08-312-17/+6
| | | | | | review. Requested by: bde
* Only issue a warning for the first occurrence of a UID > USHRT_MAX andsheldonh1999-08-302-6/+17
| | | | | | | the first occurrence of a GID > USHRT_MAX. PR: 13344 Reviewed by: bde
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-121-0/+1
| | | | | | | | | | | | | | | | | track. The Id line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Enable source file locking in pwd_mkdb by including the proper letterbillf1999-01-011-3/+3
| | | | | | | | | | in getopt(). The code was there, the means to use it wasn't. Also update the usage() statment to reflect reality. PR: bin/9248 Submitted by: Jos Backus <jbackus@plex.nl> Forgotten By: dillon
* PR: bin/3478dillon1998-12-132-6/+43
| | | | | | | | | | | | | | Have pwd_mkdb lock the source file while rebuilding the database. When called by programs such as vipw, the source file is a temporary file and this does not conflict with the lock on /etc/master.passwd already held by vipw. When run manually, however, master.passwd is typically specified as the argument and the locking prevents other programs from messing with master.passwd during the database rebuild. Also pwd_mkdb uses a blocking exclusive lock as it may be called from a script. The -N option was added to cause pwd_mkdb to get the lock non-blocking and exit with an error if the attempt fails, again useful for scripts.
* Close PR bin/8753 pwd_mkdb problem when having comments in passwd filefoxfair1998-12-121-1/+5
| | | | Submitted by Chia-liang Kao clkao@CirX.ORG .
* Rename a static variable, so it will not shadowed by a local variable.dt1998-09-291-7/+7
| | | | | | Now comments will be ignored, rather than put junk in the password database. Broken in: rev. 1.21
* Fix usage stringache1998-06-091-2/+2
|
* Allow specification of cache-size to pwd_mkdbphk1998-04-192-2/+14
| | | | | | PR: 5193 Reviewed by: phk Submitted by: Nick Hilliard <nick@foobar.org>
* Reenable building of /etc/passwd.guido1998-02-191-3/+3
| | | | Pointed out by: "Julie M. Juracich" <julie@xaqti.com>
* Apparently, if fprintf() fails, it can return any negative valueguido1998-02-161-3/+3
| | | | Pointed out by: Bruce
* Check return values of fprintf, fclose (this one is overdone I guess)guido1998-02-151-7/+12
| | | | | | and pw_db->close. PR: 4202 (probably, I askd the submitter) Obtained from: OpenBSD
* Rename the pwd_mkdb(8) option '-c' to '-C' for better compatiblitywosch1998-01-102-9/+9
| | | | with BSD/OS.
* Staticize usage(). Cosmetics.charnier1997-10-103-16/+24
|
* db close routine actually writes data out to disk; return value wasjlemon1997-08-181-2/+4
| | | | | | not being checked. Change code to fail if db->close errors. PR: 4202
* Document the -u option.mpp1997-04-041-1/+6
| | | | Forgotten by: guido
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-1/+1
| | | | posix standard on the topic.
* Fix possible (not stack) overflow from -d <dir> commandline option.davidn1997-03-201-1/+1
|
* Allow comments in password database. The comments are copied fromwosch1997-03-082-4/+26
| | | | | | | | | | | | | the password file into /etc/master.passwd and optional (-p) into /etc/passwd. Enable this feature with the compile option -DPASSWD_IGNORE_COMMENTS. The character `#' introduces a comment. Leading spaces and tabs are ignored: '^[ \t]*#.*\n$' Count an empty line - only spaces, tabs or newline - also as a comment. An empty line at the bottom of /etc/master.passwd is a common novice error and increased my mail load: '^[ \t]*\n$'
OpenPOWER on IntegriCloud