Bug 15631 - --setugids doesn't set gid on symlinks
Summary: --setugids doesn't set gid on symlinks
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.1
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-07 12:15 UTC by bac
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-08-07 12:15:32 UTC
Embargoed:


Attachments (Terms of Use)

Description bac 2000-08-07 12:15:31 UTC
--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 13:49:49 UTC
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.