SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* fs_use_xattr question
@ 2019-06-14 22:01 Dan Noland
  2019-06-15 11:42 ` Dominick Grift
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Noland @ 2019-06-14 22:01 UTC (permalink / raw)
  To: selinux-refpolicy

- 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.

-- 
TY,
Dan Noland

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: fs_use_xattr question
  2019-06-14 22:01 fs_use_xattr question Dan Noland
@ 2019-06-15 11:42 ` Dominick Grift
  0 siblings, 0 replies; 2+ messages in thread
From: Dominick Grift @ 2019-06-15 11:42 UTC (permalink / raw)
  To: Dan Noland; +Cc: selinux-refpolicy

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

On Fri, Jun 14, 2019 at 10:01:52PM +0000, Dan Noland wrote:
> - 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?

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

> 
> Thank you for your time.
> 
> -- 
> TY,
> Dan Noland

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 22:01 fs_use_xattr question Dan Noland
2019-06-15 11:42 ` Dominick Grift

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org selinux-refpolicy@archiver.kernel.org
	public-inbox-index selinux-refpolicy


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/ public-inbox