diff options
author | cy <cy@FreeBSD.org> | 2002-08-17 00:29:41 +0000 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2002-08-17 00:29:41 +0000 |
commit | 626f346408ac9798018f1e9ea45e9863a4b7f549 (patch) | |
tree | 0fa6af9ac59f8f58b18072c31a071e2319ccccdf /security/krb5-16 | |
parent | 8dba377441804ae2ba5f93e5238ebd6e74e75839 (diff) | |
download | FreeBSD-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-16')
-rw-r--r-- | security/krb5-16/Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/security/krb5-16/Makefile b/security/krb5-16/Makefile index 5406f50..54537d1 100644 --- a/security/krb5-16/Makefile +++ b/security/krb5-16/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: |