Skip to contentSkip to conversation

fs_use_xattr question

DISCUSSION Dan Noland 2 participants 2 messages Jun 14, 2019 – Jun 15, 2019

lore
Share & tools
lore

Dan Noland

author
#0 lore raw

- Hello -

I have a custom stacked filesystem and I was having difficulty with security xattrs. I traced it back to missing:

fs_use_xattr myfs gen_context(system_u:object_r:fs_t,s0);

Which works nicely when I rebuild/reinstall the base policy. However some experimentation and checking of old mailing posts seems to indicate that it is not possible to achieve this in a policy module.

Because my FS is stacked I would be perfectly happy just to inherit whatever the fs_use_xattr state of my lower filesystem is.

Is there a best practice for achieving this or do I need to always rebuild the base policy?

Thank you for your time.

Signature · 2 lines
TY,
Dan Noland
#1 lore raw
Quoted 11 lines · Dan Noland

- Hello -

I have a custom stacked filesystem and I was having difficulty with security xattrs. I traced it back to missing:

fs_use_xattr myfs gen_context(system_u:object_r:fs_t,s0);

Which works nicely when I rebuild/reinstall the base policy. However some experimentation and checking of old mailing posts seems to indicate that it is not possible to achieve this in a policy module.

Quoted 5 lines

Because my FS is stacked I would be perfectly happy just to inherit whatever the fs_use_xattr state of my lower filesystem is.

Is there a best practice for achieving this or do I need to always rebuild the base policy?

If you are able to use CIL then you might be able to do this:

echo '(fsuse xattr "myfs" (system_u object_r fs_t ((s0)(s0))))' > mytest.cil && sudo semodule -i mytest.cil

Quoted 6 lines

Thank you for your time.

Signature · 2 lines
TY,
Dan Noland
Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift