+++ This bug was initially created as a clone of Bug #784121 +++
Description of problem:
Semanage is sending the wrong kind of audit events. When a user is assigned a new role, an AUDIT_ROLE_ASSIGN event should be sent. When a user has a role removed, an AUDIT_ROLE_REMOVE event should be sent. When a user's process changes roles, like during login, its supposed to issue an AUDIT_USER_ROLE_CHANGE event.
Semanage is only sending AUDIT_USER_ROLE_CHANGE - which is the wrong kind of event.
Steps to Reproduce:
1. semanage login -a -s guest_u test
2. ausearch -m ROLE_ASSIGN --start recent
Fixed in policycoreutils-2.0.83-19.19.el6.src.rpm
Following audit-test trustedprograms tests will have to be reviewed and updated in the upstream test suite because they expect type=USER_ROLE_CHANGE:
Logins and any use of newrole should still send USER_ROLE_CHANGE because the user is changing roles. But adding/deleting roles from a user's login database by using semanage with either of the -a or -d command line options are in fact affected by this patch. You should be able to grep the test suite looking for any use of semanage. If there is none, then the test suite is unaffected.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
The semanage utility did not produce correct audit messages in the Common Criteria certified environment. This update modifies semanage so that it now sends correct audit events when the user is assigned to or removed from a new role.
This update also modifies behavior of semanage concerning the user's SELinux Multi-Level Security (MLS) and Multi-Category Security (MCS) range. The utility now works with the user's default range of the MLS/MCS security level instead of the lowest.
In addition, the semange(8) manual page has been corrected to reflect the current semanage functionality.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.