Commit Graph

76 Commits

Author SHA1 Message Date
cgzones da1ea093cb corecommands: label some binaries as bin_t 2017-02-16 17:05:26 +01:00
Russell Coker 5a6251efc6 tiny mon patch
When you merged the mon patch you removed the ability for mon_t to execute
lib_t files.

The following patch re-enables the ability to execute alert scripts.
2017-02-15 18:51:39 -05:00
Chris PeBenito 69da46ae18 usrmerge FC fixes from Russell Coker. 2017-02-07 18:51:58 -05:00
Chris PeBenito 2e7553db63 Create / to /usr equivalence for bin, sbin, and lib, from Russell Coker. 2017-02-04 15:19:35 -05:00
Nicolas Iooss 85d678bd2f
Add file contexts in /usr for /bin, /usr/sbin and /usr/lib
Some policy modules define file contexts in /bin, /sbin and /lib without
defining similar file contexts in the same directory under /usr.

Add these missing file contexts when there are outside ifdef blocks.
2016-12-27 17:06:54 +01:00
Garrett Holmstrom 58ac82612d corecmd: Remove fcontext for /etc/sysconfig/libvirtd
/etc/sysconfig/libvirtd does not have the executable bit set, so it does
not make sense for it to be labelled bin_t.  I can't seem to find the
reason it was set that way originally.

Signed-off-by: Garrett Holmstrom <gholms@devzero.com>
2016-06-30 20:34:49 -04:00
Laurent Bigonville af61f22e24 Add some labels for SELinux tools path in Debian 2016-03-25 22:35:17 +01:00
Nicolas Iooss e43b1e2ffc Do not label /usr/lib/gvfs/libgvfscommon.so as bin_t
On Arch Linux, /usr/lib/gvfs directory contains both executable files
(gvfsd, gvfs-udisks2-volume-monitor...) and libraries (libgvfscommon.so
and libgvfsdaemon.so).  As all executable files are prefixed with
"gfvs", so use this to distinguish them with the libraries.

This fixes the following AVC denials, reported from geoclue service
using a library wrongly labelled bin_t:

    avc:  denied  { read } for  pid=14872 comm="geoclue"
    name="libgvfscommon.so" dev="dm-0" ino=3152594
    scontext=system_u:system_r:geoclue_t
    tcontext=system_u:object_r:bin_t tclass=file permissive=1

    avc:  denied  { open } for  pid=14872 comm="geoclue"
    path="/usr/lib/gvfs/libgvfscommon.so" dev="dm-0" ino=3152594
    scontext=system_u:system_r:geoclue_t
    tcontext=system_u:object_r:bin_t tclass=file permissive=1

     avc:  denied  { execute } for  pid=14872 comm="geoclue"
     path="/usr/lib/gvfs/libgvfscommon.so" dev="dm-0" ino=3152594
     scontext=system_u:system_r:geoclue_t
     tcontext=system_u:object_r:bin_t tclass=file permissive=1
2016-03-19 10:39:17 +01:00
Nicolas Iooss 4b1cd5b369 Label some user session DBus services as bin_t 2016-03-19 10:39:17 +01:00
Nicolas Iooss 2cedfc0ada Label gedit plugins properly on Arch Linux 2016-03-19 10:39:17 +01:00
Nicolas Iooss 55f64a8112 Label system-config-printer applet properly on Arch Linux
It is used by system-config-printer, as shown by these AVC denials:

    avc:  denied  { execute } for  pid=1061 comm="system-config-p"
    name="applet.py" dev="dm-0" ino=9568316
    scontext=sysadm_u:sysadm_r:sysadm_t tcontext=system_u:object_r:usr_t
    tclass=file permissive=1

    avc:  denied  { execute_no_trans } for  pid=1061
    comm="system-config-p"
    path="/usr/share/system-config-printer/applet.py" dev="dm-0"
    ino=9568316 scontext=sysadm_u:sysadm_r:sysadm_t
    tcontext=system_u:object_r:usr_t tclass=file permissive=1
2016-03-19 10:39:17 +01:00
Nicolas Iooss 90599ef760 Label TexLive scripts bin_t
These scripts can be run by users.
2016-03-19 10:39:17 +01:00
Chris PeBenito 5922346539 Merge branch 'systemd-1' of git://github.com/bigon/refpolicy into bigon-systemd-1 2016-01-06 09:13:47 -05:00
Nicolas Iooss 3505a51d76 Label OpenSSH files correctly on Arch Linux
On Arch Linux, OpenSSH installs these binary files in /usr/lib/ssh:

* sftp-server (labeled with ssh_keysign_exec_t type in refpolicy)
* ssh-askpass (symlink to x11-ssh-askpass)
* ssh-keysign
* ssh-pkcs11-helper
* x11-ssh-askpass (from x11-ssh-askpass package)

Label all these files but sftp-server as bin_t.
2016-01-05 13:22:52 -05:00
Laurent Bigonville c0e95ed326 On Debian, systemd binaries are installed in / not /usr
On Debian, systemd binaries are installed in / not /usr, add an
equivalence for this.
2015-12-14 22:52:47 +01:00
Chris PeBenito 3639880cf6 Implement core systemd policy.
Significant contributions from the Tresys CLIP team.

Other changes from Laurent Bigonville.
2015-10-23 10:16:59 -04:00
Luis Ressel fd5e40b047 Mark APR build scripts as bin_t
I don't know why those are in /usr/share/build-1/ instead of
/usr/share/apr-0/build/ here, but it doesn't appear to be
Gentoo-specific.
2015-08-11 08:42:25 -04:00
Sven Vermeulen 29292968fe xfce4-notifyd is an executable 2014-12-02 09:16:05 -05:00
Nicolas Iooss 28658963c3 Label /usr/lib/networkmanager/ like /usr/lib/NetworkManager/
On ArchLinux the directory name of Network Manager in /usr/lib is
written in lowercase but not the files in /usr/bin, /var/lib, etc.

While at it, remove a useless backslash before a minus character.
2014-08-26 08:08:41 -04:00
Chris PeBenito a3a64ffced Move tumblerd fc entry 2014-06-30 15:28:51 -04:00
Jason Zaman 724eff0b5e File Context for tumbler
Tumbler is a D-Bus service for applications to request thumbnails

Signed-off-by: Jason Zaman <jason@perfinion.com>
2014-06-30 14:38:59 -04:00
Sven Vermeulen 622c11fae4 Enable rcs2log location for all distributions
Currently, the /usr/share/cvs/contrib/rcs2log is only labeled as bin_t
for redhat distributions. Moving this to the general one as it is also
in use on other distributions

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2014-06-02 11:08:17 -04:00
Nicolas Iooss 9427fc3ce1 Label /usr/lib/getconf as bin_t
On ArchLinux, glibc package installs /usr/bin/getconf as a hard link to a file
in /usr/lib/getconf/.  For example on a x86_64 machine:

    $ ls -i -l /usr/bin/getconf /usr/lib/getconf/XBS5_LP64_OFF64
    5900355 -rwxr-xr-x. 4 root root 22880 Feb 28 04:53 /usr/bin/getconf
    5900355 -rwxr-xr-x. 4 root root 22880 Feb 28 04:53 /usr/lib/getconf/XBS5_LP64_OFF64

Such configuration produces an instability when labeling the files with
"restorecon -Rv /":

    restorecon reset /usr/bin/getconf context unconfined_u:object_r:lib_t:s0->unconfined_u:object_r:bin_t:s0
    restorecon reset /usr/lib/getconf/XBS5_LP64_OFF64 context unconfined_u:object_r:bin_t:s0->unconfined_u:object_r:lib_t:s0

As /usr/lib/getconf directory only contains executable programs, this issue is
fixed by labeling this directory and its content "bin_t".
2014-04-21 10:15:51 -04:00
Laurent Bigonville 81570b1eb4 Properly label git-shell and other git commands for Debian 2014-03-14 11:14:43 -04:00
Nicolas Iooss f003497bcb Label /usr/lib/sudo/sesh as shell_exec_t 2014-02-08 09:50:09 -05:00
Chris PeBenito f097b7ab4e Move bin_t fc from couchdb to corecommands. 2014-02-08 09:42:43 -05:00
Dominick Grift ceb6e7fcfb corecmd: avahi-daemon executes /usr/lib/avahi/avahi-daemon-check-dns.sh
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-09-26 10:32:23 -04:00
Laurent Bigonville 6a62fd0acb Label nut drivers that are installed in /lib/nut on Debian as bin_t 2013-01-23 07:12:48 -05:00
Laurent Bigonville 20e47b2f4e Label executables under /usr/lib/gnome-settings-daemon/ as bin_t
On Debian, part of gnome-settings-daemon is installed in that
directory
2013-01-23 07:12:34 -05:00
Laurent Bigonville bb00509804 Label executables in /usr/lib/NetworkManager/ as bin_t 2013-01-23 07:09:24 -05:00
Mika Pflüger 8b1aa69f1f Debian locations of gvfs and kde4 libexec binaries in /usr/lib 2012-10-19 08:40:16 -04:00
Laurent Bigonville da349a2cfa Add Debian location for udisks helpers 2012-09-17 10:31:39 -04:00
Laurent Bigonville 31daa917db Add Debian locations for GDM 3 2012-09-17 10:31:38 -04:00
Sven Vermeulen 8e678aa594 Use substititions for /usr/local/lib and /etc/init.d
Introduce the substitutions for the /usr/local/lib* locations (towards /usr/lib)
and /etc/init.d (towards /etc/rc.d/init.d).

Update the file contexts of the translated locations.

Rebased (collided with Guido's patch for commenting within the
file_contexts.subs_dist file) since v3.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-08-15 10:30:25 -04:00
Chris PeBenito b70d528401 Mcelog update from Guido Trentalancia. 2012-08-08 08:44:07 -04:00
Chris PeBenito aac94b0e40 Whitespace fixes from fc.subs changes. 2012-05-10 10:33:54 -04:00
Chris PeBenito 41ff913f44 Remove duplicate fc definition for firefox. 2012-05-10 10:33:30 -04:00
Sven Vermeulen b55726771e Simplify .fc in light of file_contexts.subs_dist
Now that we have file_contexts.subs_dist, translations that were put in the file context definition files can now be
cleaned up.

Differences from v1:
- removes a few duplicate entries in the libraries.fc file, and
- removes the contrib references

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2012-05-10 10:09:00 -04:00
Chris PeBenito e78ada8605 Debian file locations patch from Russell Coker. 2011-11-16 15:29:18 -05:00
Chris PeBenito a83b53041e Rearrange xfce corecommands fc entries. 2011-08-24 09:07:34 -04:00
Sven Vermeulen 7901eb059b Update file contexts for xfce4 helper applications
Many XFCE4 helper applications are located in /usr/lib locations. This patch
marks those helpers as bin_t.

Recursively marking the directories bin_t does not work properly as these
locations also contain actual libraries.

Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
2011-08-24 08:56:47 -04:00
Chris PeBenito 003dbe0c66 Cyrus file context update for Gentoo from Corentin Labbe. 2011-06-08 08:51:55 -04:00
Chris PeBenito e541d13ae5 Pull in additional kernel layer Fedora policy changes. 2011-04-14 10:05:56 -04:00
Chris PeBenito 98f8408519 Additional rearrangement in corecommands, along with module version bump. 2010-10-27 14:09:00 -04:00
Jeremy Solt c60f75ad0f corecommands patch from Dan Walsh: "Lots of bin_t files" 2010-10-27 13:33:29 -04:00
Chris PeBenito 46c0e57acf Corecommands patch from Dan Walsh.
Lots of new places to stick bin_t files
2010-06-07 09:04:08 -04:00
Chris PeBenito 4b23c6747b Corecommands patch from Dan Walsh. 2010-03-05 10:51:39 -05:00
Chris PeBenito 290aa8a020 Corecommands patch from Dan Walsh. 2009-11-23 13:47:36 -05:00
Chris PeBenito 78a9c2815d add bin_t labeling for gentoo dhcpcd-run-hooks location 2009-07-30 09:34:00 -04:00
Chris PeBenito 3f67f722bb trunk: whitespace fixes 2009-06-26 14:40:13 +00:00