]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
f4ef809c | 2 | #pragma once |
49e942b2 KS |
3 | |
4 | /*** | |
5 | This file is part of systemd. | |
6 | ||
7 | Copyright 2010 Lennart Poettering | |
39bdfa31 | 8 | Copyright 2013 Kay Sievers |
49e942b2 KS |
9 | |
10 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
11 | under the terms of the GNU Lesser General Public License as published by |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
49e942b2 KS |
13 | (at your option) any later version. |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 18 | Lesser General Public License for more details. |
49e942b2 | 19 | |
5430f7f2 | 20 | You should have received a copy of the GNU Lesser General Public License |
49e942b2 KS |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
22 | ***/ | |
23 | ||
4ad49000 LP |
24 | #include <sys/types.h> |
25 | ||
c31ad024 | 26 | int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid, bool follow_symlink); |
c66e7f04 | 27 | int mkdir_parents(const char *path, mode_t mode); |
c66e7f04 | 28 | int mkdir_p(const char *path, mode_t mode); |
4ad49000 | 29 | |
66b6d9d5 | 30 | /* mandatory access control(MAC) versions */ |
c31ad024 | 31 | int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid, bool follow_symlink); |
39bdfa31 KS |
32 | int mkdir_parents_label(const char *path, mode_t mode); |
33 | int mkdir_p_label(const char *path, mode_t mode); | |
39bdfa31 KS |
34 | |
35 | /* internally used */ | |
36 | typedef int (*mkdir_func_t)(const char *pathname, mode_t mode); | |
c31ad024 | 37 | int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, bool follow_symlink, mkdir_func_t _mkdir); |
39bdfa31 KS |
38 | int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir); |
39 | int mkdir_p_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir); |