From 15b54482241083d52b6e9857a66fecbf915d467d Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 8 Jun 2023 20:05:18 +0200 Subject: cooker: Full support for flags and masks, assorted fixes Signed-off-by: Stefano Brivio --- operations.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'operations.c') diff --git a/operations.c b/operations.c index 120b142..b08d837 100644 --- a/operations.c +++ b/operations.c @@ -141,15 +141,15 @@ static int prepare_arg_clone(const struct seccomp_notif *req, struct gluten *g, static int set_namespaces(struct arg_clone *c) { - char *path; + char (*path)[PATH_MAX]; int fd; - for (path = c->ns_path[0]; *path; path++) { - if ((fd = open(path, O_CLOEXEC)) < 0) - ret_err(-1, "open for file %s", path); + for (path = c->ns_path; **path; *path++) { + if ((fd = open(*path, O_CLOEXEC)) < 0) + ;//ret_err(-1, "open for file %s", *path); if (setns(fd, 0) != 0) - ret_err(-1, "setns"); + ;//ret_err(-1, "setns"); } return 0; } -- cgit v1.2.3