Bug 15631 - --setugids doesn't set gid on symlinks
--setugids doesn't set gid on symlinks
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2000-08-07 08:15 EDT by bac
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-07 08:15:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description bac 2000-08-07 08:15:31 EDT
--setugids is provided by a popt alias in /usr/lib/rpm/rpmpopt, and calls
chown and chgrp through the shell.  However, it does not pass the -h option
to chgrp (the docs only say that this is the default for chown) and so the
gid is not correctly set on symbolic links.

Fix: add -h option for chgrp.

Also, a quick inspection of rpm 4.0 suggests it has the same problem.
Comment 1 Jeff Johnson 2001-05-24 09:49:49 EDT
Yup, there are similar problems with the chgrp -R run at the end of
a %prep during build.

I don't believe the problem is worth fixing because:
	1) Do you really care about the gid of symlinks? If so,
	copy the line from /usr/lib/rpm/rpmpopt-* to either
	/etc/popt or ~/.popt and be happy.
	2) -h is not universally supported, and there's
	a lot of pain in trying to factor the right flags
	everywhere under all possible uglixes.
	3) Early versions of linux dinna support lchown(2)
	correctly, so it's excruciatingly painful to get a
	dynamic runtime test to detect whether lchown(2)
	is functional into the popt magic glue that
	performs --setugids.

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