Merge pull request #7663 from keszybz/mkdir-return-value

util-lib: fix return value in mkdir_parents()
This commit is contained in:
Lennart Poettering
2017-12-24 11:59:58 +01:00
committed by GitHub
10 changed files with 69 additions and 56 deletions
-20
View File
@@ -42,26 +42,6 @@ int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
return 0;
}
int mkdir_label(const char *path, mode_t mode) {
int r;
assert(path);
r = mac_selinux_create_file_prepare(path, S_IFDIR);
if (r < 0)
return r;
if (mkdir(path, mode) < 0)
r = -errno;
mac_selinux_create_file_clear();
if (r < 0)
return r;
return mac_smack_fix(path, false, false);
}
int symlink_label(const char *old_path, const char *new_path) {
int r;