Commit Graph

52 Commits

Author SHA1 Message Date
Christian Göttsche 57d570f01c chromium/libraries: move lib_t filecontext to defining module
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2020-05-12 20:09:44 +02:00
Nicolas Iooss 6901075d7f
libraries: fix some misspellings in patterns
In libraries.fc:

- "(/.*?)" is very likely a misspelling for (/.*)?
- "sidecars/*" with "--" as file type is very likely a misspelling for
  sidecars/.+, in order to match files that are shared libraries.
- "/opt/netbeans(.*/)?jdk" matches "/opt/netbeansjdk", which is buggy.

In Apache NetBeans 11.1 downloaded from
https://netbeans.apache.org/download/nb111/nb111.html, there are files
such as profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so.
Several websites document installing NetBeans in directories such as
/opt/netbeans-11.1/, so the installed .so files are probably installed in
/opt/netbeans-11.1/profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so.
There is thus an issue with the current pattern:

    /opt/netbeans(.*/)?jdk.*/linux/.+\.so(\.[^/]*)*

This pattern requires "/linux/" in the path, not "/linux-amd64/".

As this pattern was introduced in 2007 by commit 02d968c581 ("trunk:
several fc updates from dan."), consider it as outdated and remove it.

If the .so files in /opt/netbeans/ really need a label such as
textrel_shlib_t, a file pattern will need to be written with less issues
than the one which is removed.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2019-09-01 15:47:57 +02:00
Nicolas Iooss d00eddb885
libraries: drop a pattern specific to Python 2.4
Apply comment https://github.com/SELinuxProject/refpolicy/pull/75#discussion_r318831927

    We don't support any systems that are so old they have Python 2.4.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2019-08-29 20:03:02 +02:00
Nicolas Iooss f0cade07b2
Remove unescaped single dot from the policy
In a pattern, a dot can match any character, including slash. It makes
sense when it is combined with ?, + or *, but makes little sense when
left alone.

Most of the time, the label was for file containing dots, where the dot
was not escaped. A few times, the dot was really intended to match any
character. In such case, [^/] better suits the intent.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2019-08-27 23:38:09 +02:00
Nicolas Iooss 1b44cb6c2e
libraries: match a digit in Adobe Reader directories
Patterns using this have a small issue:

    /opt/Adobe/Reader.?/Reader/intellinux

The issue is that the dot can also match a slash. A bettern pattern
would be:

    /opt/Adobe/Reader[^/]?/Reader/intellinux

In this specific case, the intent is to match digits (like
/opt/Adobe/Reader9). Use [0-9] for this.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2019-08-21 21:43:56 +02:00
Luis Ressel d23a97ff9c libraries: Add fc entry for musl's ld.so config 2017-11-14 18:32:46 -05:00
Jason Zaman a5697b56a2 libraries: update wildcard /usr/lib fcontext
subs_dist takes care of it, the wildcard is no longer needed
2017-05-11 19:35:53 -04:00
Nicolas Iooss 69c742f11b
Support systems with a single /usr/bin directory
On systems such as Arch Linux, all programs which are usually located in
/bin, /sbin, /usr/bin and /usr/sbin are present in /usr/bin and the
other locations are symbolic links to this directory.  With such a
configuration, the file contexts which define types for files in
/bin, /sbin and /usr/sbin need to be duplicated to provide definitions
for /usr/bin/...

As the "/bin vs. /usr/bin" part of the needed definitions has already
been done with the "usr merge" patches, the next step consists in
duplicating file contexts for /usr/sbin. This is what this patch does
for all modules which are not in contrib.

This is the second iteration of an idea I have previously posted on
http://oss.tresys.com/pipermail/refpolicy/2017-March/009176.html
2017-04-15 20:49:07 +02:00
Chris PeBenito b690079a93 Misc fc changes from Russell Coker. 2017-04-06 17:00:28 -04: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
Guido Trentalancia ab0b758ed7 Apache OpenOffice module (base policy part)
This is a patch that I have created and tested to support Apache
OpenOffice with its own module (base policy part, 1/2).

The file contexts (and initial tests) are based on the default
installation path for version 4 of the office suite.

Since the second version it includes revisions from Dominick Grift.

Since the third version it should correctly manage files in home
directories and allow some other major functionality.

The fourth version of the patch introduces a boolean to enable or
disable software updates from the network (application and/or
extensions).

The fifth version of the patch adds the ability to connect to the
X display manager (XDM) using Unix domain sockets (interface
xserver_stream_connect_xdm()). Also the fifth version splits the
whole patch into separate base policy / contrib policy patches as
required.

The sixth version of this patch removes obsolete executable
permission from the unconfined module.

The seventh, eighth and nineth versions brings no changes in the base
part of the patch.

All released versions are safe to apply, each new version just
brings improved application functionality and better integration
with other desktop applications.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-12-06 20:08:06 -05:00
Chris PeBenito 9cfbb9b30a libraries: Move libsystemd fc entry. 2016-08-02 20:21:24 -04:00
Lukas Vrabec 81a130b071 Systemd by version 231 starts using shared library and systemd daemons execute it. For this reason lib_t type is needed. 2016-08-02 20:18:57 -04:00
Nicolas Iooss 74ec2d61b2 Label /lib symlink as lib_t for every distro
As in Debian, Gentoo and Arch Linux /lib may be a symlink, move its file
context definition outside of ifdef blocks.
2014-07-08 08:49:37 -04:00
Chris PeBenito c7e2518162 Whitespace fix in libraries. 2013-12-06 08:48:04 -05:00
Dominick Grift b56ecb9d52 libraries: for now i can only confirm mmap, might need to be changed to bin_t later if it turns out to need execute_no_trans
Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
2013-12-06 08:47:53 -05:00
Mika Pflüger 5ea6bf5c1e Explicitly label dovecot libraries lib_t for debian 2012-10-30 13:42:05 -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 aac94b0e40 Whitespace fixes from fc.subs changes. 2012-05-10 10:33:54 -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 127d617b31 Pull in some changes from Fedora policy system layer. 2011-04-14 11:36:56 -04:00
Chris PeBenito bc31d12725 Libraries patch from Dan Walsh. 2010-03-19 14:21:23 -04:00
Chris PeBenito e51390dfcb fix refpolicy ticket #48. 2009-08-10 11:14:03 -04:00
Chris PeBenito 3f67f722bb trunk: whitespace fixes 2009-06-26 14:40:13 +00:00
Chris PeBenito 22894e33c4 trunk: add libjackserver.so textrel fc. 2009-06-01 13:04:40 +00:00
Chris PeBenito 6073ea1e13 trunk: whitespace fix changing multiple spaces into tabs. 2008-12-03 18:33:19 +00:00
Chris PeBenito 9c4500b2f4 trunk: Glibc 2.7 fix from Vaclav Ovsik. 2008-08-12 19:33:18 +00:00
Chris PeBenito fe5618edf5 trunk: add /usr/lib32 symlink labeling for debian. 2008-06-13 13:55:22 +00:00
Chris PeBenito 02d968c581 trunk: several fc updates from dan. 2007-12-12 15:55:21 +00:00
Chris PeBenito 6c53a10e28 trunk: Patch to clean up unescaped periods in several file context entries from Jan-Frode Myklebust. 2007-10-05 18:00:55 +00:00
Chris PeBenito 350b6ab767 trunk: merge strict and targeted policies. merge shlib_t into lib_t. 2007-10-02 16:04:50 +00:00
Chris PeBenito 92d1ade254 trunk: trivial gentoo tweaks 2007-06-20 20:08:26 +00:00
Chris PeBenito d534d35a7e trunk: 5 patches from dan 2007-06-11 15:01:10 +00:00
Chris PeBenito 0ef5d66468 textrel lib update from dan 2007-05-03 13:43:44 +00:00
Chris PeBenito 19b2dee3cc confine ldconfig in targeted, from dan 2007-04-10 19:39:22 +00:00
Chris PeBenito 98faba122c gentoo /lib can be a symlink on x86-64 systems 2007-04-02 13:33:18 +00:00
Chris PeBenito ecc98e19e3 patches for file contexts in networkmanager, miscfiles, corecommands, devices, and java from Dan Walsh. 2007-03-01 15:43:39 +00:00
Chris PeBenito 6b19be3360 patch from dan, Thu, 2007-01-25 at 08:12 -0500 2007-02-16 23:01:42 +00:00
Chris PeBenito d6d16b9796 patch from dan Wed, 29 Nov 2006 17:06:40 -0500 2006-12-04 20:10:56 +00:00
Chris PeBenito d9845ae92a patch from dan Tue, 24 Oct 2006 11:00:28 -0400 2006-10-31 21:01:48 +00:00
Chris PeBenito 009b377174 more realplayer entries 2006-10-14 23:31:33 +00:00
Chris PeBenito 546c81ce25 more non .so lib files for acrobat 2006-10-05 20:39:25 +00:00
Chris PeBenito 3c3c0439f6 patch from russell, Thu, 5 Oct 2006 22:44:49 +1000
Allow unconfined processes to see unlabeled processes in ps.

Removed a redundant rule in samba.te

Removed support for the pre-Fedora Red Hat code to create sym-links in /boot.

Removed support for devpts_t files in /tmp (there is no way that would ever 
work).

Allowed postgrey to create socket files.

Made the specs for the /lib and /lib64 directories better support stem 
compression.
2006-10-05 19:57:37 +00:00
Chris PeBenito 8708d9bef2 patch from dan Wed, 20 Sep 2006 12:12:49 -0400 2006-09-22 17:14:35 +00:00
Chris PeBenito 13d7cec671 patch from erich Sat, 02 Sep 2006 03:37:44 +0200 2006-09-04 18:22:12 +00:00
Chris PeBenito a5e2133bc8 patch from dan Wed, 23 Aug 2006 14:03:49 -0400 2006-08-29 02:41:00 +00:00
Chris PeBenito de222824e9 fix gentoo /opt contexts 2006-08-25 13:26:21 +00:00
Chris PeBenito e9b9e45214 testing fixes 2006-08-18 18:20:22 +00:00
Chris PeBenito 46551033aa patch from dan Wed, 26 Jul 2006 14:42:46 -0400 2006-07-28 15:13:58 +00:00