Commit Graph

20 Commits

Author SHA1 Message Date
christos 11cac2080a Add missing prototypes
Fix RCSID's
Fix gcc warnings
1997-07-13 19:01:22 +00:00
lukem 76c3314d9b a valid uid/gid *ends* in \0 (i.e, barf if (*ep != '\0'), not if (*ep == '\0')) 1997-05-22 10:38:07 +00:00
lukem 50820e9b86 * parse gid with strtoul() instead of atoi(), and sanity check a) the parsed
value was just a number, b) it doesn't exceed GID_MAX
* convert gid to a string with %u not %d
* use [gu]id_t instead of int
1997-05-22 03:24:37 +00:00
lukem 8041f4f4ab fix potential memory leaks: before calling yp_next(), reset key to NULL. if
an error occurred, and key != NULL, free(key).
1997-05-21 01:51:39 +00:00
lukem 27d1a6365b * ensure that "outdata" values to various yp_xxx() functions are set
to the null pointer before invocation, so that the test in the
  error case of "if (outdata != NULL) free(outdata)" won't potentially
  try and free memory that wasn't malloc()ed.
* factor some duplicated code out of both parts of an "if {} else {}"
  construct.
* remove use of `register' & KNFify.
1997-05-20 15:46:03 +00:00
thorpej 30ec3e8a63 Don't transfer the entire YP database using yp_{first,next}(); instead
use yp_match(), which is much more efficient.

From Michael.Eriksson@era-t.ericsson.se, PR #3114.
1997-01-22 01:21:06 +00:00
cgd 7edc9015ae grscan()'s last arg has to be a const char *, not just a char * 1996-12-20 19:38:16 +00:00
phil e69d413643 Improvements to YP support from Jason Downs. 1995-07-28 05:43:01 +00:00
pk a63744d63c Speed up getgrnam() and getgrpid() by using yp_match(). 1995-03-16 11:48:01 +00:00
cgd b585e843ca update from Lite, with local changes. fix Ids, etc. 1995-02-27 04:12:15 +00:00
deraadt 8b4fd14bfb be lenient; let a few other forms of + activate YP 1994-08-02 05:15:25 +00:00
deraadt 02fe919c29 avoid core dump 1994-07-29 18:54:17 +00:00
deraadt 46703c8a4d better, more forgiving solution to previous problem. 1994-03-07 00:58:10 +00:00
deraadt 90250ee80b fix small obscure YP buglet, and properly terminate gr_mem 1994-03-06 09:04:11 +00:00
jtc 9bd83209f0 Change C library functions to use strchr() and strrchr() instead of index()
and rindex().  This will allow (strict {ANSI, POSIX, XOPEN}) applications
to redefine index() and rindex() without effecting the library internals.
1993-11-24 19:43:49 +00:00
jtc 71afdb430b Update source and manual pages to match X/Open 1170 specification.
Updated setpassent() to understand YP (a bug), and changed setpwent()
to simply be a call to setpassent(0) (to remove duplicated code).
1993-10-25 23:36:51 +00:00
jtc 9c20f740a3 Declare rcsid strings so they are stored in text segment. 1993-08-26 00:43:03 +00:00
mycroft f23f94cb77 Add even more RCS frobs. 1993-07-30 08:21:41 +00:00
deraadt 3cbc24e4f9 I was horrified to find these had not been commited with the YP changes. 1993-05-04 05:10:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00