| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When the Suspend method is called, the only log message we write
(unless debugging is enabled) is "Operation finished.". This is
not very helpful when trying to figure out what is going on, so
add what operation we are talking about to the message:
"Operation 'sleep' finished.".
Hat tip to Daniel Aleksandersen for pointing this out.
|
|
|
|
|
|
|
|
| |
CMSG_NXTHDR() checks for cmsg->cmsg_len *after* it increased the pointer.
While this makes sense for parsing received messages, that's a pitfall
for code crafting messages with this macro.
Wipe out the allocated memory to fix this.
|
|
|
|
| |
No change in behaviour, just make the code more obvious.
|
| |
|
|
|
|
|
|
|
| |
The child process is shortliving, hence always set O_NOCTTY so that the
tty doesn't quickly become controlling TTY and then gives it up again.
Also set O_CLOEXEC, because it's cleaner, and doesn't affect the parent
anyway.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 "elogind --user"
instance.
Fix this by properly allowing user_start() to be called, even if
user->stopping is true.
|
| |
|
|\
| |
| | |
fix musl-libc for 227.2/227.3: do not change stderr/stdout variables.
|
|/
|
|
|
| |
musl for example marks those variables as const and therefore
fails while building at this file.
|
| |
|
| |
|
|\
| |
| | |
Candidate for next Version v227
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
- src/systemd/sd-bus.h
- src/systemd/sd-daemon.h
- src/systemd/sd-event.h
|
| |
| |
| |
| |
| |
| |
| |
| | |
- src/basic/cgroup-util.[hc]
- src/basic/memfd-util.[hc]
- src/basic/path-util.[hc]
- src/basic/process-util.[hc]
- src/basic/smack-util.[hc]
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This allows the input to siphash24_compress to be decomposed into
smaller chunks and the function to be called on each individual
chunk.
|
| |
| |
| |
| |
| |
| |
| | |
finalization step
The last compression is special as it deals with the length byte, and padding. Move
it to the finalization step in preparation for making compression decomposable.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Encapsulate the four state variables in a struct so we can more easily pass
them around.
|
| |
| |
| |
| |
| |
| |
| |
| | |
If we just return the value we got from log_level_from_string() on
failure we'll return -1, which is not a proper error code.
log_set_target_from_string() did get this right already, hence let's fix
this here too.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, we guarantee that if two event-sources with the same priority
fire at the same time, they're always dispatched in the same order. While
this might sound nice in theory, there's is little benefit in providing
stability on that level. We have no control over the order the events are
reported, hence, we cannot guarantee that we get notified about both at
the same time.
By dropping the stability guarantee, we loose roughly 10% Heap swaps in
the prioq on a desktop cold-boot. Krzysztof Kotlenga even reported up to
20% on his tests. This sounds worth optimizing, so drop the stability
guarantee.
|
| |
| |
| |
| |
| | |
Skip shuffling identical entries in shuffle_up(), just like we already do
in shuffle_down().
|
| |
| |
| |
| |
| |
| |
| | |
Otherwise a disabled event source can get swapped with an enabled one
and cause a severe sd-event malfunction.
http://lists.freedesktop.org/archives/elogind-devel/2015-September/034356.html
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The variables should be quoted inside [...] to avoid double macro
expansion. This is currently not an issue, since the values (-W...) are
not really macros, but we might as well just fix that issue now.
Tested by re-running autogen.sh and comparing the value of OUR_CFLAGS in
the generated Makefile. Ran a full build from a clean tree to confirm
no other issues were introduced.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure to propagate error codes from mount-loops correctly. Right now,
we return the return-code of the first mount that did _something_. This is
not what we want. Make sure we return an error if _any_ mount fails (and
then make sure to return the first error to not hide proper errors due to
consequential errors like -ENOTDIR).
Reported by cee1 <fykcee1@gmail.com>.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Never log when we fail due to OOM when translating enums, let the caller
do that. Translating basic types like enums should be something where
the caller logs, not the translatior functions.
Return -1 when NULL is passed to all enum parser functions.
The non-fallback versions of the enum translator calls already handle
NULL as failure, instead of hitting an assert, and we should do this
here, too.
|
| |
| |
| |
| |
| |
| |
| |
| | |
When 0 bytes are to be written, make sure to go into read() at least
once, in order to validate the parameters, such as the passed fd.
Return error on huge values, add a couple of asserts and casts where
appropriate.
|
| |
| |
| |
| | |
https://bugzilla.redhat.com/show_bug.cgi?id=1262933
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The size of the allocated array for received file descriptors was
incorrectly calculated. This did not matter when a single file
descriptor was received, but for more descriptors the allocation was
insufficient.
|
| |
| |
| |
| |
| | |
IA64 is missing this syscall as of linux-4.2.
This works around it until the necessary kernel patch gets merged.
|
| | |
|