richardphibel / rpms / systemd

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