Age | Commit message (Collapse) | Author |
|
unit_write_drop_in{,_private}{,_format} are all affected.
We already append a header to the file (and section markers), so those functions
can only be used to write a whole file at once. Including the newline at
the end feels natural.
After this commit newlines will be duplicated. They will be removed in
subsequent commit.
Also, rewrap the "autogenerated" header to fit within 80 columns.
|
|
|
|
It's harder to miss the comment without the newline ;)
See https://github.com/systemd/systemd/pull/3336#issuecomment-221749423
for context.
|
|
various sd-Ipv4ll/sd-ipv4acd fixes
|
|
systemctl: return success for set-default, add-wants, add-requires...
|
|
We need to explicitly define authorizations for allow_inactive and
allow_active. Otherwise one is getting "Access denied" when run from a
local console:
$ loginctl enable-linger
Could not enable linger: Access denied
|
|
On the unified hierarchy, memory controller implements three control knobs -
low, high and max which enables more useable and versatile control over memory
usage. This patch implements support for the three control knobs.
* MemoryLow, MemoryHigh and MemoryMax are added for memory.low, memory.high and
memory.max, respectively.
* As all absolute limits on the unified hierarchy use "max" for no limit, make
memory limit parse functions accept "max" in addition to "infinity" and
document "max" for the new knobs.
* Implement compatibility translation between MemoryMax and MemoryLimit.
v2:
- Fixed missing else's in config_parse_memory_limit().
- Fixed missing newline when writing out drop-ins.
- Coding style updates to use "val > 0" instead of "val".
- Minor updates to documentation.
|
|
dbus-cgroup fixes
|
|
|
|
nspawn: filesystem uid patching fixes and other minor improvments
|
|
|
|
|
|
|
|
The argument is about capabilities.
|
|
Split seccomp into nspawn-seccomp.[ch]. Currently there are no changes,
but this will make it easy in the future to share or use the seccomp logic
from systemd core.
|
|
Rename is_procfs_sysfs_or_suchlike() to is_fs_fully_userns_compatible()
to give it the real meaning. This may prevent future modifications that
may introduce bugs.
|
|
Add some special filesystems that should not be shifted, most of them
relate to the host and not to containers.
|
|
We have to pass addresses of changes and n_changes to
bus_deserialize_and_dump_unit_file_changes(). Otherwise we are hit by
missing information (subsequent calls to unit_file_changes_add() to
not add anything).
Also prevent null pointer dereference in
bus_deserialize_and_dump_unit_file_changes() by asserting.
Fixes #3339
|
|
As suggested:
https://github.com/systemd/systemd/pull/3328#discussion-diff-64285764
|
|
Let's use usec_t internally always, when dealing with time values.
Let's use uint8_t* pointers if we are dealing with generic byte pointers.
|
|
Whitespace doesn't hurt and helps structuring things.
|
|
|
|
Let's better check the size before we subtract. Also, let's change the size
argument to size_t, as it cannot be signed anyway.
Finally, use EBADMSG for indicating invalid packets, like we do everywhere
else.
|
|
|
|
Otherwise it gets too confusing whether "timeout" refers to an event source or
just a timeout time specification.
|
|
Also make use of it where appropriate.
|
|
There's no "client" object, in both cases. There's only "nd".
This wasn't noticed before, as the context object is currently not actually
used by the log macros.
|
|
|
|
Appears to be a (confusing) left-over from copy/paste when this still was
ipv4ll code.
|
|
|
|
Appears to be a copy/paste mistake from sd-ipv4ll. Let's get rid of this.
|
|
Let's make the seed actually work as stable seed, and use siphash24 to generate
the series of addresses, instead of the opaque libc random_r().
This not only makes the seed truly work as stable, portable seed, but also
makes the code quite a bit shorter, and removes a couple of memory allocations.
|
|
Let's make clear this always has the same size, since otherwise it's not useful
for reproducible runs, which this is really about however.
|
|
for errors
|
|
We try to stick to usec_t for encoding time information, do that here too. In
particular, get rid of "int" second specifications, since signed timespans are
a weird thing.
|
|
|
|
|
|
This state is active immediately after the state engine was started, but before
the first timer hits.
This way multiple _start() invocations on the same object are always detected
correctly.
|
|
This is much less confusing, since there's also sd_ipv4acd_stop(), which was
idfferent from ipv4acd_stop().
After renaming it, let's also use the funciton when destroying ipv4acd objects,
as the code is pretty much the same for that.
|
|
Otherwise the field "receive_message" is a bit too confusing, as it suggests it
actually stores a message object of some kind.
|
|
They are counters after all, and can never go below zero, hence don't pretend
with the chose type that they could.
Also, prefix their name with "n_", to indicate that they are counters.
|
|
And some other minor fixes.
|
|
Or actually, not at any level higher than debug.
|
|
These objects are only useful when multiple threads are involved, as they
operate with atomic operations. Given that our libraries are explicitly not
thread-safe don't make use of RefCnt here, and make things a bit simpler.
|
|
It's OK to abbreviate this in the local scope, but otherwise, let's not be
needlessly terse.
|
|
|
|
It's a good idea to make stopcalls idempotent, so that they become nops if the
object is already stopped.
|
|
assert_return() should only be used to validate user-facing parameters and
state, assert() should be used for checking our own internal state and
parameters.
|
|
After all, it's actually used for resetting the state, not only for the initial
initialization.
While we are at it, also simplify the error path for
sd_ndisc_discovery_start().
|
|
A field "index" is not particularly precise and also might conflict with libc's
index() function definition. Also, pretty much everywhere else we call this
concept "ifindex", including in networkd, the primary user of these libraries.
Hence, let's fix this up and call this "ifindex" everywhere here too.
|