Bug 142083 - hardlinked file permissions, warning?
hardlinked file permissions, warning?
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
medium Severity low
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-07 01:36 EST by Nigel Kukard
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-12 11:20:19 EST
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 Nigel Kukard 2004-12-07 01:36:05 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20041012

Description of problem:
When building an RPM package, if a file is installed to RPM_BUILD_ROOT
and hardlinked to another file name and an %{attr} statement added to
the first one, rpm does a double chown/chmod and resets permissions on
the first one.

for instance (in the %install section)...

touch RPM_BUILD_ROOT/sbin/a
chmod 644 RPM_BUILD_ROOT/sbin/a
ln RPM_BUILD_ROOT/sbin/a RPM_BUILD_ROOT/sbin/b

in the %files section...

%attr(0755,root,root) /sbin/a
/sbin/b


when installed both files with be 0644.

this is not really a bug in rpm, but maybe a warning would be a good idea?


Version-Release number of selected component (if applicable):
rpm-4.3.3 & rpm-4.4

How reproducible:
Always

Steps to Reproduce:
1.create an rpm specfile which hardlinks one file to another name
2.create an attr statement  for first file and leave second file
without an %attr() statement
3.install rpm
    

Actual Results:  both files are set with default permissions of second
file above

Expected Results:  maybe a warning message?

Additional info:
Comment 2 Jeff Johnson 2006-02-12 11:20:19 EST
There are a vanishingly small number of packages attempting both hardlinks
and %attr, so the work detecting different %attr modifiers on hardlinks is not
worth the effort imho.

The command
     rpm -V pkg
will detect multiple %attr apllied to hardlinks.

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