| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
| |
This adds a new sd_pid_get_cgroup() call to sd-login which may be used
to query the control path of a process. This is useful for programs when
making use of delegation units, in order to figure out which subtree has
been delegated.
In light of the unified control group hierarchy this is finally safe to
do, hence let's add a proper API for it, to make it easier to use this.
|
|
|
|
|
|
| |
Makre sure we always return sensible errors for the various, following
the same rules, and document them in a comment in sd-login.c. Also,
update all relevant man pages accordingly.
|
|
|
|
|
| |
After all a path is a path is a path and we should use path_equal() to
comapre those.
|
|
|
|
|
|
|
| |
session
ENODATA is how we usually indicate such "missing info" cases, so we
should do this here, too.
|
|
|
|
|
|
| |
This simply factors out the uid validation checks from parse_uid() and
uses them everywhere. This simply verifies that the passed UID is
neither 64bit -1 nor 32bit -1.
|
|
|
|
|
|
| |
We should never connect to the host bus as fallback if connecting to a
container failed via one method. Otherwise connecting to a dbus1
container will always result in a connection to the host.
|
|
|
|
|
|
| |
We rely on the correct error used when opening the kdbus device node,
hence let's make sure we pass it up from the namespaced child process to
the process which actually wants to connect.
|
|
|
|
| |
We really should care for all cgroups, and not allow hidden ones.
|
|
|
|
| |
It won't work anyway.
|
|
|
|
| |
Like we do it pretty much everywhere else.
|
|
|
|
|
|
|
|
|
|
| |
On Dell and HP laptops the dock state/events (SW_DOCK) come from the "{Dell,HP}
WMI hotkeys" input devices. Tag them as power-switch so that login actually
considers them. Use a general match in case this affects other vendors, too.
Thanks to Andreas Schultz for debugging this!
https://launchpad.net/bugs/1450009
|
|
|
|
|
|
|
| |
let's return ENXIO whenever we don't know something rather than ENOENT.
ENOENT suggests this was really about a file or directory, while ENXIO
is a more generic "not found" indicator.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dbus-1.10 was just released, including systemd units to run
`dbus-daemon --session` as systemd user unit. This allows using a
user-bus with dbus1, just like we do per default with kdbus.
All the dbus libraries have already been fixed long ago to use the
user-bus as default. Hence, there's no need to set
DBUS_SESSION_BUS_ADDRESS= if we use the user-bus. However, gdm and
friends continue to spawn a session bus if this variable is not set
(instead of checking for the existence of the user-bus). Hence, we force
the user-bus, if it is available, in pam_elogind. Once gdm and friends
are fixed, we can continue to drop this again. However, that might take
a while.
With this in place, all that is needed to make the user-bus work is:
`systemctl --global enable dbus.socket`
If dbus.socket is not enabled, the legacy session-bus is still used.
Based on a patch by: Jan Alexander Steffens <jan.steffens@gmail.com>
|
|
|
|
|
| |
Let's help users to debug issues with epoll fd removal by printing the
name of the event source.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor allocation of the result string to the top, since it is
currently done in both branches of the condition.
Remove unreachable code checking for EXTRACT_DONT_COALESCE_SEPARATORS
when state == SEPARATOR (the only place where SEPARATOR is assigned to
state follows a check for EXTRACT_DONT_COALESCE_SEPARATORS that jumps to
the end of the function.)
Tested by running test-util successfully.
Follow up to: 206644aedeb8859801051ac170ec562c6a113a79
|
|
|
|
|
|
|
|
|
|
|
|
| |
This covers the case where an argument is an empty string, such as ''.
Instead of allocating the empty string in the individual conditions when
state == VALUE, just always allocate it at the end of state == START, at
which point we know we will have an argument.
Tested that test-util keeps passing after the refactor.
Follow up to: 14e685c29d5b317b815e3e9f056648027852b07e
|
| |
|
|
|
|
|
|
| |
... instead of an array of n individual bytes.
Silences a lot of warnings in smatch.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This way we can be sure that less has the same idea of the terminal as
we do.
This solves issues in systems that have locale uninitalized, where
systemd would output UTF-8 but less wouldn't allow it and show them as
control characters.
|
|
|
|
|
|
| |
It's really confusing if stdout goes to the pager, but stderr is written
directly to the screen. Hence, make sure both stdout and stderr are
passed to the pager when doing autopaging.
|
|
|
|
|
| |
Let's unescape cgroups on presentation, so that we show literal unit
names.
|
| |
|
|
|
|
|
| |
It's an OK way to check whether a message contains an erro, let's not
consider this a loggable assertion event.
|
|
|
|
|
|
|
| |
refcnt.h only exists for cases where objects are simultaneously handled
by different threads. Otherwise it should not be used. The only case
where this applies is sd_bus, really, and pretty much none of our APIs,
since we do not claim thread-safety for them.
|
|
|
|
| |
functions.
|
|
|
|
| |
during git am transfer.
|
|
|
|
| |
during git am transfer.
|
|
|
|
| |
during git am transfer.
|
|
|
|
| |
that got lost during git am transfer.
|
|
|
|
| |
that got lost during git am transfer.
|
|
|
|
| |
got lost during git am transfer.
|
|
|
|
| |
lost during git am transfer.
|
|
|
|
| |
during git am transfer.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add a couple of new properties to the supported set we can pass in
systemd-run's and systemd-nspawn's --property= switch.
|
|
|
|
|
|
|
|
| |
If a connection passed KDBUS_HELLO_ACTIVATOR, it cannot do I/O on the
bus. Hence, we should not treat it as proper peer. To actually query it,
you have to explicitly ask for activators.
This makes kdbus in-line with what dbus-daemon does.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the controlling process exits, any existing file descriptors
for that FD will be marked as hung-up and ioctls on them will
file with EIO. To work around this, open a new file descriptor
for the VT we want to clean up.
Thanks to Ray Strode for help in sorting out the problem and
coming up with a fix!
https://github.com/systemd/systemd/issues/989
|
|
|
|
|
|
|
|
|
|
|
| |
The open_terminal() function adds retries in case a terminal
is in the process of being closed when we open it, and should
generally be used to open a terminal. We especially need it
for code that a subsequent commit adds that reopens the terminal
at session shut-down time; such races would be more likely in
that case.
Found by Ray Strode.
|
|
|
|
|
| |
The function "mfree" should be called instead of "free" at a specific
source code place.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since dacd6cee76a08331b8c8616c5f30f70ee49aa2f9 the two OOM's are
ignored as the value of r will be overwritten and we only log in
the fail section anyway.
This patch jumps to fail on OOM.
Note that this is different behavior compared to both the current
code and previous to dacd6cee76a08331b8c8616c5f30f70ee49aa2f9. Before
that commit we would log that saving the inhibit data failed, but
still write the file, though without the WHO/WHY section.
CID# 1313545
|
|
|
|
| |
bus can never be NULL due to assert
|
|
|
|
| |
This matches what open(2) and other system functions do.
|
|
|
|
|
| |
The kernel nowadays sends these along, and that's OK, hence don't even
debug log about it, but completely ignore it.
|
|
|
|
|
| |
Alpha does not have a getpid syscall, but rather has getxpid to match
OSF/1.
|
|
|
|
|
|
| |
Similar in function to LIST_INSERT_AFTER, this will insert a new element
into the list before the specified position. If the specified position
is NULL, the element is added as the tail of the list.
|
|
|
|
| |
That's just handle this as a normal error.
|