summaryrefslogtreecommitdiffstats
path: root/src/shared/mkdir-label.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-01-28 15:11:29 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-01-28 15:11:29 +0100
commit2312fd17cc225a1bc52d469f21a4479b96f87d8f (patch)
tree17f6cfda3692dbbf121ba0da1ebe014d2f881bbd /src/shared/mkdir-label.c
parentukify: python 3.9 compat followup (diff)
downloadsystemd-2312fd17cc225a1bc52d469f21a4479b96f87d8f.tar.xz
systemd-2312fd17cc225a1bc52d469f21a4479b96f87d8f.zip
mkdir-label: Add mkdir_parents_safe_label()
Diffstat (limited to 'src/shared/mkdir-label.c')
-rw-r--r--src/shared/mkdir-label.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c
index 53081d5e17..e3afc2b666 100644
--- a/src/shared/mkdir-label.c
+++ b/src/shared/mkdir-label.c
@@ -33,6 +33,10 @@ int mkdirat_parents_label(int dir_fd, const char *path, mode_t mode) {
return mkdirat_parents_internal(dir_fd, path, mode, UID_INVALID, UID_INVALID, 0, mkdirat_label);
}
+int mkdir_parents_safe_label(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags) {
+ return mkdir_parents_internal(prefix, path, mode, uid, gid, flags, mkdirat_label);
+}
+
int mkdir_p_label(const char *path, mode_t mode) {
return mkdir_p_internal(NULL, path, mode, UID_INVALID, UID_INVALID, 0, mkdirat_label);
}