From: Dominick Grift <dac.override@gmail.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Subject: Re: genhomedircon USERID and USERNAME patches
Date: Sun, 17 Apr 2016 21:19:25 +0200 [thread overview]
Message-ID: <5713E1BD.60702@gmail.com> (raw)
In-Reply-To: <57137BA9.6010501@gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 04/17/2016 02:03 PM, Dominick Grift wrote:
> On 04/17/2016 12:12 PM, Dominick Grift wrote:
>> On 04/13/2016 08:25 PM, Dominick Grift wrote:
>>> On 04/13/2016 07:18 PM, Dominick Grift wrote:
>
>>>>> Let me correct that:
>
>>>>> "Even CIL-based modules can be installed via semodule and
>>>>> managed via libsemanage, and libsemanage already contains a
>>>>> C implementation of genhomedircon."
>
>
>>>>> that is not my point though. My point is: since we need a
>>>>> working genhomedircon for monolithic policy, we might cease
>>>>> the opportunity to also support text-based module policy
>>>>> which can be installed via semodule and managed via
>>>>> libsemanage, but does not strictly require that .
>
>
>>>> Make that "seize" instead (i think)
>
>
>>> I just realized that i do not have to bring CIL into the
>>> equation here. We can keep it nice, simple and to the point.
>>> Refpolicy genhomedircon needs to be updated (and needs just a
>>> general review to make it work again on modern distributions)
>>> as well to make this new functionality also work with
>>> monolithic policy.
>
>>> Also since were on the discussion of genhomedircon, I might be
>>> wrong here, but I believe genhomedircon cannot currently deal
>>> with %group entries in seusers.
>
>
>
>> I think we should also generate file context specs for user mail
>> spool (is currently not done AFAIK in common module policy).
>
>> But if genhomedircon would not hardcode keywords and
>> identifiers, then i could accept them through the command line
>> options and map it to some hardcoded initial identifiers where/if
>> needed
>
>> then one could specify on the command line the keyword, and any
>> other identifiers. So that is a bit more flexible so that when
>> in the future we get other instances where we need to generate
>> contexts for some location we dont have to edit the script we
>> can just pass it some additional new options. But yes then i
>> suppose it would need to be a standalone script. Added value
>> there is that we then no longer have to maintain to genhomedircon
>> instances, one for libsemanage and one for monolitic policy and
>> text-based module policy.
>
>
>
> strangely the generated homedir_template does include my
> "USER_SPOOL" entries, i cant find any reference to it in the code
> (maybe its a fedora patch??)
>
> nonetheless genhomedircon doesnt generate any contexts for me. I
> think it might not be able to deal with the namespaced user
> identities(sys.id instead of system_u for example)
>
> And then there is the issue that even though the genhomedircon
> seems to indicate that it supports USER and ROLE keywords. cil
> filecon statements do not allow me to specify USER and ROLE in
> filecon it seems.
>
> I use RBACSEP (defaultrole source) so i need to be able to
> associate the appropriate roles with filecon for user file cons
>
> All-in-all semodule/libsemanage is not an option for me. Too
> limited and too much assumptions/hard coding
>
>
I managed to get something semi-acceptable with this spec:
https://github.com/DefenSec/selinux-rpm-spec/blob/master/dssp-mcs-norbac
sep.spec
(its awesome how i dont need any fancy make files, just semodule and
sed to tweak some tunables if needed)
rbacsep disabled. genhomedircon now generates contexts for __default__
and since it can't deal with %group it leaves wheel users home dir
contexts as __default__. it does not replace the sys.id because it
can't deal with that, but thats not a big deal since i dont enforce
ubacsep. The mcs part also doesnt hurt.
what is a problem though is that genhomedircon can't generate contexts
for user mail spool files. So useradd and userdel might not work since
they may exit when they determine that they can't create user mail
spool files.
It is cool to see though how every module can be exported and be
replaced. Theres no concept of base. Everything is tweakable,
exportable and replaceable.
But genhomedircon should really be revisited with an open mind.
- --
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQGcBAEBCAAGBQJXE+G5AAoJECV0jlU3+Udp03gL/3TJmekH7hK+CxIPjFVT+HXp
tIEhKSEYeXasmXg5dgTctaEjIKiRHfAv/PTGVJ0lKWjPyxf5KaEDMYArfSgxVLK+
tNVJ5E3FaYLQPsXNl/4cTx+ttVo+ArGUR7o9RLzWnHmrMVMSlDM6foO6tnQntmR6
0CDBbe0Jx/HbTyWBWHf9Q6zGdoapcEhPJnkfx8Zd1rEcRWgFNBrYeaS9aWO/VPDO
b7xM0GilLSL6lG13sg1sY8HpkJwQ6jMo8nbYOhKpIkisZq+v7GprbNCrqTLHt7JD
nTWAOl6yUZGkIvP2luypDcCIGOahI8z9y32xf7E/1nxlQyEGhR4mrhFUctOsadra
//YrLcqac+ehnhWdgDkHw6vGUPmA3bEZaXl1DF1UFJX77RyUhD/00/dWYCa3WKmo
jVJZozAQkbuZZOcjuvu1mgE6hkp03Mz0/CeQDo/W9Ph5XuMN9XfbiGcvcozZ1q7W
xMBF6hRSice8cXhDz58eC1S8p5cgzKTWAMZRExAz0g==
=inQF
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2016-04-17 19:19 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 9:36 genhomedircon uid template Jason Zaman
2016-02-01 19:30 ` Stephen Smalley
2016-02-02 6:26 ` Jason Zaman
2016-02-02 13:57 ` Christopher J. PeBenito
2016-02-02 15:03 ` Stephen Smalley
2016-02-02 20:39 ` Nicolas Iooss
2016-04-08 16:05 ` genhomedircon USERID and USERNAME patches Jason Zaman
2016-04-08 16:05 ` [PATCH 1/7] genhomedircon: factor out common replacement code Jason Zaman
2016-04-08 16:05 ` [PATCH 2/7] genhomedircon: move fallback user to genhomedircon_user_entry_t Jason Zaman
2016-04-08 16:05 ` [PATCH 3/7] genhomedircon: rename FALLBACK #defines consistent with struct Jason Zaman
2016-04-08 16:05 ` [PATCH 4/7] genhomedircon: make all write context funcs take user_entry struct Jason Zaman
2016-04-08 16:05 ` [PATCH 5/7] genhomedircon: Add uid and gid to struct user_entry Jason Zaman
2016-04-08 16:05 ` [PATCH 6/7] genhomedircon: make USERID, USERNAME context lists Jason Zaman
2016-04-08 16:05 ` [PATCH 7/7] genhomedircon: write contexts for username and userid Jason Zaman
2016-04-11 21:44 ` genhomedircon USERID and USERNAME patches Nicolas Iooss
2016-04-12 7:56 ` Dominick Grift
2016-04-12 11:51 ` Jason Zaman
2016-04-12 12:57 ` Stephen Smalley
2016-04-12 14:35 ` Christopher J. PeBenito
2016-04-13 16:34 ` Dominick Grift
2016-04-13 17:00 ` Stephen Smalley
2016-04-13 17:10 ` Dominick Grift
2016-04-13 17:18 ` Dominick Grift
2016-04-13 18:25 ` Dominick Grift
2016-04-17 10:12 ` Dominick Grift
2016-04-17 12:03 ` Dominick Grift
2016-04-17 19:19 ` Dominick Grift [this message]
2016-04-18 6:23 ` Dominick Grift
2016-04-23 6:04 ` genhomedircon USERID and USERNAME patches v2 Jason Zaman
2016-04-23 6:04 ` [PATCH v2 1/8] genhomedircon: factor out common replacement code Jason Zaman
2016-04-23 6:04 ` [PATCH v2 2/8] genhomedircon: move fallback user to genhomedircon_user_entry_t Jason Zaman
2016-04-29 16:54 ` Stephen Smalley
2016-04-29 19:23 ` Jason Zaman
2016-04-29 20:29 ` Stephen Smalley
2016-04-23 6:04 ` [PATCH v2 3/8] genhomedircon: rename FALLBACK #defines consistent with struct Jason Zaman
2016-04-23 6:04 ` [PATCH v2 4/8] genhomedircon: make all write context funcs take user_entry struct Jason Zaman
2016-04-23 6:04 ` [PATCH v2 5/8] genhomedircon: Add uid and gid to struct user_entry Jason Zaman
2016-04-27 17:04 ` Stephen Smalley
2016-04-28 17:53 ` Jason Zaman
2016-04-28 18:13 ` Stephen Smalley
2016-04-29 12:01 ` Jason Zaman
2016-04-23 6:04 ` [PATCH v2 6/8] genhomedircon: make USERID, USERNAME context lists Jason Zaman
2016-04-23 6:04 ` [PATCH v2 7/8] genhomedircon: write contexts for username and userid Jason Zaman
2016-04-23 6:04 ` [PATCH v2 8/8] genhomedircon: fix FALLBACK_NAME regex Jason Zaman
2016-04-26 22:03 ` genhomedircon USERID and USERNAME patches v2 Nicolas Iooss
2016-04-29 12:04 ` [PATCH v3 5/8] genhomedircon: Add uid and gid to struct user_entry Jason Zaman
2016-04-29 20:28 ` Stephen Smalley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5713E1BD.60702@gmail.com \
--to=dac.override@gmail.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.