Commit Graph

4454 Commits

Author SHA1 Message Date
Chris PeBenito 9b64397300 Merge pull request #112 from cgzones/remove_support/pyplate
clean up python3 cache on make bare
2017-04-01 20:12:49 -04:00
Chris PeBenito 2cd92db5cd systemd-nspawn again
This patch doesn't do everything that is needed to have systemd-nspawn work.
But it does everything that is needed and which I have written in a clear and
uncontroversial way.  I think it's best to get this upstream now and then
either have a separate discussion about the more difficult issues, or wait
until I devise a way of solving those problems that's not too hacky.

Who knows, maybe someone else will devise a brilliant solution to the remaining
issues after this is accepted upstream.

Also there's a tiny patch for systemd_machined_t that is required by
systemd_nspawn_t.

Description: systemd-nspawn
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2017-03-29
2017-04-01 12:08:42 -04:00
cgzones c9e77f5dde clean up python3 cache on make bare 2017-03-29 17:18:04 +02:00
Chris PeBenito 160d08f3ae systemd-resolvd, sessions, and tmpfiles take2
I believe that I have addressed all the issues Chris raised, so here's a newer
version of the patch which applies to today's git version.

Description: systemd-resolved, sessions, and tmpfiles patches
Author: Russell Coker <russell@coker.com.au>
Last-Update: 2017-03-26
2017-03-28 18:51:35 -04:00
Chris PeBenito 066a5efbdf Merge pull request #109 from cgzones/python3
convert build scripts to python3
2017-03-27 21:47:11 -04:00
cgzones 23eec3ebd8 travis: move after_success tests into script section 2017-03-25 23:51:38 +01:00
Chris PeBenito b411e4b300 another version of systemd cgroups hostnamed and logind
From Russell Coker
2017-03-25 13:45:37 -04:00
Chris PeBenito 603f0e1e6e Module version bump for monit patch from cgzones 2017-03-25 13:24:56 -04:00
Chris PeBenito 586f9e5176 Merge branch 'monit' of git://github.com/cgzones/refpolicy 2017-03-25 13:21:14 -04:00
Chris PeBenito 4dcbc032cf Module version bump from /var/run fixes from cgzones. 2017-03-25 13:05:13 -04:00
Chris PeBenito 1561ea6d42 Merge branch 'var_run' of git://github.com/cgzones/refpolicy 2017-03-25 13:03:32 -04:00
Chris PeBenito 5e20a0ee5b /var/run -> /run again
Here's the latest version of my patch to remove all /var/run when it's not
needed.  I have removed the subst thing from the patch, but kept a
distro_debian bit that relies on it.  So with this patch the policy won't
install if you build it with distro_debian unless you have my subst patch.
Chris, if your automated tests require that it build and install with
distro_debian then skip the patch for sysnetwork.fc.

From Russell Coker
2017-03-25 12:56:03 -04:00
Chris PeBenito 43f197494a dontaudit net_admin for SO_SNDBUFFORCE
The following patch adds dontaudit rules for where the net_admin capability
is requested due to SO_SNDBUFFORCE.  This forces the caller to use SO_SNDBUF
which gives the same result but possibly a smaller buffer.

From Russell Coker
2017-03-25 12:32:01 -04:00
cgzones 49580d2350 remove /var/run file context leftovers 2017-03-21 16:56:17 +01:00
cgzones 33fd9ae139 fix travis and genhomedircon 2017-03-18 18:38:20 +01:00
cgzones 3b3e6f75d3 travis: run make xml, html and install(-.*)? targets 2017-03-18 15:35:15 +01:00
Chris PeBenito dad2917f39 Module version bump for fixes from cgzones. 2017-03-18 09:14:51 -04:00
cgzones 82b0a6d4d5 convert build scripts to python3 2017-03-15 02:09:20 +01:00
Chris PeBenito 63a6a44b3d Module version bump for fixes from cgzones. 2017-03-12 16:36:49 -04:00
Chris PeBenito 2755b6e579 Merge branch 'macros' of git://github.com/cgzones/refpolicy 2017-03-12 16:15:47 -04:00
Chris PeBenito bef9b29283 Merge branch 'lvm' of git://github.com/cgzones/refpolicy 2017-03-12 15:59:26 -04:00
cgzones d62ce5b4e8 lvm: small adjustments
* align file contexts
* fix lvm_admin()
* call user_use_inherited_user_terminals and remove useless dontaudit call
2017-03-12 10:32:02 +01:00
cgzones f438513a8a sysadm: add monit admin permissions 2017-03-09 13:24:51 +01:00
cgzones da89b955a0 domtrans_pattern: use inherited fifo perms 2017-03-08 17:19:26 +01:00
cgzones d3462090d5 m4 errprint: add __program__ info 2017-03-08 17:16:27 +01:00
Chris PeBenito 4d028498d8 Module version bumps for fixes from cgzones. 2017-03-05 10:48:42 -05:00
Chris PeBenito 919a478e47 Merge branch 'fix_usr_bin_merge' of git://github.com/cgzones/refpolicy 2017-03-05 09:43:50 -05:00
Chris PeBenito 05fef195bc Merge branch 'modutils_module' of git://github.com/cgzones/refpolicy 2017-03-05 09:11:54 -05:00
cgzones 4b79a54b41 modutils: adopt callers to new interfaces 2017-03-03 12:28:17 +01:00
cgzones d2702a4224 corecmd_read_bin_symlinks(): remove deprecated and redundant calls 2017-03-03 12:00:07 +01:00
cgzones cef1f7bb29 corecommands: fix corecmd_*_bin() for usr merged systems 2017-03-03 11:53:35 +01:00
Chris PeBenito cdbca94133 Module version bump for getty patch from cgzones. 2017-03-02 20:25:04 -05:00
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 4d0d7cfc6f systemd-tmpfiles: refactor runtime configs
handle runtime configuration files under /run/tmpfiles.d as 3rd party content, like /run or /var/lib
2017-02-27 19:32:20 +01:00
cgzones 94311b1c20 modutils: adjust interfaces after recent binaries merge 2017-02-27 19:27:03 +01:00
cgzones 7d1a81a006 modutils: format filecontexts 2017-02-27 19:27:03 +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