Commit Graph

4369 Commits

Author SHA1 Message Date
Chris PeBenito
e77bd0b18b Merge branch 'getty_module' of git://github.com/cgzones/refpolicy 2017-03-02 19:23:42 -05:00
Jason Zaman
ef653c810a authlogin: put interface properly inside optional 2017-02-28 19:55:27 -05:00
Chris PeBenito
2f3691e4c8 Merge pull request #103 from fishilico/validate_modular_fc
Make "validate" target verify file contexts
2017-02-28 19:49:33 -05:00
Chris PeBenito
40ef165744 Module version bump for misc fixes from cgzones. 2017-02-28 19:42:24 -05:00
Chris PeBenito
aa0665cfac Merge branch 'monit_depend' of git://github.com/cgzones/refpolicy 2017-02-28 19:31:33 -05:00
Chris PeBenito
e36f5a4ce9 Module version bump for user terminal improvments from cgzones. 2017-02-28 19:14:29 -05:00
Chris PeBenito
305a152795 Merge branch 'userdom_terminals_permit_open' of git://github.com/cgzones/refpolicy 2017-02-28 18:44:32 -05:00
Nicolas Iooss
2e2088b401
devices: fix Debian file contexts
When using setfiles to validate file contexts of Debian modular policy
(with DISTRO=debian and MONOLITHIC=n), it fails with:

    tmp/all_mods.fc:  line 527 is missing fields
    tmp/all_mods.fc:  line 527 is missing fields
    tmp/all_mods.fc: Invalid argument

Here is the content of tmp/all_mods.fc around line 527:

    # this is a static /dev dir "backup mount"
    # if you want to disable udev, youll have to boot permissive and relabel!
    /dev/\.static           -d      system_u:object_r:device_t
    /dev/\.static/dev       -d      system_u:object_r:device_t
    /dev/\.static/dev/(.*)?         <<none>>
    '

The quote of "you'll" has been eaten by m4 and there is a spurious quote
on the last line, which is reported by setfiles. Fix this by removing
the quote in the comment.

Here is an example of a failed build on Travis-CI:
https://travis-ci.org/fishilico/selinux-refpolicy-patched/jobs/205951446
2017-02-27 22:24:02 +01:00
Nicolas Iooss
4bd455bf90
Make "validate" target verify file contexts
When I synchronized my personal policy with the git master branch, "git
rebase" merged the file contexts I have defined for some systemd
components with the ones which have recently been merged. This resulted
in duplicated file contexts in systemd.fc, which made the policy unable
to be loaded.

This issue has not been detected by "make validate" because this command
only verifies policy linking, not the correctness of the file contexts.
Moreover this behavior of "make validate" only happens when building a
modular policy. Indeed Rules.monolithic calls setfiles in order to
validate the file contexts:

    validate: $(fc) $(polver)
        @echo "Validating $(NAME) file_contexts."
        $(verbose) $(SETFILES) -q -c $(polver) $(fc)
        @echo "Success."

Invoke setfiles in Rules.modular too in order to catch issues in file
contexts with "make validate". With the issue I experienced, I would
have got the following message:

    Validating policy file contexts.
    /sbin/setfiles -q -c tmp/policy.bin tmp/all_mods.fc
    tmp/all_mods.fc: Multiple same specifications for /run/systemd/machines(/.*)?.
    tmp/all_mods.fc: Invalid argument
    make: *** [Rules.modular:210: validate] Error 1

While at it, simplify .SECONDARY definition with a newly-introduced
$(all_mod_fc) variable.
2017-02-27 22:02:52 +01:00
cgzones
3c7cec58a2 getty: overlook module
* reorder file contexts
* rename getty_var_run_t into getty_runtime_t and getty_etc_t into getty_conf_t
* remove unneeded and confusing init permissions
* delete access on generic pids
* remove invalid etc filetrans: getty has no create permissions for its config files
* restrict logfile access
2017-02-27 19:21:39 +01:00
cgzones
1f1e2474d8 improve documentation for user_user_(inherited_)?user_terminals 2017-02-27 18:17:10 +01:00
Chris PeBenito
ca04cdb14b Module version bump for patches from cgzones. 2017-02-26 12:23:19 -05:00
Chris PeBenito
f727615595 Merge branch 'locallogin_module' of git://github.com/cgzones/refpolicy 2017-02-26 12:09:11 -05:00
Chris PeBenito
10388e1319 auth: Move optional out of auth_use_pam_systemd() to callers. 2017-02-26 12:08:02 -05:00
Chris PeBenito
15f0cc4fe1 Merge branch 'newrole_fixes' of git://github.com/cgzones/refpolicy 2017-02-26 11:58:43 -05:00
Chris PeBenito
2170c65ad9 Merge branch 'su_module' of git://github.com/cgzones/refpolicy 2017-02-26 11:48:37 -05:00
Chris PeBenito
1fc4753443 devices: Fix docs for dev_write_generic_sock_files(). 2017-02-25 11:50:31 -05:00
Chris PeBenito
74bf84a79e apache: Fix CI error. 2017-02-25 11:50:11 -05:00
Chris PeBenito
9f99cfb771 Network daemon patches from Russell Coker. 2017-02-25 11:20:19 -05:00
Chris PeBenito
4f5c53411a Fix typo in README.
Closes #100
2017-02-25 09:38:26 -05:00
Chris PeBenito
e527ebaadf systemd: Further revisions from Russell Coker. 2017-02-25 09:35:10 -05:00
Chris PeBenito
1c5c70d4ab init: Move interface and whitespace change. 2017-02-25 08:39:58 -05:00
Chris PeBenito
5acda8076f init: Rename init_search_pid_dirs() to init_search_pids(). 2017-02-25 08:38:16 -05:00
Russell Coker
35bd01104a new init interfaces for systemd
These are needed by several patches I'm about to send.

Description: some new interfaces for init/systemd
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2017-02-24
2017-02-25 08:19:39 -05:00
Chris PeBenito
7cc502dfe5 mailman: Fixes from Russell Coker. 2017-02-23 20:59:14 -05:00
Russell Coker
d504e1ef1b rw_inherited_file_perms
This patch defines rw_inherited_file_perms.  It's needed by a few patches
I'm going to send soon so I need to get it in before they go in.

Also it's generally a good thing to have.  We should reconsider some of the
other policy for whether it should use this.
2017-02-23 20:52:04 -05:00
Chris PeBenito
c12d16435b Xen fixes from Russell Coker. 2017-02-23 20:32:17 -05:00
Chris PeBenito
c3c767bae2 Module version bump for CI fixes. 2017-02-23 20:32:10 -05:00
Chris PeBenito
65e60689d4 Fix CI errors. 2017-02-23 20:16:40 -05:00
Chris PeBenito
2087bde934 Systemd fixes from Russell Coker. 2017-02-23 20:03:23 -05:00
Chris PeBenito
485929b762 Module version bump for ntp fixes from cgzones. 2017-02-22 19:01:20 -05:00
Chris PeBenito
389e3c954f Merge branch 'init_ntp_interface' of git://github.com/cgzones/refpolicy 2017-02-22 18:37:29 -05:00
cgzones
17753638ca add init_daemon_lock_file()
needed for ntp
2017-02-21 15:07:47 +01:00
Chris PeBenito
14cc33cba9 alsa, vnstat: Updates from cgzones. 2017-02-20 12:14:23 -05:00
Chris PeBenito
498fb3c6e8 Module version bump for cgroups systemd fix from cgzones. 2017-02-20 11:21:00 -05:00
Chris PeBenito
e72556c6dd Merge branch 'cgroups_fix' of git://github.com/cgzones/refpolicy 2017-02-20 11:13:07 -05:00
Chris PeBenito
132db642bd Module version bump for selinuxutil and systmd changes from cgzones. 2017-02-20 10:57:50 -05:00
Chris PeBenito
34cfce5410 Merge branch 'selinuxutil_module' of git://github.com/cgzones/refpolicy 2017-02-20 10:53:56 -05:00
Chris PeBenito
e52b701f59 Merge branch 'systemd_transient' of git://github.com/cgzones/refpolicy 2017-02-20 10:43:18 -05:00
Chris PeBenito
3b1909d1d1 fetchmail, mysql, tor: Misc fixes from Russell Coker. 2017-02-20 10:33:23 -05:00
Chris PeBenito
b5497053e9 monit: Fix build error.
Uncovered by Travis-CI.
2017-02-20 08:43:12 -05:00
cgzones
5770a8ee7c update init_ACTION_all_units
When with systemd a program does not ship a systemd unit file but only a init script, systemd creates a pseudo service on the fly.
To be able to act on this service, add the target attribute init_script_file_type to the init_ACTION_all_units interfaces.

Useful for monit.
2017-02-20 14:24:56 +01:00
cgzones
e4f3940729 add fs_getattr_dos_dirs()
useful
2017-02-20 14:20:33 +01:00
cgzones
c753c066d1 add corecmd_check_exec_bin_files()
useful for monit
2017-02-20 14:20:33 +01:00
cgzones
9b5d89fcf6 newrole: fix denials
dontaudit net_admin access due to setsockopt
allow communication with systemd-logind
2017-02-20 14:10:17 +01:00
Chris PeBenito
ede0dadc05 Monit policy from Russell Coker and cgzones. 2017-02-19 16:39:35 -05:00
Chris PeBenito
53fb3a3ba4 dpkg: Updates from Russell Coker. 2017-02-19 16:13:14 -05:00
cgzones
ba0e51c5b0 su: some adjustments
* systemd fixes
* remove unused attribute su_domain_type
* remove hide_broken_symptoms sections
* dontaudit init_t proc files access
* dontaudit net_admin capability due to setsockopt
2017-02-18 21:50:45 +01:00
cgzones
4d413fd0cb authlogin: introduce auth_use_pam_systemd
add special interface for pam_systemd module permissions
2017-02-18 21:50:45 +01:00
Chris PeBenito
2fcce0a88f Merge branch 'master' of github.com:TresysTechnology/refpolicy 2017-02-18 14:02:36 -05:00