Skip to content

Commit e481710

Browse files
committed
executor: check for all permission related errnos when setting up IPC namespace
Denials from AppArmor are raised as EACCES, so EPERM is not enough. Do the same check as PrivateNetwork above. Fixes systemd/systemd#31037 Related to 06384eb (cherry picked from commit cafe40e)
1 parent 632b493 commit e481710

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/exec-invoke.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4639,7 +4639,7 @@ int exec_invoke(
46394639

46404640
if (ns_type_supported(NAMESPACE_IPC)) {
46414641
r = setup_shareable_ns(runtime->shared->ipcns_storage_socket, CLONE_NEWIPC);
4642-
if (r == -EPERM)
4642+
if (ERRNO_IS_NEG_PRIVILEGE(r))
46434643
log_exec_warning_errno(context, params, r,
46444644
"PrivateIPC=yes is configured, but IPC namespace setup failed, ignoring: %m");
46454645
else if (r < 0) {

0 commit comments

Comments
 (0)