From: Mark Huang Date: Wed, 17 Jan 2007 22:44:17 +0000 (+0000) Subject: do not dereference symlinks when chowning files back to the SUDO_USER X-Git-Tag: planetlab-4_0-rc1~4 X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=commitdiff_plain;h=575a3ae9c0c03017aed72a89446c5b81fa11d189 do not dereference symlinks when chowning files back to the SUDO_USER --- diff --git a/bootmanager.spec b/bootmanager.spec index 8794128..b76ab5a 100644 --- a/bootmanager.spec +++ b/bootmanager.spec @@ -59,12 +59,12 @@ rm -rf $RPM_BUILD_ROOT # If run under sudo if [ -n "$SUDO_USER" ] ; then # Allow user to delete the build directory - chown -R $SUDO_USER . + chown -h -R $SUDO_USER . # Some temporary cdroot files like /var/empty/sshd and # /usr/bin/sudo get created with non-readable permissions. find . -not -perm +0600 -exec chmod u+rw {} \; # Allow user to delete the built RPM(s) - chown -R $SUDO_USER %{_rpmdir}/%{_arch} + chown -h -R $SUDO_USER %{_rpmdir}/%{_arch} fi %post