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

Allow smbd to load libcephfs proxy conditionally #2555

Open
wants to merge 1 commit into
base: rawhide
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions policy/modules/contrib/samba.te
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ gen_tunable(samba_share_fusefs, false)
## </desc>
gen_tunable(samba_load_libgfapi, false)

## <desc>
## <p>
## Allow smbd to load libcephfs proxy from ceph.
## </p>
## </desc>
gen_tunable(samba_load_libcephfs_proxy, false)

type nmbd_t;
type nmbd_exec_t;
init_daemon_domain(nmbd_t, nmbd_exec_t)
Expand Down Expand Up @@ -584,6 +591,13 @@ tunable_policy(`samba_load_libgfapi',`
corenet_sendrecv_all_packets(smbd_t)
')

optional_policy(`
tunable_policy(`samba_load_libcephfs_proxy',`
unconfined_stream_connect(smbd_t)
rw_sock_files_pattern(smbd_t, var_run_t, var_run_t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which service creates and/or works with files with the var_run_t type? A private type should be used in cases of allowing write access.

')
')

optional_policy(`
avahi_dbus_chat(smbd_t)
')
Expand Down