aboutsummaryrefslogtreecommitdiffstats
path: root/security/krb5-appl
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2002-08-17 08:29:41 +0800
committercy <cy@FreeBSD.org>2002-08-17 08:29:41 +0800
commit626f346408ac9798018f1e9ea45e9863a4b7f549 (patch)
tree0fa6af9ac59f8f58b18072c31a071e2319ccccdf /security/krb5-appl
parent8dba377441804ae2ba5f93e5238ebd6e74e75839 (diff)
downloadfreebsd-ports-gnome-626f346408ac9798018f1e9ea45e9863a4b7f549.tar.gz
freebsd-ports-gnome-626f346408ac9798018f1e9ea45e9863a4b7f549.tar.zst
freebsd-ports-gnome-626f346408ac9798018f1e9ea45e9863a4b7f549.zip
Fix extract for non-root users.
Noticed by: nectar Pointy hat to: cy
Diffstat (limited to 'security/krb5-appl')
-rw-r--r--security/krb5-appl/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/security/krb5-appl/Makefile b/security/krb5-appl/Makefile
index 5406f50c601c..54537d1bcaa2 100644
--- a/security/krb5-appl/Makefile
+++ b/security/krb5-appl/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: