Deleted Added
full compact
cache.c (76017) cache.c (76351)
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 "$FreeBSD: head/bin/pax/cache.c 76017 2001-04-26 08:37:00Z kris $";
43 "$FreeBSD: head/bin/pax/cache.c 76351 2001-05-08 06:19:06Z kris $";
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>

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

383 }
384
385 if (!pwopn) {
386 setpassent(1);
387 ++pwopn;
388 }
389
390 if (ptr == NULL)
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>

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

383 }
384
385 if (!pwopn) {
386 setpassent(1);
387 ++pwopn;
388 }
389
390 if (ptr == NULL)
391 ptr = (UIDC *)malloc(sizeof(UIDC));
391 ptr = usrtb[st_hash(name, namelen, UNM_SZ)] =
392 (UIDC *)malloc(sizeof(UIDC));
392
393 /*
394 * no match, look it up, if no match store it as an invalid entry,
395 * or store the matching uid
396 */
397 if (ptr == NULL) {
398 if ((pw = getpwnam(name)) == NULL)
399 return(-1);

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

452 return(0);
453 }
454
455 if (!gropn) {
456 setgroupent(1);
457 ++gropn;
458 }
459 if (ptr == NULL)
393
394 /*
395 * no match, look it up, if no match store it as an invalid entry,
396 * or store the matching uid
397 */
398 if (ptr == NULL) {
399 if ((pw = getpwnam(name)) == NULL)
400 return(-1);

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

453 return(0);
454 }
455
456 if (!gropn) {
457 setgroupent(1);
458 ++gropn;
459 }
460 if (ptr == NULL)
460 ptr = (GIDC *)malloc(sizeof(GIDC));
461 ptr = grptb[st_hash(name, namelen, GID_SZ)] =
462 (GIDC *)malloc(sizeof(GIDC));
461
462 /*
463 * no match, look it up, if no match store it as an invalid entry,
464 * or store the matching gid
465 */
466 if (ptr == NULL) {
467 if ((gr = getgrnam(name)) == NULL)
468 return(-1);

--- 14 unchanged lines hidden ---
463
464 /*
465 * no match, look it up, if no match store it as an invalid entry,
466 * or store the matching gid
467 */
468 if (ptr == NULL) {
469 if ((gr = getgrnam(name)) == NULL)
470 return(-1);

--- 14 unchanged lines hidden ---