Bug 457127 - rpm --setperms --setugids don't work together
rpm --setperms --setugids don't work together
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: rpm (Show other bugs)
4.7
All Linux
low Severity low
: rc
: ---
Assigned To: Panu Matilainen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-29 15:30 EDT by Charlie Brady
Modified: 2012-06-20 09:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:31:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Charlie Brady 2008-07-29 15:30:45 EDT
I have some setuid scripts, and --setperms and --setugids separately aren't able
to restore group and mode to correct values:

[root@yoda ~]# rpm -V mitel-os-manager
.M....G.    /etc/e-smith/web/functions/index.cgi
.M....G.    /etc/e-smith/web/functions/initial.cgi
.M....G.    /etc/e-smith/web/functions/navigation
[root@yoda ~]# rpm --setperms mitel-os-manager
[root@yoda ~]# rpm -V mitel-os-manager
......G.    /etc/e-smith/web/functions/index.cgi
......G.    /etc/e-smith/web/functions/initial.cgi
......G.    /etc/e-smith/web/functions/navigation
[root@yoda ~]# rpm --setugids mitel-os-manager
[root@yoda ~]# rpm -V mitel-os-manager
.M....G.    /etc/e-smith/web/functions/index.cgi
.M....G.    /etc/e-smith/web/functions/initial.cgi
.M....G.    /etc/e-smith/web/functions/navigation
[root@yoda ~]# 

So --setugids isn't correcting the wrong group, and is breaking the setuid bit
which was previously restored by setperms.

If I try the two in combination, there are errors whichever order I use:

...
[root@yoda ~]# rpm --setperms --setugids mitel-os-manager
chmod: invalid mode string: `0040755'
chmod: invalid mode string: `0040755'
chmod: invalid mode string: `0040755'
chmod: invalid mode string: `0040755'
...

...
[root@yoda ~]# rpm --setugids --setperms mitel-os-manager
sh: line 1: ch: command not found
sh: line 2: ch: command not found
sh: line 3: ch: command not found
sh: line 4: ch: command not found
sh: line 5: ch: command not found
sh: line 6: ch: command not found
sh: line 7: ch: command not found
sh: line 8: ch: command not found
sh: line 9: ch: command not found
...
Comment 1 Jiri Pallich 2012-06-20 09:31:58 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

Note You need to log in before you can comment on or make changes to this bug.