Bug 319231 - /usr/bin/install doesn't set the right context on installed binaries
Summary: /usr/bin/install doesn't set the right context on installed binaries
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
Keywords: Reopened
Depends On:
TreeView+ depends on / blocked
Reported: 2007-10-04 20:49 UTC by Ray Strode [halfline]
Modified: 2008-02-18 16:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-18 16:20:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Ray Strode [halfline] 2007-10-04 20:49:02 UTC

I just did make install while working on rhgb optimization, and came across this:

$ ls -lZ /usr/bin/rhgb
-rwxr-xr-x  root root system_u:object_r:bin_t          /usr/bin/rhgb


$ sudo /sbin/restorecon /usr/bin/rhgb

results in

$ ls -lZ /usr/bin/rhgb
-rwxr-xr-x  root root system_u:object_r:rhgb_exec_t    /usr/bin/rhgb

Comment 1 Daniel Walsh 2007-10-04 20:54:10 UTC
THere used to be a builtin matchpathcon/setfscreatecon before creating the
destination file.  This is similar to rpm, so  I think it should set the correct
file context.  It should fail over to not setting the file context if it can't
retrieve it.

Comment 2 Ray Strode [halfline] 2007-10-04 20:57:16 UTC
for reference, the relevant make install output is:

/usr/bin/install -c rhgb /usr/bin/rhgb

Comment 3 Ondrej Vasik 2007-11-13 15:20:33 UTC
Fixed in coreutils-6.9-13.fc9 , will backport to lower fedoras, closing RAWHIDE.

Comment 4 Ray Strode [halfline] 2008-02-14 20:51:12 UTC
seems to be broken in


I did a make install today for gdm and when i restarted gdm users logging in got
the wrong context making it so that nm-applet couldn't talk over d-bus to
NetworkManager with messages like:

security:  context user_u:system_r:unconfined_dbusd_t:s0 is invalid

Comment 5 Ray Strode [halfline] 2008-02-14 20:52:05 UTC
before make install:

$ ls -lZ /usr/sbin/gdm-binary 
-rwxr-xr-x  root root system_u:object_r:xdm_exec_t:s0  /usr/sbin/gdm-binary


$ ls -lZ /usr/sbin/gdm-binary 
-rwxr-xr-x  root root user_u:object_r:bin_t:s0         /usr/sbin/gdm-binary

Comment 6 Ondrej Vasik 2008-02-15 07:05:47 UTC
Thanks for report, it is possible, because upstream implemented many things in
different way than RedHat and there may be some implementation conflicts. Will
check it and hopefully fix that asap...

Comment 7 Ondrej Vasik 2008-02-18 16:20:15 UTC
Fixed again in coreutils-6.10-8.fc9 , caused by upstream changes. Closing RAWHIDE.

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