summaryrefslogtreecommitdiffstats
path: root/security/krb5
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2002-08-17 00:29:41 +0000
committercy <cy@FreeBSD.org>2002-08-17 00:29:41 +0000
commit626f346408ac9798018f1e9ea45e9863a4b7f549 (patch)
tree0fa6af9ac59f8f58b18072c31a071e2319ccccdf /security/krb5
parent8dba377441804ae2ba5f93e5238ebd6e74e75839 (diff)
downloadFreeBSD-ports-626f346408ac9798018f1e9ea45e9863a4b7f549.zip
FreeBSD-ports-626f346408ac9798018f1e9ea45e9863a4b7f549.tar.gz
Fix extract for non-root users.
Noticed by: nectar Pointy hat to: cy
Diffstat (limited to 'security/krb5')
-rw-r--r--security/krb5/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/security/krb5/Makefile b/security/krb5/Makefile
index 5406f50..54537d1 100644
--- a/security/krb5/Makefile
+++ b/security/krb5/Makefile
@@ -81,8 +81,12 @@ do-fetch:
post-extract:
@${TAR} -C ${WRKDIR} -xzf ${WRKDIR}/${DISTNAME}.tar.gz
@${RM} ${WRKDIR}/${DISTNAME}.tar.gz ${WRKDIR}/${DISTNAME}.tar.gz.asc
- @${CHMOD} -R ug-s,go-w ${WRKDIR}/${DISTNAME}
- @${CHOWN} -R 0:0 ${WRKDIR}/${DISTNAME}
+.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
+ @if [ `id -u` = 0 ]; then \
+ ${CHMOD} -R ug-s,go-w ${WRKDIR}/${DISTNAME}; \
+ ${CHOWN} -R 0:0 ${WRKDIR}/${DISTNAME}; \
+ fi
+.endif
.endif
pre-build:
OpenPOWER on IntegriCloud