diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-20 10:47:14 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-23 06:53:09 +0900 |
commit | 10a2f90d02c484c7e1d8f3c69b46d954508e1a43 (patch) | |
tree | 15b1d530ea6f8c01dbe35c7f8e26e1c9a4aabecb /src/libsystemd/sd-device | |
parent | c9d65b921bf589ab5cab8b10cbd4a89dd5395fab (diff) | |
download | systemd-10a2f90d02c484c7e1d8f3c69b46d954508e1a43.tar.gz |
sd-device: refuse to get a parent device by sd_device_new_child()
Diffstat (limited to 'src/libsystemd/sd-device')
-rw-r--r-- | src/libsystemd/sd-device/sd-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c index 9364a69dcd..ab96f889cb 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -879,7 +879,7 @@ _public_ int sd_device_new_child(sd_device **ret, sd_device *device, const char assert_return(device, -EINVAL); assert_return(suffix, -EINVAL); - if (!path_is_normalized(suffix)) + if (!path_is_safe(suffix)) return -EINVAL; r = sd_device_get_syspath(device, &s); |