Description of problem: audit2allow is incapable of parsing audit.log or producing appropriate rules. How reproducible: Very systematic on all machines where I run glusterd and I try to use auth2allow to workaround Bug 1155935 # grep glusterd /var/log/audit/audit.log | audit2allow -M mypol compilation failed: mypol.te:18:ERROR 'syntax error' at token 'constrain' on line 18: constrain dir { create relabelfrom relabelto } ((u1 eq u2 -Fail-) or (t1=glusterd_t eq TYPE_ENTRY -Fail-) { POLICY_SOURCE: can_change_object_identity } ); Constraint DENIED #Constraint rule: /usr/bin/checkmodule: error(s) encountered while parsing configuration /usr/bin/checkmodule: loading policy configuration from mypol.te # cat mypol.te module mypol 1.0; require { type file_t; type home_root_t; type glusterd_t; type var_run_t; class sock_file { write unlink link setattr }; class dir relabelto; } #============= glusterd_t ============== allow glusterd_t file_t:sock_file { unlink link setattr }; #!!!! This avc is a constraint violation. You would need to modify the attributes of either the source or target types to allow this access. #Constraint rule: constrain dir { create relabelfrom relabelto } ((u1 eq u2 -Fail-) or (t1=glusterd_t eq TYPE_ENTRY -Fail-) { POLICY_SOURCE: can_change_object_identity } ); Constraint DENIED # Possible cause is the source user (system_u) and target user (unconfined_u) are different. allow glusterd_t home_root_t:dir relabelto; #!!!! This avc is allowed in the current policy allow glusterd_t var_run_t:sock_file unlink; allow glusterd_t var_run_t:sock_file write;
Yes, this is a bug. It should just create rules if it generates a policy module.
*** Bug 1159540 has been marked as a duplicate of this bug. ***
Actually a patch is easy.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.