From: Michael Tremer Date: Mon, 24 Mar 2025 18:10:15 +0000 (+0000) Subject: pakfire: Don't leak our locking fd into the jail X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de0e07a8970780087e4778d1425521a05de7ee53;p=pakfire.git pakfire: Don't leak our locking fd into the jail Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/pakfire.c b/src/pakfire/pakfire.c index 08a17ccb..eea0a94b 100644 --- a/src/pakfire/pakfire.c +++ b/src/pakfire/pakfire.c @@ -302,7 +302,7 @@ static int pakfire_setup_path(struct pakfire* self, const char* path) { return r; // Open the path - r = open(self->path, O_DIRECTORY); + r = open(self->path, O_DIRECTORY|O_CLOEXEC); if (r < 0) { ERROR(self->ctx, "Could not open %s: %m\n", self->path); return -errno;