607b358ef2
This adds some extra paranoia: when we recursively chown a directory for use with DynamicUser=1 services we'll now drop suid/sgid from all files we chown(). Of course, such files should not exist in the first place, and noone should get access to those dirs who isn't root anyway, but let's better be safe than sorry, and drop everything we come across.
7 lines
158 B
C
7 lines
158 B
C
/* SPDX-License-Identifier: LGPL-2.1+ */
|
|
#pragma once
|
|
|
|
#include <sys/types.h>
|
|
|
|
int path_chown_recursive(const char *path, uid_t uid, gid_t gid, mode_t mask);
|