mcstransd does not translate raw to trans context unless in cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

It appears that mcstransd won't translate a raw context to the human readable equivalent in some cases if it wasn't already asked to do the opposite operation.

Example config:

```
s0:c1=test1

Domain=testdomain

s0=low
s0-s0:c0.c15=low-high
s0:c0.c15=high

Base=test

s0:c0=dn42

ModifierGroup=g1
Prefix=prefix
Suffix=suffix
Whitespace=,
Join=,

c2=A
c3=B
c4=C
c5=D
c6=E
```

After a restart with a set of files with the raw label as follows:

fileA u:r:a:s0 fileA
fileB u:r:b:s0:c1 fileB
fileC u:r:c:s0:c0 fileC
fileD u:r:d:s0:c0,c2 fileD

mcstransd will translate it to:

fileA u:r:a:low
fileB u:r:b:test1
fileC u:r:c:dn42
fileD u:r:d:s0:c0,c2

However it should translate 

u:r:d:s0:c0,c2 to u:r:d:dn42 prefix A

After triggering a translation from human readable form into raw using chcon it translates correctly:

# ls -Z fileD
u:r:a:s0:c0,c2
# chcon -l "dn42 prefix A" fileD
u:r:a:dn42 prefix A

After restarting mcstransd it reverts, so I would assume that this is a failure to populate the cache.
This issue won't be triggered by mlstrans-test because it issues a trans_to_raw lookup before issuing raw_to_trans so the cache will already be filled with the correct mapping.

-- 
bauen1
https://dn42.bauen1.xyz/



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux