Age | Commit message (Collapse) | Author |
|
Let's move the validation checks into the loop that sets up the main and
auxiliary transient units, so that we can generate pretty error messages
for all units a transient unit transaction generates, not just for the
main unit.
|
|
networkd fixes
|
|
Don't block indefinitely, when control has been passed on from NDisc to DHCPv6.
In this case there is likely no IPv6 support on the local link, so otherwise
this would block indefinitely.
|
|
This ensures that several DHCPv6 clients can run on separate interfaces
simultaneously.
|
|
Fixes CID#1338680. Thanks to Thomas Andersen.
|
|
We need to enable SO_REUSEADDR in order for several sockets to be allowed
to bind to the same port (even on different links).
|
|
The ndisc client may trigger the dhcpv6 client to be started (this is the common case),
so we should allocate the dhcpv6 client whenever we allocate the ndisc one.
|
|
Move daemon-reload from package %post scripts to file triggers
|
|
tree-wide: group include of libudev.h with sd-*
|
|
journalctl: don't print -- No entries -- in quiet mode
|
|
|
|
|
|
Only cosmetics really, doesn't change any actual logic.
|
|
|
|
use them everywhere
|
|
a) Use _cleanup_ where it makes sense
b) Uniformly use negative errno-style errors internally, convert to
EXIT_FAILURE/EXIT_SUCCESS only when actually exiting.
c) Use log_oom() where appropriate
d) Fix minor memory leak in hashmap addition error path.
e) Don't pretend we could continue sensibly on OOM or fork() failure
f) Use PR_SET_PDEATHSIG to make sure clients we don't kill on error are
cleaned up.
g) Make use of STRV_MAKE() where it's pretty to do so.
h) Simplify error paths.
|
|
Let's make sure the destructor cannot hit the n_ref == 0 case.
|
|
|
|
|
|
--user due to EACCES
After all, in the classic hierarchy that's pretty much the default case.
|
|
|
|
siphash24: let siphash24_finalize() and siphash24() return the result…
|
|
Rather than passing a pointer to return the result, return it directly
from the function calls.
Also, return the result in native endianess, and let the callers care
about the conversion. For hash tables and bloom filters, we don't care,
but in order to keep MAC addresses and DHCP client IDs stable, we
explicitly convert to LE.
|
|
Sort the includes accoding to the new coding style.
|
|
Add a few includes that we rely on to be include already.
|
|
The clients may be triggered to be started repeatedly without being stopped first,
simply swallow the error rather than failing the link.
|
|
siphash42: add tests with unaligned input pointers
|
|
login: allow re-using users (v3)
|
|
Add test case for calling siphash24 with unaligned input pointers, as we
commonly get with calling it on the result on basename() or similar.
This provides a test for PR #1916, rescued from the superseded PR #1911.
Thanks to Steve Langasek for the test!
|
|
If we requeue jobs, we are no longer interested in old jobs. Hence, we
better ignore any JobRemoved signals for old jobs and concentrate on our
replacements.
|
|
siphash: alignment
|
|
tmpfiles: create subvolumes for "v", "q", and "Q" only if / is a subv…
|
|
When queuing unit jobs, we should rather replace existing units than
fail. This is especially important when we queued a user-shutdown and a
new login is encountered. In this case, we better raplce the shutdown
jobs. systemd takes care of everything else.
|
|
If the last reference to a user is released, we queue stop-jobs for the
user-service and slice. Only once those are finished, we drop the
user-object. However, if a new session is opened before the user object is
fully dropped, we currently incorrectly re-use the object. This has the
effect, that we get stale sessions without a valid "systemd --user"
instance.
Fix this by properly allowing user_start() to be called, even if
user->stopping is true.
|
|
Make sure to put static fields together in "struct User". This makes it
easier to figure out the lifetime of each field.
|
|
Just like user->slice, there is no reason to store the unit name in /run,
nor should we allocate it dynamically on job instantiation/removal. Just
keep it statically around at all times and rely on user->started ||
user->stopping to figure out whether the unit exists or not.
|
|
Few changes to user_new() and user_free():
- Use _cleanup_(user_freep) in constructor
- return 'int' from user_new()
- make user_free() deal with partially initialized objects
- keep reverse-order in user_free() compared to user_new()
- make user_free() return NULL
- make user_free() accept NULL as no-op
|
|
Currently, we allocate user->slice when starting a slice, but we never
release it. This is incompatible if we want to re-use a user object once
it was stopped. Hence, make sure user->slice is allocated statically on
the user object and use "u->started || u->stopping" as an indication
whether the slice is actually available on pid1 or not.
|
|
Lets not pretend we support changing XDG_RUNTIME_DIR via logind state
files. There is no reason to ever write the string into /run, as we
allocate it statically based on the UID, anyway. Lets stop that and just
allocate the runtime_path in "struct User" at all times.
We keep writing it into the /run state to make sure pam_systemd of
previous installs can still read it. However, pam_systemd is now fixed to
allocate it statically as well, so we can safely remove that some time in
the future.
Last but not least: If software depends on systemd, they're more than free
to assume /run/user/$uid is their runtime dir. Lets not require sane
applications to query the environment to get their runtime dir. As long as
applications know their login-UID, they should be safe to deduce the
runtime dir.
|
|
It's not a good idea to create subvolumes for parts of the OS tree (such
as /home, or /var) if the root directory is not a subvolume too. We
shouldn't assume control of "heavier" objects such as subvolumes, if the
originating object (the root directory) is a "light-weight" object, i.e.
a plain directory.
Effectively this means that chroot() environments that are run on a
plain directory do not have to deal with problems around systemd
creating subvolumes that cannot be removed with a simple "rm" anymore.
However, if the chroot manager creates a proper subvolume for such an
environment it will also get further subvolumes placed in there, under
the assumption that the manager understands the concept of subvolumes in
that case.
|
|
Change the "out" parameter from uint8_t[8] to uint64_t. On architectures which
enforce pointer alignment this fixes crashes when we previously cast an
unaligned array to uint64_t*, and on others this should at least improve
performance as the compiler now aligns these properly.
This also simplifies the code in most cases by getting rid of typecasts. The
only place which we can't change is struct duid's en.id, as that is _packed_
and public API, so we can't enforce alignment of the "id" field and have to
use memcpy instead.
|
|
Use unaligned_read_le64() to access input buffer when reading complete
64-bit words.
This should fix memory traps on platforms with strict aliasing.
|
|
Also add test code for that.
|
|
Enable TasksMax by default for all units
|
|
nitpick from PR #1910
|
|
network: dhcp6 - fix mem leak
|
|
machined,logind: be more careful when accepting PIDs and UIDs from clients
|
|
|
|
|
|
Also, enable TasksAccounting= for all services by default, too.
See:
http://lists.freedesktop.org/archives/systemd-devel/2015-November/035006.html
|