--setugids uses separate chown and chgrp commands
authorewt <devnull@localhost>
Sun, 8 Feb 1998 17:30:10 +0000 (17:30 +0000)
committerewt <devnull@localhost>
Sun, 8 Feb 1998 17:30:10 +0000 (17:30 +0000)
CVS patchset: 2000
CVS date: 1998/02/08 17:30:10

rpmpopt

diff --git a/rpmpopt b/rpmpopt
index 9938bf0..0f800ee 100644 (file)
--- a/rpmpopt
+++ b/rpmpopt
@@ -24,8 +24,9 @@ rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILE
                   --pipe "grep -v \(none\) | sed 's/chmod .../chmod /' | sh"
 
 rpm alias --setugids -q --qf \
-                  'chown %{FILEUSERNAME:shescape}:%{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n' \
-                  --pipe "grep -v \(none\) | sh"
+        '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
+        --pipe "(echo 'ch() { chown $1 $3;chgrp $2 $3; }';grep -v \(none\))|sh"
+
 
 rpm alias --requires --qf \
            "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]"