]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-device: allow to read sysattr which contains embedded NUL 20039/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Jun 2021 01:40:07 +0000 (10:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Jun 2021 01:48:28 +0000 (10:48 +0900)
commit70160c6eeee07ac6aa817826d13e8eff9563ce1e
treeff8b81a04b27499b6f107b4186f0cb166381bb0f
parent2e9ee9cf15ffe9e4fed61818b6ec80e1e370af4e
sd-device: allow to read sysattr which contains embedded NUL

This effectively reverts the commit 2a394d0bf2f0afd8b9ed5faeb33f23459e3c6504.

But drop trailing '\r' of the read value, as sd_device_set_sysattr_value() drops it.

Fixes #20025.
src/libsystemd/sd-device/sd-device.c