mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
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:
3 files changed
+12
-3
No files matched your search
@@ -64,3 +64,11 @@ CONF
|
||||
run "/libexec/finit/tmpfiles --create $CONF"
|
||||
assert "First match" "$(texec cat $DIR/w1 | tr '\n' ' ')" = "one two"
|
||||
assert "Second match" "$(texec cat $DIR/w2 | tr '\n' ' ')" = "one two"
|
||||
|
||||
sep
|
||||
say 'Escapes in the argument'
|
||||
run "cat > $CONF" <<'CONF'
|
||||
f /tmp/arg/hex - - - - \x39\x41\x4a\x6b
|
||||
CONF
|
||||
run "/libexec/finit/tmpfiles --create $CONF"
|
||||
assert "All hex digits" "$(texec cat $DIR/hex)" = "9AJk"
|
||||
Reference in new issue
Block a user