goto fail;
}
- label_context_set(d, st.st_mode);
+ mac_selinux_create_file_prepare(d, st.st_mode);
r = mknod(dn, st.st_mode, st.st_rdev);
- label_context_clear();
+ mac_selinux_create_file_clear();
if (r < 0) {
r = -errno;
if (devmqueue)
umount(devmqueue);
- if (dev) {
- umount(dev);
- rmdir(dev);
- }
-
+ umount(dev);
+ rmdir(dev);
rmdir(temporary_mount);
return r;
char temporary_mount[] = "/tmp/kdbus-dev-XXXXXX";
_cleanup_free_ char *basepath = NULL;
_cleanup_umask_ mode_t u;
- char *busnode, *root;
+ char *busnode = NULL, *root;
struct stat st;
int r;
unlink(busnode);
}
- if (root) {
- umount(root);
- rmdir(root);
- }
-
+ umount(root);
+ rmdir(root);
rmdir(temporary_mount);
return r;
char** read_write_dirs,
char** read_only_dirs,
char** inaccessible_dirs,
- char* tmp_dir,
- char* var_tmp_dir,
- char* bus_endpoint_path,
+ const char* tmp_dir,
+ const char* var_tmp_dir,
+ const char* bus_endpoint_path,
bool private_dev,
ProtectHome protect_home,
ProtectSystem protect_system,