]> git.proxmox.com Git - systemd.git/blob - src/basic/mkdir-label.c
Merge tag 'upstream/229'
[systemd.git] / src / basic / mkdir-label.c
1 /***
2 This file is part of systemd.
3
4 Copyright 2010 Lennart Poettering
5 Copyright 2013 Kay Sievers
6
7 systemd is free software; you can redistribute it and/or modify it
8 under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation; either version 2.1 of the License, or
10 (at your option) any later version.
11
12 systemd is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with systemd; If not, see <http://www.gnu.org/licenses/>.
19 ***/
20
21 #include <stdio.h>
22 #include <sys/types.h>
23 #include <unistd.h>
24
25 #include "label.h"
26 #include "mkdir.h"
27
28 int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) {
29 return mkdir_safe_internal(path, mode, uid, gid, mkdir_label);
30 }
31
32 int mkdir_parents_label(const char *path, mode_t mode) {
33 return mkdir_parents_internal(NULL, path, mode, mkdir_label);
34 }
35
36 int mkdir_p_label(const char *path, mode_t mode) {
37 return mkdir_p_internal(NULL, path, mode, mkdir_label);
38 }