tmpfiles: take 8 and 9 as hex digits in an \x escape

An f or w entry with \x39 in the argument writes the byte 3 followed
by a 9, where it should write a 9:

    f /tmp/file - - - - \x39

write_hex() only takes the digits 0 to 7, as for an octal escape.
Take all hex digits.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-21 17:13:53 +01:00
1 parent 64e299bedc
commit 7ec4376eb0
3 files changed
+12 -3

No files matched your search

+2
View File
@@ -315,6 +315,8 @@ All relevant changes are documented in this file.
- Fix age `0` in a tmpfiles entry, it was read as no age. As in
tmpfiles.d(5), `tmpfiles --clean` now empties the directory of such an
entry
- Fix `\x` escapes with the digits 8 or 9 in the argument of a tmpfiles
entry, `\x39` was written as the byte 3 and a `9`
- Fix logins refused after boot on a system with systemd's tmpfiles.d
files installed. They create `/run/nologin` at boot, and on systemd it
is removed by systemd-user-sessions. Finit now removes it when leaving