2020-10-20 07:11:29 +02:00
|
|
|
# snapuserd - Daemon for servicing dm-user requests for Virtual A/B snapshots.
|
2020-11-13 09:45:59 +01:00
|
|
|
type snapuserd, domain;
|
|
|
|
type snapuserd_exec, exec_type, file_type, system_file_type;
|
2020-10-20 07:11:29 +02:00
|
|
|
|
|
|
|
typeattribute snapuserd coredomain;
|
|
|
|
|
|
|
|
init_daemon_domain(snapuserd)
|
|
|
|
|
|
|
|
allow snapuserd kmsg_device:chr_file rw_file_perms;
|
|
|
|
|
|
|
|
# Reading and writing to /dev/block/dm-* (device-mapper) nodes.
|
|
|
|
allow snapuserd block_device:dir r_dir_perms;
|
|
|
|
allow snapuserd dm_device:chr_file rw_file_perms;
|
|
|
|
allow snapuserd dm_device:blk_file rw_file_perms;
|
|
|
|
|
|
|
|
# Reading and writing to dm-user control nodes.
|
2020-11-13 09:45:59 +01:00
|
|
|
allow snapuserd dm_user_device:dir r_dir_perms;
|
2020-10-20 07:11:29 +02:00
|
|
|
allow snapuserd dm_user_device:chr_file rw_file_perms;
|
2020-12-03 06:15:08 +01:00
|
|
|
|
|
|
|
# Reading and writing to /dev/socket/snapuserd.
|
|
|
|
allow snapuserd snapuserd_socket:unix_stream_socket { accept listen getattr read write };
|
|
|
|
|
|
|
|
# This arises due to first-stage init opening /dev/null without F_CLOEXEC
|
|
|
|
# (see SetStdioToDevNull in init). When we fork() and execveat() snapuserd
|
|
|
|
# again, the descriptor leaks into the new process.
|
|
|
|
allow snapuserd kernel:fd use;
|