57 lines
2.5 KiB
Diff
57 lines
2.5 KiB
Diff
From 21b5276e02b981a4c2626ada991ac8c695f656ed Mon Sep 17 00:00:00 2001
|
|
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
|
Date: Thu, 12 Mar 2026 07:16:46 +0900
|
|
Subject: [PATCH] udev: drop redundant checks
|
|
|
|
This partially reverts 16325b35fa6ecb25f66534a562583ce3b96d52f3,
|
|
as bad characters are already filtered.
|
|
|
|
(cherry picked from commit c5a04f59d912fb2c3451994279dea3ae3064f6c7)
|
|
|
|
Resolves: RHEL-180923
|
|
---
|
|
src/udev/udev-builtin-net_id.c | 9 ---------
|
|
1 file changed, 9 deletions(-)
|
|
|
|
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
|
|
index 0d3c62f4b5..96e792bcde 100644
|
|
--- a/src/udev/udev-builtin-net_id.c
|
|
+++ b/src/udev/udev-builtin-net_id.c
|
|
@@ -40,7 +40,6 @@
|
|
#include "strv.h"
|
|
#include "strxcpyx.h"
|
|
#include "udev-builtin.h"
|
|
-#include "utf8.h"
|
|
|
|
#define ONBOARD_14BIT_INDEX_MAX ((1U << 14) - 1)
|
|
#define ONBOARD_16BIT_INDEX_MAX ((1U << 16) - 1)
|
|
@@ -237,9 +236,6 @@ static int get_port_specifier(sd_device *dev, bool fallback_to_dev_id, char **re
|
|
}
|
|
}
|
|
|
|
- if (!utf8_is_valid(phys_port_name) || string_has_cc(phys_port_name, /* ok= */ NULL))
|
|
- return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL), "Invalid phys_port_name");
|
|
-
|
|
/* Otherwise, use phys_port_name as is. */
|
|
buf = strjoin("n", phys_port_name);
|
|
if (!buf)
|
|
@@ -344,9 +340,6 @@ static int names_pci_onboard_label(UdevEvent *event, sd_device *pci_dev, const c
|
|
if (r < 0)
|
|
return log_device_debug_errno(pci_dev, r, "Failed to get PCI onboard label: %m");
|
|
|
|
- if (!utf8_is_valid(label) || string_has_cc(label, /* ok= */ NULL))
|
|
- return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL), "Invalid label");
|
|
-
|
|
char str[ALTIFNAMSIZ];
|
|
if (snprintf_ok(str, sizeof str, "%s%s",
|
|
naming_scheme_has(NAMING_LABEL_NOPREFIX) ? "" : prefix,
|
|
@@ -1264,8 +1257,6 @@ static int names_netdevsim(UdevEvent *event, const char *prefix) {
|
|
if (isempty(phys_port_name))
|
|
return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EOPNOTSUPP),
|
|
"The 'phys_port_name' attribute is empty.");
|
|
- if (!utf8_is_valid(phys_port_name) || string_has_cc(phys_port_name, /* ok= */ NULL))
|
|
- return log_device_debug_errno(dev, SYNTHETIC_ERRNO(EINVAL), "Invalid phys_port_name");
|
|
|
|
char str[ALTIFNAMSIZ];
|
|
if (snprintf_ok(str, sizeof str, "%si%un%s", prefix, addr, phys_port_name))
|