* bootctl, systemd-oomd, systemd-repart, systemd-sysusers, and
systemd-tmpfiles now accept -n as a short option for --dry-run.
+ Changes in systemd-tmpfiles:
+
+ * systemd-tmpfiles now rejects non-empty argument fields for tmpfiles.d
+ line types that do not use the argument field. Previously, such
+ fields were silently ignored after a warning.
+
Changes in the TPM Subsystem:
* The way that NvPCRs are anchored has been improved. They are now
- **tmpfiles:**
- allow time-based cleanup in r and R too
- - instead of ignoring unknown fields, reject them.
- creating new directories/subvolumes/fifos/device nodes
should not follow symlinks. None of the other adjustment or creation
calls follow symlinks.
<para>Fields may contain C-style escapes. With the exception of the seventh field (the "argument") all
fields may be enclosed in quotes. Note that any whitespace found in the line after the beginning of the
argument field will be considered part of the argument field. To begin the argument field with a
- whitespace character, use C-style escapes (e.g. <literal>\x20</literal>).</para>
+ whitespace character, use C-style escapes (e.g. <literal>\x20</literal>). Line types which do not
+ document use of the argument field reject a non-empty argument field; use <literal>-</literal> to leave
+ the argument field empty.</para>
<refsect2>
<title>Type</title>
and <varname>T</varname>, determines extended attributes to be set. For <varname>a</varname> and
<varname>A</varname>, determines ACL attributes to be set. For <varname>h</varname> and <varname>H</varname>,
determines the file attributes to set. For <varname>k</varname> and <varname>K</varname>, determines
- file capabilities to be set. Ignored for all other lines.</para>
+ file capabilities to be set. For line types that do not document use of this field, a non-empty
+ argument is rejected; use <literal>-</literal> to leave it unset.</para>
<para>This field can contain specifiers, see below.</para>
</refsect2>
case ADJUST_MODE:
case RELABEL_PATH:
case RECURSIVE_RELABEL_PATH:
- if (i.argument)
- log_syntax(NULL, LOG_WARNING, fname, line, 0,
- "%c lines don't take argument fields, ignoring.", (char) i.type);
+ if (i.argument) {
+ *invalid_config = true;
+ return log_syntax(NULL, LOG_ERR, fname, line, SYNTHETIC_ERRNO(EBADMSG),
+ "%c lines don't take argument fields.", (char) i.type);
+ }
break;
case CREATE_FILE:
test ! -e /tmp/test
# Test invalid config
+ret=0
systemd-tmpfiles --inline --remove 'garbage' || ret=$?
test "$ret" -eq 65 # EX_DATAERR
+ret=0
+systemd-tmpfiles --inline --create 'd /tmp/test - - - - unexpected' || ret=$?
+test "$ret" -eq 65 # EX_DATAERR
+
echo 'garbage' >/tmp/config.conf
+ret=0
systemd-tmpfiles --remove /tmp/config.conf || ret=$?
test "$ret" -eq 65 # EX_DATAERR
+ret=0
systemd-tmpfiles --remove /tmp/config-missing.conf || ret=$?
test "$ret" -eq 1
fi
# Check for an invalid "age" and "age-by" arguments.
-for a in ':' ':1s' '2:1h' 'nope:42h' '" :7m"' 'm:' '::' '"+r^w-x:2/h"' 'b ar::64'; do
+for a in ':' ':1s' '2:1h' 'nope:42h' '" :7m"' 'm:' '::' '"+r^w-x:2/h"' '"b ar::64"'; do
systemd-tmpfiles --clean - <<EOF 2>&1 | grep -F 'Invalid age' >/dev/null
d /tmp/ageby - - - ${a} -
EOF