Age | Commit message (Collapse) | Author |
|
Otherwise we will not be able to queuery whether devices are initialized on kdbus enabled systems.
|
|
|
|
|
|
when processing multi-part message
|
|
|
|
We may receive RTM_NEWLINK messages with missing LINKINFO after the initial NEWLINK message,
don't bother verifying these, just drop out early after checking that the ifindex is not in conflict.
|
|
|
|
|
|
This essentially swaps the roles of rtnl and udev in networkd. After this
change libudev is only used for waiting for udev to initialize devices and
to get udev-specific information needed for some [Match] attributes.
This in particular simplifies the code in containers where udev is not really
useful, but also simplifies things and reduces round-trips in the non-container
case.
|
|
|
|
|
|
|
|
|
|
If nothing interesting was receieved we should not put anything on
the queue.
|
|
Also, don't actually read any of the message when peeking, just get its length.
|
|
This reverts commit 9754d56e9b21bfe89fc18f47987d6bef491b8521.
It causes a crash in PID1:
Apr 19 13:49:32 lon systemd[1]: Code should not be reached 'Unhandled socket type.'
at src/core/socket.c:684, function instance_from_socket(). Aborting.
Apr 19 13:49:32 lon systemd[1]: Caught <ABRT>, dumped core as pid 336.
Apr 19 13:49:32 lon systemd[1]: Freezing execution.
|
|
When starting up journald on a new system, set the proper permissions on
the system.journal files, not only on the journal directory.
|
|
|
|
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1088418
|
|
create_symlink() do not check the return value of unlink(), this may
confuse the user.
Before the unlink() call we check the 'force' argument. If it is not set
we fail with -EEXIST, otherwise we unlink() the file, therefore the next
symlink() should not fail with -EEXIST (do not count races...).
However since callers may not have appropriate privileges to unlink()
the file we lose the -EPERM or any other errno code of unlink(), and
return the -EEXIST of the next symlink(). Fix this by checking unlink()
results.
Before:
$ systemctl --force --root=~/container-03 set-default multi-user.target
Failed to set default target: File exists
After:
$ systemctl --force --root=~/container-03 set-default multi-user.target
Failed to set default target: Permission denied
|
|
Currently "systemctl set-default" will fail to change the default target
due to the 'default.target' being a symlink which is always the case.
To work around this, the user must specify the "--force" switch to be
able to overwrite the existing symlink.
This is clearly a regression that was introduced by commit 718db96199e
since it worked before without the "--force" switch and the man pages do
not mention that you need to specify it. It is expected that this is a
symlink.
So just explicity set the force flag to make it work again.
https://bugs.freedesktop.org/show_bug.cgi?id=76623
Reported-by: <code@progandy.de>
|
|
NixOS uses Unix domain sockets for certain host <-> container
interaction; i.e. the host connects to a socket visible in the
container's directory tree, where the container uses a .socket unit to
spawn the handler program on demand. This worked in systemd 203, but
in 212 fails with "foo.socket failed to queue service startup job
(Maybe the service file is missing or not a template unit?): No data
available".
The reason is that getpeercred() now returns ENODATA if it can't get
the PID of the client, which happens in this case because the client
is not in the same PID namespace. Since getpeercred() is only used to
generate the instance name, this patch simply handles ENODATA by
creating an instance name "<nr>-unknown".
[zj: reorder clauses and remove (unsigned long) casts.]
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1088057
|
|
test-path-utils attempts to find itself, but if the binary is not
in current directory, the test would fail.
|
|
It turns out that plain sysctl understands a.b/c syntax to write to
/proc/sys/a/b.c. Support this for compatibility.
https://bugs.freedesktop.org/show_bug.cgi?id=77466
|
|
|
|
|
|
|
|
silences a build-scan warning for the unused value in r
|
|
sec is not set if have_time is false so avoid using it. have_time
was introduced in 9ff09bcb86fb125768667aca9bc0b10b1745370a but only
the first uses for sec were covered
Found with scan-build
|
|
|
|
|
|
|
|
Rather than allocating/freeing memory for each message read, keep a global read buffer
in the rtnl object. Also, rather than using a fixed size, peek at the pending message
header to get the message size and reallocate as necessary.
|
|
messages
This means the API can stay the same as for single-part messages by simply passing the head message around. Unrefing
the head of the linked list unrefs the whole list.
|
|
|
|
The kernel may broadcast such messages, simply discard them.
|
|
The data in the PCI ids file is randomly inconsistent. Many
subvendor model strings just describe the "product" where the
hardware is built into, not the hardware itself. This causes
some "Network Card Model Foo" to show up as "Laptop Model Bar".
Try to make the best out of this mess and concatenate both
strings to describe the hardware.
|
|
|
|
The kernel can return pretty much anything there, even though the fd is
closed. Let's not get confused by that.
|
|
|
|
patch the sender address
Otherwise old libdbus1 is confused and will not accept our replies.
|
|
Previously, AddMatch/RemoveMatch calls where processed exclusively in
the proxy. That's racy however, since subscribing to a signal might not
complete before the signal is sent due to some subsequent method call.
Hence, in order to expose the same ordering guarantees as dbus1 process
the AddMatch/RemoveMatch calls from the proxy, so that they are
dispatched synchronously to all following messages, thus fixing the
race.
Ultimately, we should probabably dissolve the driver entirely into the
proxy, as it is purely a compatibility feature anyway...
|
|
necessarily monotonically increasing
|
|
|
|
|
|
|
|
|