Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dontaudit systemd_tmpfiles_t getattr of all file types BZ(1772976) #295

Merged
merged 1 commit into from Nov 22, 2019

Conversation

zpytela
Copy link
Contributor

@zpytela zpytela commented Nov 20, 2019

Scratchbuild seems to work:
Before:

# sesearch --dontaudit -s systemd_tmpfiles_t -c file -ds
dontaudit systemd_tmpfiles_t systemd_tmpfiles_t:file create;

After:

# sesearch --dontaudit -s systemd_tmpfiles_t -c file -ds
dontaudit systemd_tmpfiles_t file_type:file getattr;
dontaudit systemd_tmpfiles_t systemd_tmpfiles_t:file create;

@wrabcak
Copy link
Member

wrabcak commented Nov 20, 2019

Hi @zpytela ,

Based on rhbz#1772976, you're trying to dontaudit this rule:
dontaudit systemd_tmpfiles_t sysctl_vm_t:file getattr by using macro where file_type attribute is used. BUT sysctl_vm_t is not part of this attribute.

# seinfo -xafile_type | grep sysctl_vm_t
# 

So it fixes the issue for another bugzillas, but not for rhbz#1772976.

@zpytela
Copy link
Contributor Author

zpytela commented Nov 21, 2019

Looks like incorrect acceptance criteria, thank you for catching that. Current state:

# sesearch --dontaudit -s systemd_tmpfiles_t -t sysctl_vm_t -c file -p getattr
dontaudit systemd_tmpfiles_t sysctl_type:file getattr;

# sesearch --dontaudit -s systemd_tmpfiles_t -c file -ds
dontaudit systemd_tmpfiles_t file_type:file getattr;
dontaudit systemd_tmpfiles_t filesystem_type:file getattr;
dontaudit systemd_tmpfiles_t proc_type:file getattr;
dontaudit systemd_tmpfiles_t sysctl_type:file getattr;
dontaudit systemd_tmpfiles_t systemd_tmpfiles_t:file create;

Note device_node is not a part of the list as I was not able to find such a file in sosreport.

Requesting review.

@wrabcak
Copy link
Member

wrabcak commented Nov 22, 2019

LGTM.
Thanks.

@wrabcak wrabcak merged commit e3cabc4 into fedora-selinux:rawhide Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants