summaryrefslogtreecommitdiff
path: root/archivers/pax
diff options
context:
space:
mode:
authorgrant <grant>2003-06-24 08:04:18 +0000
committergrant <grant>2003-06-24 08:04:18 +0000
commit2542f03ef849c3bca01a65f02eb887bf4bc3957d (patch)
tree0f403ad4fff9c89f2a653b0ab3f84cf7dde45be0 /archivers/pax
parent61235207cebf619f89505abfa0a0b40cb82e62f6 (diff)
downloadpkgsrc-2542f03ef849c3bca01a65f02eb887bf4bc3957d.tar.gz
sync with -current
file_subs.c 1.33 pax.h 1.19
Diffstat (limited to 'archivers/pax')
-rw-r--r--archivers/pax/files/file_subs.c26
-rw-r--r--archivers/pax/files/pax.h4
2 files changed, 5 insertions, 25 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);
}
diff --git a/archivers/pax/files/pax.h b/archivers/pax/files/pax.h
index 2439f20ec9e..a36105356ce 100644
--- a/archivers/pax/files/pax.h
+++ b/archivers/pax/files/pax.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pax.h,v 1.1.1.1 2003/06/23 11:46:33 grant Exp $ */
+/* $NetBSD: pax.h,v 1.2 2003/06/24 08:04:19 grant Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,8 +42,6 @@
#if HAVE_CONFIG_H
#include "config.h"
#else
-#define HAVE_LCHMOD 1
-#define HAVE_LCHOWN 1
#define HAVE_LUTIMES 1
#define HAVE_STRUCT_STAT_ST_FLAGS 1
#endif