-
Notifications
You must be signed in to change notification settings - Fork 179
Fixing PUN management of config home #5167
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,21 +99,13 @@ read_lnk_files_pattern(ood_pun_t, ood_apps_public_t, ood_apps_public_t) | |
| read_files_pattern(httpd_t, ood_apps_public_t, ood_apps_public_t) | ||
| read_lnk_files_pattern(httpd_t, ood_apps_public_t, ood_apps_public_t) | ||
|
|
||
| ## <desc> | ||
| ## <p> | ||
| ## Allow OnDemand to manage user .config directories labelled with config_home_t | ||
| ## </p> | ||
| ## </desc> | ||
| gen_tunable(ondemand_manage_config_dir, false) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Getting rid of the tunable is the wrong approach. The context trying to be forced here does not apply to everyone so should not be forced on everyone.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @treydock. But I wouldn't think that's an issue; there are other default SELinux context labels that your NFSv4.0 isn't utilizing (
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not 100% certain how this will work on NFS v4.0 and easiest way to test will be to verify at OSC with our nightly builds once merged. We run SELinux only on our dev nightly hosts and only in permissive mode. |
||
| tunable_policy(`ondemand_manage_config_dir',` | ||
| ifdef(`config_home_t',` | ||
| type ood_pun_config_t; | ||
| allow ood_pun_t config_home_t:dir { add_name write create }; | ||
| manage_files_pattern(ood_pun_t, ood_pun_config_t, ood_pun_config_t) | ||
| manage_dirs_pattern(ood_pun_t, ood_pun_config_t, ood_pun_config_t) | ||
| filetrans_pattern(ood_pun_t, config_home_t, ood_pun_config_t, dir, "ondemand") | ||
| ') | ||
| ') | ||
| # user-specific config files | ||
| type ood_pun_config_t; | ||
| files_type(ood_pun_config_t) | ||
| gnome_config_filetrans(ood_pun_t, ood_pun_config_t, dir, "ondemand") | ||
| gnome_create_home_config_dirs(ood_pun_t) | ||
|
Comment on lines
+105
to
+106
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this using
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Practicing encapsulation. Using |
||
| manage_files_pattern(ood_pun_t, ood_pun_config_t, ood_pun_config_t) | ||
| manage_dirs_pattern(ood_pun_t, ood_pun_config_t, ood_pun_config_t) | ||
|
|
||
| ## <desc> | ||
| ## <p> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this would require something to either run
restoreconif already exists or the new directory would inherit this context.However this doesn't work on NFS.
This change will cause issues for people using NFS home directories which is one of the more common usages with OnDemand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this would require running
restorecon.That
chconfailure may be due to using NFSv4.0, which doesn't support the security xattrs required for SELinux contexts. We use NFSv4.2 for home and have no issue runningchcon:But this proposed change shouldn't negatively impact a setup like yours. For instance, the SELinux policy on your system probably lists default contexts other than
nfs_tfor your home files. Here's our on RHEL 9.7:But running
restoreconon the home directories just has no effect? Or does it also generate errors?