Lines Matching refs:node_fd
597 int node_fd, in udev_node_apply_permissions_impl() argument
609 assert(node_fd >= 0); in udev_node_apply_permissions_impl()
612 if (fstat(node_fd, &stats) < 0) in udev_node_apply_permissions_impl()
634 r = fchmod_and_chown(node_fd, mode, uid, gid); in udev_node_apply_permissions_impl()
657 q = mac_selinux_apply_fd(node_fd, devnode, label); in udev_node_apply_permissions_impl()
667 q = mac_smack_apply_fd(node_fd, SMACK_ATTR_ACCESS, label); in udev_node_apply_permissions_impl()
680 (void) mac_selinux_fix_fd(node_fd, devnode, LABEL_IGNORE_ENOENT); in udev_node_apply_permissions_impl()
682 (void) mac_smack_apply_fd(node_fd, SMACK_ATTR_ACCESS, NULL); in udev_node_apply_permissions_impl()
686 r = futimens_opath(node_fd, NULL); in udev_node_apply_permissions_impl()
702 _cleanup_close_ int node_fd = -1; in udev_node_apply_permissions() local
711 node_fd = sd_device_open(dev, O_PATH|O_CLOEXEC); in udev_node_apply_permissions()
712 if (node_fd < 0) { in udev_node_apply_permissions()
713 if (ERRNO_IS_DEVICE_ABSENT(node_fd)) { in udev_node_apply_permissions()
714 … log_device_debug_errno(dev, node_fd, "Device node %s is missing, skipping handling.", devnode); in udev_node_apply_permissions()
718 return log_device_debug_errno(dev, node_fd, "Cannot open node %s: %m", devnode); in udev_node_apply_permissions()
721 …return udev_node_apply_permissions_impl(dev, node_fd, devnode, apply_mac, mode, uid, gid, seclabel… in udev_node_apply_permissions()
732 _cleanup_close_ int node_fd = -1; in static_node_apply_permissions() local
744 node_fd = open(devnode, O_PATH|O_CLOEXEC); in static_node_apply_permissions()
745 if (node_fd < 0) { in static_node_apply_permissions()
751 if (fstat(node_fd, &stats) < 0) in static_node_apply_permissions()
782 … return udev_node_apply_permissions_impl(NULL, node_fd, devnode, false, mode, uid, gid, NULL); in static_node_apply_permissions()