Skip to content

Commit 69d3904

Browse files
committed
linux: create error from uidgidmap_helper
Closes: containers#1976 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
1 parent 33c3150 commit 69d3904

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libcrun/linux.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2987,7 +2987,12 @@ uidgidmap_helper (char *helper, pid_t pid, const char *map_file, libcrun_error_t
29872987
}
29882988
args[nargs++] = NULL;
29892989

2990-
return run_process (args, err) ? -1 : 0;
2990+
ret = run_process (args, err);
2991+
if (ret < 0)
2992+
return ret;
2993+
if (ret > 0)
2994+
return crun_make_error (err, 0, "`%s` exited with status %d", helper, ret);
2995+
return 0;
29912996
}
29922997

29932998
static int

0 commit comments

Comments
 (0)