Portál AbcLinuxu, 6. května 2025 01:31
type=AVC msg=audit(1329085368.563:9818): avc: denied { getattr } for pid=4652 comm="find" path="/etc/postfix/tag_as_foreign.re" dev=dm-0 ino=3671350 scontext=unconfined_u:system_r:postfix_master_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file type=SYSCALL msg=audit(1329085368.563:9818): arch=40000003 syscall=300 success=yes exit=0 a0=ffffff9c a1=948c3dc a2=948c37c a3=100 items=0 ppid=4633 pid=4652 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=12 comm="find" exe="/bin/find" subj=unconfined_u:system_r:postfix_master_t:s0 key=(null)Nevím totiž ani, proč je tcontext unlabeled_t, protože ani postfix, ani find, ani tag_as_foreign.re nejsou unlabeled_t. Myslím, že jednoduché řešení pomocí audit2allow není dobrý nápad, protože navrhuje master procesu postfixu přiřadit oprávnění k unlabeled_t. Nevíte jak tohle vyřešit?
Tyhle politiky jsou dost často wildcard na adresáře, takže by to velmi pravděpodobně fungovalo s prostým restorecon -R /etc/postfix
...
root@duat ~ # semanage fcontext -l | grep /etc/postfix /etc/postfix.* all files system_u:object_r:postfix_etc_t:s0
Zkusil jsem udělat tohle:
root@duat ~ # echo Blah > /etc/postfix/blah root@duat ~ # restorecon -FRv /etc/postfix/ restorecon reset /etc/postfix/blah context unconfined_u:object_r:postfix_etc_t:s0->system_u:object_r:postfix_etc_t:s0 root@duat ~ # ls -lZ /etc/postfix/blah -rw-r--r--. root root system_u:object_r:postfix_etc_t:s0 /etc/postfix/blah
Všechno je jak má být a nemusel jsem nic extra nastavovat.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.