cache.c (c9a8d1f4ddce0e113129507ab55689b6e922f60d) cache.c (46be34b90213ebd9037cb2c24aec0009d7f2f5c1)
1/*-
2 * Copyright (c) 1992 Keith Muller.
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

--- 26 unchanged lines hidden (view full) ---

35 * SUCH DAMAGE.
36 */
37
38#ifndef lint
39#if 0
40static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93";
41#endif
42static const char rcsid[] =
1/*-
2 * Copyright (c) 1992 Keith Muller.
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

--- 26 unchanged lines hidden (view full) ---

35 * SUCH DAMAGE.
36 */
37
38#ifndef lint
39#if 0
40static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93";
41#endif
42static const char rcsid[] =
43 "$Id$";
43 "$Id: cache.c,v 1.10 1998/05/15 06:27:37 charnier Exp $";
44#endif /* not lint */
45
46#include <sys/types.h>
47#include <sys/stat.h>
48#include <string.h>
49#include <stdio.h>
50#include <pwd.h>
51#include <grp.h>

--- 178 unchanged lines hidden (view full) ---

230 ++pwopn;
231 }
232 if (ptr == NULL)
233 ptr = (UIDC *)malloc(sizeof(UIDC));
234
235 if ((pw = getpwuid(uid)) == NULL) {
236 /*
237 * no match for this uid in the local password file
44#endif /* not lint */
45
46#include <sys/types.h>
47#include <sys/stat.h>
48#include <string.h>
49#include <stdio.h>
50#include <pwd.h>
51#include <grp.h>

--- 178 unchanged lines hidden (view full) ---

230 ++pwopn;
231 }
232 if (ptr == NULL)
233 ptr = (UIDC *)malloc(sizeof(UIDC));
234
235 if ((pw = getpwuid(uid)) == NULL) {
236 /*
237 * no match for this uid in the local password file
238 * a string that is the uid in numberic format
238 * a string that is the uid in numeric format
239 */
240 if (ptr == NULL)
241 return("");
242 ptr->uid = uid;
243 ptr->valid = INVALID;
244# ifdef NET2_STAT
245 (void)sprintf(ptr->name, "%u", uid);
246# else

--- 60 unchanged lines hidden (view full) ---

307 ++gropn;
308 }
309 if (ptr == NULL)
310 ptr = (GIDC *)malloc(sizeof(GIDC));
311
312 if ((gr = getgrgid(gid)) == NULL) {
313 /*
314 * no match for this gid in the local group file, put in
239 */
240 if (ptr == NULL)
241 return("");
242 ptr->uid = uid;
243 ptr->valid = INVALID;
244# ifdef NET2_STAT
245 (void)sprintf(ptr->name, "%u", uid);
246# else

--- 60 unchanged lines hidden (view full) ---

307 ++gropn;
308 }
309 if (ptr == NULL)
310 ptr = (GIDC *)malloc(sizeof(GIDC));
311
312 if ((gr = getgrgid(gid)) == NULL) {
313 /*
314 * no match for this gid in the local group file, put in
315 * a string that is the gid in numberic format
315 * a string that is the gid in numeric format
316 */
317 if (ptr == NULL)
318 return("");
319 ptr->gid = gid;
320 ptr->valid = INVALID;
321# ifdef NET2_STAT
322 (void)sprintf(ptr->name, "%u", gid);
323# else

--- 157 unchanged lines hidden ---
316 */
317 if (ptr == NULL)
318 return("");
319 ptr->gid = gid;
320 ptr->valid = INVALID;
321# ifdef NET2_STAT
322 (void)sprintf(ptr->name, "%u", gid);
323# else

--- 157 unchanged lines hidden ---