From: Matteo Croce Date: Mon, 8 Jul 2024 23:50:53 +0000 (+0200) Subject: homed: use O_PATH for FDs X-Git-Tag: v257-rc1~877^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2bae668311df819de5843936ef12bf03b23db19e;p=thirdparty%2Fsystemd.git homed: use O_PATH for FDs `Home->pin_fd` is used only for pinning, open it with O_PATH. --- diff --git a/src/home/homed-home.c b/src/home/homed-home.c index da64d1a8b6f..664397e55e0 100644 --- a/src/home/homed-home.c +++ b/src/home/homed-home.c @@ -386,7 +386,7 @@ static void home_pin(Home *h) { return; } - h->pin_fd = open(path, O_RDONLY|O_DIRECTORY|O_CLOEXEC); + h->pin_fd = open(path, O_PATH|O_DIRECTORY|O_CLOEXEC); if (h->pin_fd < 0) { log_warning_errno(errno, "Couldn't open home directory '%s' for pinning, ignoring: %m", path); return;