Commit Graph

19 Commits

Author SHA1 Message Date
mjl 183e61b9cf Use /bin/sh to take care of the EDITOR command parsing instead of home
grown method. Fixes PR/8935 by myself. Fix is from OpenBSD. Also pull
in a couple of minor changes like checking the return value of vfork().
1999-12-03 16:23:58 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem e97b67a374 remove diagnostic check for name==NULL; it's ok to call pw_error() in this case 1999-09-17 01:28:12 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
christos 983a6b1f22 Delint 1998-12-09 14:35:02 +00:00
christos 6f4f1ab0ad Preserve the correct errno so that programs know the reason we failed. 1998-09-26 23:59:40 +00:00
thorpej 8d7b6b5dae Add some braces to make egcs happy. 1998-08-19 00:52:18 +00:00
lukem 32e5dd1f22 move pw_scan() out of here (into libc)
document _PASSWORD_NOWARN and _PASSWORD_OLDFMT inflags to pw_scan()
1998-06-08 03:12:45 +00:00
thorpej fbb903995d Change an exit() to _exit(), so that it's safe for vfork(). 1997-12-31 05:47:15 +00:00
phil 01d72f4add Change pw_copy to take an optional 4th parameter (old_pw), a pointer
to a passwd structure.  If a good pointer, make sure old entry in file
is identical to passed passwd (old_pw).  If not, abort.

Update documentation, bump major version due to change to pw_copy.
1997-07-24 08:50:31 +00:00
christos bb4dad4f04 PR/3832: Enami Tsugutomo: passwd.c will not compile on NetBSD/alpha 1997-07-06 18:17:21 +00:00
christos f5646a08d4 - RCSID police
- Add ttymsg.3
1997-06-29 18:44:03 +00:00
mikel 6aa3be2874 add parens for gcc -Wall 1997-06-20 06:17:27 +00:00
lukem ad8e075042 in pw_scan(), parse [gu]id with strtoul() instead of atoi(), and sanity
check a) the parsed value was just a number, b) it doesn't exceed [GU]ID_MAX
1997-05-22 03:08:42 +00:00
mycroft 8feb354e12 Pull in err.h for prototypes. 1997-05-09 18:37:45 +00:00
mycroft 9ba4365fce Allow the full range of UIDs and GIDs. 1997-04-23 18:51:17 +00:00
thorpej 3fe99e29ea Deal with complex EDITOR strings (e.g. `pico -t'). Fixes PR #2520. 1996-12-09 22:23:34 +00:00
ghudson e257708bf2 Don't delete the lock file if pwd_mkdb fails. The caller will take care
of it by calling pw_abort() or pw_error() as appropriate.
1996-06-02 19:25:43 +00:00
jtc e42a94845a Minor reorganization of libutil, including the addition of passward
locking and editing functions.
From Greg Hudson <ghudson@MIT.EDU>
1996-05-15 21:42:23 +00:00