vmojzis / tests / selinux

Forked from tests/selinux 4 years ago
Clone

8c7670c policycoreutils/modules: Use filesystem_type instead of fs_t

Authored and Committed by plautrba 5 years ago
    policycoreutils/modules: Use filesystem_type instead of fs_t
    
    Sometime, /tmp can be tmpfs_t so we need to allow test_t to be associated to all
    filesystem types.
    
    Fixes:
    :: [ 08:16:37 ] :: [  BEGIN   ] :: Running 'chcon -t test_t test_file'
    chcon: failed to change context of 'test_file' to ‘unconfined_u:object_r:test_t:s0’: Permission denied
    :: [ 08:16:37 ] :: [   FAIL   ] :: Command 'chcon -t test_t test_file' (Expected 0, got 1)
    
    type=AVC msg=audit(1552392203.833:2467): avc:  denied  { associate } for  pid=571 comm="chcon" name="test_file" dev="tmpfs" ino=77668 scontext=unconfined_u:object_r:test_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=filesystem permissive=0