}
} else {
info(udev, "mknod(%s, %#o, (%u,%u))\n", file, mode, major(devnum), minor(devnum));
+ util_create_path(udev, file);
udev_selinux_setfscreatecon(udev, file, mode);
err = mknod(file, mode, devnum);
udev_selinux_resetfscreatecon(udev);
}
} else {
info(udev, "creating symlink '%s' to '%s'\n", slink, target);
+ util_create_path(udev, slink);
udev_selinux_setfscreatecon(udev, slink, S_IFLNK);
err = symlink(target, slink);
udev_selinux_resetfscreatecon(udev);
info(udev, "atomically replace '%s'\n", slink);
util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, TMP_FILE_EXT, NULL);
unlink(slink_tmp);
+ util_create_path(udev, slink);
udev_selinux_setfscreatecon(udev, slink, S_IFLNK);
err = symlink(target, slink_tmp);
udev_selinux_resetfscreatecon(udev);
unlink(slink);
util_delete_path(udev, slink);
} else {
- util_create_path(udev, slink);
info(udev, "creating link '%s' to '%s'\n", slink, target);
node_symlink(udev, target, slink);
}
major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)),
mode, uid, gid);
- util_create_path(udev, udev_device_get_devnode(dev));
if (udev_node_mknod(dev, NULL, makedev(0,0), mode, uid, gid) != 0) {
err = -1;
goto exit;
/* create/update symlinks, add symlinks to name index */
udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) {
- if (udev_list_entry_get_flag(list_entry)) {
+ if (udev_list_entry_get_flag(list_entry))
/* simple unmanaged link name */
- util_create_path(udev, udev_list_entry_get_name(list_entry));
node_symlink(udev, udev_device_get_devnode(dev), udev_list_entry_get_name(list_entry));
- } else {
+ else
link_update(dev, udev_list_entry_get_name(list_entry), 1);
- }
}
exit:
return err;