Merge pull request #7663 from keszybz/mkdir-return-value
util-lib: fix return value in mkdir_parents()
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user