diff options
Diffstat (limited to 'archivers/pax/files/file_subs.c')
-rw-r--r-- | archivers/pax/files/file_subs.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/archivers/pax/files/file_subs.c b/archivers/pax/files/file_subs.c index 3b98e82e7d2..9fe8cf93646 100644 --- a/archivers/pax/files/file_subs.c +++ b/archivers/pax/files/file_subs.c @@ -1,4 +1,4 @@ -/* $NetBSD: file_subs.c,v 1.1.1.1 2003/06/23 11:46:19 grant Exp $ */ +/* $NetBSD: file_subs.c,v 1.2 2003/06/24 08:04:18 grant Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -47,7 +47,7 @@ #if 0 static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: file_subs.c,v 1.1.1.1 2003/06/23 11:46:19 grant Exp $"); +__RCSID("$NetBSD: file_subs.c,v 1.2 2003/06/24 08:04:18 grant Exp $"); #endif #endif /* not lint */ @@ -468,11 +468,7 @@ badlink: /* * we were able to create the node. set uid/gid, modes and times */ -#if HAVE_LCHOWN if (pids) -#else - if (pids && arcn->type != PAX_SLK) -#endif res = set_ids(nm, arcn->sb.st_uid, arcn->sb.st_gid); else res = 0; @@ -484,11 +480,7 @@ badlink: */ if (!pmode || res) arcn->sb.st_mode &= ~(SETBITS); -#if HAVE_LCHMOD if (pmode) -#else - if (pmode && arcn->type != PAX_SLK) -#endif set_pmode(arcn->name, arcn->sb.st_mode); if (arcn->type == PAX_DIR && strcmp(NM_CPIO, argv0) != 0) { @@ -746,12 +738,7 @@ int set_ids(char *fnm, uid_t uid, gid_t gid) { if (geteuid() == 0) -#if HAVE_LCHOWN - if (lchown(fnm, uid, gid)) -#else - if (chown(fnm, uid, gid)) -#endif - { + if (lchown(fnm, uid, gid)) { (void)fflush(listf); syswarn(1, errno, "Cannot set file uid/gid of %s", fnm); @@ -769,12 +756,7 @@ void set_pmode(char *fnm, mode_t mode) { mode &= ABITS; -#if HAVE_LCHMOD - if (lchmod(fnm, mode)) -#else - if (chmod(fnm, mode)) -#endif - { + if (lchmod(fnm, mode)) { (void)fflush(listf); syswarn(1, errno, "Cannot set permissions on %s", fnm); } |