| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|\ |
|
| |
| |
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
(cherry picked from commit ebe2a26256e14e071ca5263e64f8021ba6276e70)
|
| |
| |
| |
| | |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
DBUS_SESSION_BUS_ADDRESS.
|
| | | |
|
|\ \ \ |
|
| | | | |
|
|\ \ \ \
| | |/ /
| |/| | |
|
| |\ \ \
| | | |/
| | |/| |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
With glibc, at least v2.28, program_invocation_short_name is not a
string of its own, but simply points into program_invocation_name.
When elogind is forked, the fork process gets a new name. Upstream
has decided to change to long version, which is the correct thing
to do. Unfortunately program_invocation_short_name is not adapted,
and all further log messages using it might print anything.
This patch manipulates program_invocation_short_name if its adress
lies within program_invocation_name and its original length.
Bug: #92
Closes: #92
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | | |
previous thorough checks became unneccessary
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
first error.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This check always returns error -EHOSTDOWN, because sd_booted()
always returns 0. This will fix loginctl execution error, returned
from the login/loginctl.c:main().
Before enabling user buses, this check was bypassed by re-routing
attempts to connect to user buses to the system bus.
Bug: #87
Bug: #93
Closes: #93
Sigend-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The behaviour of sd_event_add_signal() has changed, it is no longer
neccessary to mask the signal beforehand.
Actually the masking causes it to be ignored, and thus the
registration of the signal handler to fail.
Bug: #90
Closes: #90
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The new detection works, but the consequences weren't enforced
strictly enough.
This lead to SIGABRT on glibc-2.27 systems, when elogind detected
that both variables where different and tried to free them.
But program_invocation_short_name is just a pointer into to long name
memory, so freeing it is leading to a crash.
The resolution is to fully use the new detection: If the used libc
provides both, we do not care about anything any more, as the used
libc is bound to handle everything correctly.
Bug: #92
Closes: #92
Signed-Off-By: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: #83
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As elogind supports musl-libc, we have to remedy the situation that
upstream decided to make use of qsort_r(). This function is not
provided by musl-libc, so we have to provide an own variant.
The variant is an adaption of the qsort_r() algorithm found in
glibc-2.28, the disclaimer from their source files have been added.
Bug: #83
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since D-Bus 1.9.14 (2015-03-02) dbus looks in $XDG_RUNTIME_DIR/bus for
the system bus on its own, hence we can finally drop setting this
environment variable. gdbus since glib 2.45.3 (June 2015) also supports
it.
Closes: #87
Sigend-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: #87
Closes: #87
Signed-off-by: Cameron Nemo <camerontnorman@gmail.com>
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
(emersion):
> sd-bus is shipped with elogind, so it makes sense to ship the
> busctl command, too.
This is not only a nice helper tool to take a closer look at what is
happening on the dbus, it will also prove to be usefull if something
like issue #59 happens ever again. There we had to use dbus-send
directly to dissect the bus traffic.
Bug: #86
Closes: #86
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: #84
Closes: #84
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: #85
Closes: #85
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: #88
Closes: #88
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #9403
(cherry picked from commit f02582f69fe1e7663a87ba80bd4f90d5d23ee75f)
|
| | | |
| | | |
| | | |
| | | | |
(cherry picked from commit cb9e44db36caefcbb8ee7a12e14217305ed69ff2)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
journald calls fd_get_path() a lot (it probably shouldn't, there's some
room for improvement there, but I'll leave that for another time), hence
it's worth optimizing the call a bit, in particular as it's easy.
Previously we'd open the dir /proc/self/fd/ first, before reading the
symlink inside it. This means the whole function requires three system
calls: open(), readlinkat(), close(). The reason for doing it this way
is to distinguish the case when we see ENOENT because /proc is not
mounted and the case when the fd doesn't exist.
With this change we'll directly go for the readlink(), and only if that
fails do an access() to see if /proc is mounted at all.
This optimizes the common case (where the fd is valid and /proc
mounted), in favour of the uncommon case (where the fd doesn#t exist or
/proc is not mounted).
(cherry picked from commit f267719c389de57ceda433f6288a505e7eeb2f8f)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I noticed while profiling journald that we invoke readlinkat() a ton on
open /proc/self/fd/<fd>, and that the returned paths are more often than
not longer than the 99 chars used before, when we look at archived
journal files. This means for these cases we generally need to execute
two rather than one syscalls.
Let's increase the buffer size a tiny bit, so that we reduce the number
of syscalls executed. This is really a low-hanging fruit of
optimization.
(cherry picked from commit 8e060ec225b74bbf22e5bdbacd604efcc73294c0)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
First of all, let's fix logging: let's simply log the same message as we
do on success, so that there's always the same pair of these messages
around, regardless if the suspend was successful or not. To distuingish
a successful suspend from a failed one, check the ERRNO= field of the
structured message.
In most ways a failed suspend cycle is not distuingishable from a
successful one that took no time, hence let's treat it this way, and
always pair the success message with a failure message.
This also changes a more important concept: the post-suspend callouts
are now called also called on failure, following the same logic: let's
always run them in pairs: for every pre callout a post callout has to
follow.
(cherry picked from commit 14250f0942b0c1122a35d678e73945d7adf9cfa0)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This function is about compatibility, nothing else, hence we should make
it properly compatible.
Fixes: #9556
(cherry picked from commit def34f63fe066c964764733242b332774070bac6)
|
| | | |
| | | |
| | | |
| | | | |
(cherry picked from commit 8f7329ac276306dfaf6cc47920f3c5e71a0ab586)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The helper is supposed to properly handle cases where .sun_path does not
contain a NUL byte, and thus copies out the path suffix a NUL as
necessary.
This also reworks the more specific socket_address_unlink() to be a
wrapper around the more generic sockaddr_un_unlink()
(cherry picked from commit 9f20fc28f0a624ea49ac941bcde57b5435a01b6e)
|
| | | |
| | | |
| | | |
| | | | |
(cherry picked from commit 242c41b850af8ebc0c7a0cd44be057e50b5a027a)
|