diff options
author | Cy Schubert <cy@FreeBSD.org> | 2002-08-17 00:29:41 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2002-08-17 00:29:41 +0000 |
commit | 9c4b0991387ce808f05daeb077d582ced2700cda (patch) | |
tree | 9fb27d7b030acf219c43f316f7b47872e45ec948 /security | |
parent | remove perllocal.pod from pkg-plist (diff) |
Fix extract for non-root users.
Noticed by: nectar
Pointy hat to: cy
Notes
Notes:
svn path=/head/; revision=64594
Diffstat (limited to 'security')
-rw-r--r-- | security/krb5-16/Makefile | 8 | ||||
-rw-r--r-- | security/krb5-17/Makefile | 8 | ||||
-rw-r--r-- | security/krb5-appl/Makefile | 8 | ||||
-rw-r--r-- | security/krb5/Makefile | 8 |
4 files changed, 24 insertions, 8 deletions
diff --git a/security/krb5-16/Makefile b/security/krb5-16/Makefile index 5406f50c601c..54537d1bcaa2 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: diff --git a/security/krb5-17/Makefile b/security/krb5-17/Makefile index 5406f50c601c..54537d1bcaa2 100644 --- a/security/krb5-17/Makefile +++ b/security/krb5-17/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: 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: diff --git a/security/krb5/Makefile b/security/krb5/Makefile index 5406f50c601c..54537d1bcaa2 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: |