| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Introduced in 4f9ff96a55187927a4164a19df580329f4c6522b.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nominally, the bug was in unit_load_dropin(), which just took the last mtime
instead of calculating the maximum. But instead of adding code to wrap the
loop, this patch goes in the other direction.
All (correct) callers of config_parse() followed a very similar pattern to
calculate the maximum mtime. So let's simplify things by making config_parse()
assume that mtime is initialized and update it to the maximum. This makes all
the callers that care about mtime simpler and also fixes the issue in
unit_load_dropin().
config_parse_many_nulstr() and config_parse_many() are different, because it
makes sense to call them just once, and current ret_mtime behaviour make sense.
Fixes #17730, https://bugzilla.redhat.com/show_bug.cgi?id=1933137.
|
|\
| |
| | |
Allow overriding of fallback hostname through envvar and os-release field
|
| |
| |
| |
| | |
No functional change as long as only one path is passed.
|
|/
|
|
|
|
|
| |
A good chunk of parse-util.[ch] has been about parsing parts per
hundred/thousand/ten-thousand. Let's split that out into its own file.
No code changes, just some shuffling around.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Requested in
https://github.com/systemd/systemd/pull/15206#discussion_r505506657,
preserve the full granularity for memory pressure limits (permyriad)
instead of capping out at percent.
|
|
|
|
|
| |
The trailing NULL in the argument list is now implied (similar to
what we already have in place in strjoin()).
|
|\
| |
| | |
libsystemd-network: split network-internal.c
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
parse_boolean returns either 0 or 1 or error, and we checked for errors
earlier already.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Six years ago we declared it obsolete and removed it from the docs
(c073a0c4a5ffbf6677dd6af02e7c7d59b2b901ab) and added a note about it in
NEWS. Two years ago we add warning messages about it, indicating the
feature will be removed (41b283d0f1f4abd85d0bbeeb7f71bb30f87cfab9) and
mentioned it in NEWS again.
Let's now kill it for good.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up for 9f83091e3cceb646a66fa9df89de6d9a77c21d86.
Instead of reading the mtime off the configuration files after reading,
let's do so before reading, but with the fd we read the data from. This
is not only cleaner (as it allows us to save one stat()), but also has
the benefit that we'll detect changes that happen while we read the
files.
This also reworks unit file drop-ins to use the common code for
determining drop-in mtime, instead of reading system clock for that.
|
| |
|
|
|
|
| |
Fixes #15521.
|
|
|
|
|
| |
Add a option to provide a UUID for the partition that will get
created and document that.
|
|
|
|
| |
Signed-off-by: Rubens Figueiredo <rubens.figueiredo@bisdn.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An stdio FILE* stream usually refers to something with a file
descriptor, but that's just "usually". It doesn't have to, when taking
fmemopen() and similar into account. Most of our calls to fileno()
assumed the call couldn't fail. In most cases this was correct, but in
some cases where we didn't know whether we work on files or memory we'd
use the returned fd as if it was unconditionally valid while it wasn't,
and passed it to a multitude of kernel syscalls. Let's fix that, and do
something reasonably smart when encountering this case.
(Running test-fileio with this patch applied will remove tons of ioctl()
calls on -1).
|
|
|
|
| |
Fixes #14929.
|
|\ |
|
| | |
|
|/
|
|
| |
Fixes #14620.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
syntax
If we ignore any uknown section, we will not be able to show any
warning if a typo in a section name is made. Let's reverse our
approach, and explicitly list sections to ignore instead.
I opted to make use the same section list for this, instead of adding a second
list, because this list is passed through to many functions and adding yet
another parameter to the long signature would be very noisy.
|
|
|
|
| |
This is an internal implementation detail.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
→ EXTRACT_UNQUOTE"
This reverts commit 8a07b4033e5d3c86931b3dd2ddbca41118c05c60.
The tests are kept. test-networkd-conf is adjusted to pass.
This fixes #13276. I think current rules are extremely confusing, as the
case in test-networkd-conf shows. We apply some kinds of unescaping (relating
to quoting), but not others (related to escaping of special characters).
But fixing this is hard, because people have adjusted quoting to match
our rules, and if we make the rules "better", things might break in unexpected
places.
|
|
|
|
| |
"lvalue" is our internal jargon. Let's try not to confuse non-programmers.
|
|
|
|
|
|
|
|
| |
Urlich Windl wrote on the mailing list:
> I noticed that a line of "=======" in "[Service]" cases the message " Unknown lvalue '' in section 'Service'".
This now becomes:
/etc/systemd/system/eqeqeqeq.service:3: Missing key name before '=', ignoring line.
|
|
|
|
|
|
| |
We generally don't treat syntax error as fatal, but in this case we would
completely refuse to load the file. I think we should treat the the same
as assignment outside of a section, or an unknown key name.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EXTRACT_UNQUOTE
It's hard to even say what exactly this combination means. Escaping is
necessary when quoting to have quotes within the string. So the escaping of
quote characters is inherently tied to quoting. When unquoting, it seems
natural to remove escaping which was done for the quoting purposes. But with
both flags we would be expected to re-add this escaping after unqouting? Or
maybe keep the escaping which is not necessary for quoting but otherwise
present? This all seems too complicated, let's just forbid such usage and
always fully unescape when unquoting.
|
|
|
|
|
|
| |
Whenever I see EXTRACT_QUOTES, I'm always confused whether it means to
leave the quotes in or to take them out. Let's say "unquote", like we
say "cunescape".
|
|
|
|
|
|
|
| |
Before this commit, empty lines cannot break continuation.
The bug was introduced by 9adbfeb38ac101d6f73a033bb120d63513ffb240.
Closes #12883.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works like parse_sec() but defaults to USEC_INFINITY when passed an
empty string or only whitespace.
Also introduce config_parse_sec_def_infinity, which can be used to parse
config options using this function.
This is useful for time options that use "infinity" for default and that
can be reset by unsetting them.
Introduce a test case to ensure it works as expected.
|
|
|
|
| |
Closes #11343.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the ability to configure which cgroup controllers to mount
together. Instead, we'll now hardcode that "cpu" and "cpuacct" are
mounted together as well as "net_cls" and "net_prio".
The concept of mounting controllers together has no future as it does
not exist to cgroupsv2. Moreover, the current logic is systematically
broken, as revealed by the discussions in #10507. Also, we surveyed Red
Hat customers and couldn't find a single user of the concept (which
isn't particularly surprising, as it is broken...)
This reduced the (already way too complex) cgroup handling for us, since
we now know whenever we make a change to a cgroup for one controller to
which other controllers it applies.
|
|
|
|
| |
Fixes #10598.
|
| |
|