New directives NoExecPaths= ExecPaths=
Implement directives `NoExecPaths=` and `ExecPaths=` to control `MS_NOEXEC` mount flag for the file system tree. This can be used to implement file system W^X policies, and for example with allow-listing mode (NoExecPaths=/) a compromised service would not be able to execute a shell, if that was not explicitly allowed. Example: [Service] NoExecPaths=/ ExecPaths=/usr/bin/daemon /usr/lib64 /usr/lib Closes: #17942.
This commit is contained in:
committed by
Topi Miettinen
parent
78dff3f3d7
commit
ddc155b2fd
+1
-1
@@ -243,7 +243,7 @@ struct ExecContext {
|
||||
char *apparmor_profile;
|
||||
char *smack_process_label;
|
||||
|
||||
char **read_write_paths, **read_only_paths, **inaccessible_paths;
|
||||
char **read_write_paths, **read_only_paths, **inaccessible_paths, **exec_paths, **no_exec_paths;
|
||||
unsigned long mount_flags;
|
||||
BindMount *bind_mounts;
|
||||
size_t n_bind_mounts;
|
||||
|
||||
Reference in New Issue
Block a user