richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
b7dd4d
From 100324ef0d911913e09db71e030a5ba137ac357e Mon Sep 17 00:00:00 2001
b7dd4d
From: Yu Watanabe <watanabe.yu+github@gmail.com>
b7dd4d
Date: Wed, 7 Apr 2021 19:19:45 +0900
b7dd4d
Subject: [PATCH] udev: it is not necessary that the path is readable
b7dd4d
b7dd4d
Related: #1939914
b7dd4d
b7dd4d
(cherry picked from commit 70c35e4bfd64f24c7cb3536bdf63af537e0f2971)
b7dd4d
---
b7dd4d
 src/udev/udev-builtin-net_id.c | 2 +-
b7dd4d
 1 file changed, 1 insertion(+), 1 deletion(-)
b7dd4d
b7dd4d
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
b7dd4d
index 816661fb93..ba7638fcb8 100644
b7dd4d
--- a/src/udev/udev-builtin-net_id.c
b7dd4d
+++ b/src/udev/udev-builtin-net_id.c
b7dd4d
@@ -502,7 +502,7 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) {
b7dd4d
 
b7dd4d
                                 if (safe_atoi(attr, &function_id) >= 0 &&
b7dd4d
                                     asprintf(&str, "%s/%08x/", slots, function_id) >= 0 &&
b7dd4d
-                                    access(str, R_OK) == 0) {
b7dd4d
+                                    access(str, F_OK) == 0) {
b7dd4d
                                         hotplug_slot = function_id;
b7dd4d
                                         domain = 0;
b7dd4d
                                 } else