diff options
author | David Tardon <dtardon@redhat.com> | 2024-05-07 13:35:55 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2024-05-07 14:02:08 +0200 |
commit | 3613a1d49f7847bd20906cc3b45e959b54f91366 (patch) | |
tree | 24fbe22e3f6ae29dd10b6e617143ad906bf89acf /src/nsresourced/userns-restrict.c | |
parent | cgroup-show: pass the right error variable (diff) | |
download | systemd-3613a1d49f7847bd20906cc3b45e959b54f91366.tar.xz systemd-3613a1d49f7847bd20906cc3b45e959b54f91366.zip |
userns-restrict: pass the right error variable
Diffstat (limited to '')
-rw-r--r-- | src/nsresourced/userns-restrict.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nsresourced/userns-restrict.c b/src/nsresourced/userns-restrict.c index 4e917fd758..241a655e62 100644 --- a/src/nsresourced/userns-restrict.c +++ b/src/nsresourced/userns-restrict.c @@ -218,7 +218,7 @@ int userns_restrict_put_by_inode( r = sym_bpf_map_update_elem(outer_map_fd, &ino, &inner_map_fd, BPF_ANY); if (r < 0) - return log_debug_errno(errno, "Failed to replace map in inode hash: %m"); + return log_debug_errno(r, "Failed to replace map in inode hash: %m"); } else { /* Let's add an entry for this userns inode if missing. If it exists just extend the existing map. We * might race against each other, hence we try a couple of times */ @@ -258,7 +258,7 @@ int userns_restrict_put_by_inode( r = sym_bpf_map_update_elem(inner_map_fd, mntid, &dummy_value, BPF_ANY); if (r < 0) - return log_debug_errno(errno, "Failed to add mount ID to map: %m"); + return log_debug_errno(r, "Failed to add mount ID to map: %m"); log_debug("Allowing mount %i on userns inode %" PRIu64, *mntid, ino); } @@ -318,7 +318,7 @@ int userns_restrict_reset_by_inode( r = sym_bpf_map_delete_elem(outer_map_fd, &u); if (r < 0) - return log_debug_errno(outer_map_fd, "Failed to remove entry for inode %" PRIu64 " from outer map: %m", ino); + return log_debug_errno(r, "Failed to remove entry for inode %" PRIu64 " from outer map: %m", ino); return 0; } |