summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* siphash24: fix memory alignmentDaniel Mack2017-04-26
| | | | | | | Use unaligned_read_le64() to access input buffer when reading complete 64-bit words. This should fix memory traps on platforms with strict aliasing.
* logind: don't assert if the slice is missingLennart Poettering2017-04-26
| | | | | After all, we don't actually really need the slice to work, it's just nice to have it.
* conf-parser: use extract_first_wordDavid Reynolds2017-04-26
|
* virt: make sure that we detect unknown container managers as ↵Lennart Poettering2017-04-26
| | | | | | | | VIRTUALIZATION_CONTAINER_OTHER If we don't know a container manager, we should consider it as "other" rather than as no container manager at all, to provide a somwhat useful upgrade path.
* log: whitespace style fixMichal Schmidt2017-04-26
|
* detect-virt: detect in best-heuristic orderAndrew Jones2017-04-26
| | | | | | | | afaict, this will fix a regression caused by commit 75f86906c5. Where we used to report "kvm" before that patch, without this patch, we would only report "qemu". The reason is because cpuid detection must come before dmi detection. Also, both can safely come before other xen heuristics. Untested.
* detect-virt: dmi: look for KVMAndrew Jones2017-04-26
| | | | | | | | | | | | Some guests (ARM, AArch64, x86-RHEL) have 'KVM' in the product name. Look for that first in order to more precisely report "kvm" when detecting a QEMU/KVM guest. Without this patch we report "qemu", even if KVM acceleration is in use on ARM/AArch64 guests. I've only tested a backported version of this and the previous patch on an AArch64 guest (which worked). Of course it would be nice to get regression testing on all guest types that depend on dmi done.
* arm/aarch64: detect-virt: check dmiAndrew Jones2017-04-26
| | | | | | | | ARM/AArch64 guests now have SMBIOS tables populated (when boot with a late enough QEMU and a late enough AAVMF is used as the bootloader). Furthermore, when booting ARM/AArch64 guests with ACPI, the DT detection obviously no longer works, so we need dmi detection.
* sd-daemon: explicitly filter out -1 when parsing watchdog timeoutLennart Poettering2017-04-26
| | | | | | We already filter out 0, and as -1 is usually special (meaning infinity, as in USEC_INFINITY) we should better not accept it either. Better safe than sorry...
* sd-daemon: fix potential LISTEN_FDS overflow in sd_listen_fds()Vito Caputo2017-04-26
|
* sd-daemon: verify NOTIFY_SOCKET path lengthLennart Poettering2017-04-26
|
* process-util: make some minor corrections to PID live detectionLennart Poettering2017-04-26
|
* path-util: minor coding style fixLennart Poettering2017-04-26
| | | | | | We usually avoid relying on C's degrade-to-boolean functionality when comparing numerical variables with 0. We use it only for pointers and actual booleans.
* util-lib: move formats-util.h from shared/ to basic/Lennart Poettering2017-04-26
| | | | | It's only a header file, definining format strings for basic system types, hence it should be in src/basic/, not src/shared/.
* logind: minor clean-upsLennart Poettering2017-04-26
|
* basic: parse_timestamp UTC and fractional seconds supportHristo Venev2017-04-26
|
* login: suspend - be a bit more explicit when loggingTom Gundersen2017-04-26
| | | | | | | | | | 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.
* sd-daemon: wipe out memory before using CMSG_NXTHDR()Daniel Mack2017-04-26
| | | | | | | | 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.
* sd-daemon: simply code simplificationLennart Poettering2017-04-26
| | | | No change in behaviour, just make the code more obvious.
* util: minor modernization of vt_disallocate()Lennart Poettering2017-04-26
|
* util: always enforce O_NOCTTY and O_CLOEXEC in openpt_in_namespace()Lennart Poettering2017-04-26
| | | | | | | 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.
* login: fix re-use of usersDavid Herrmann2017-04-26
| | | | | | | | | | | | 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.
* do not change stderr/stdout variables.Enno Boland2017-04-26
| | | | | musl for example marks those variables as const and therefore fails while building at this file.
* Prep v227: Add missing Makefile symlinksSven Eden2017-04-12
|
* Prep v227: Removed src/shared/cgroup-show.[hc], it is not needed.Sven Eden2017-04-10
|
* Prep v227: Clean up some headers in src/systemdSven Eden2017-04-09
| | | | | | - src/systemd/sd-bus.h - src/systemd/sd-daemon.h - src/systemd/sd-event.h
* Prep v227: Clean up various *-util.[hc] filesSven Eden2017-04-09
| | | | | | | | - 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]
* Fix assertion failure when resuming from sleep/suspendSven Eden2017-04-04
|
* [5/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* [4/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* [3/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* [2/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* [1/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* missing.h : add bridge paramsSusant Sahani2017-03-29
|
* siphash24: expose the internal helper functionsTom Gundersen2017-03-29
|
* siphash24: make siphash24_compress decomposableTom Gundersen2017-03-29
| | | | | | This allows the input to siphash24_compress to be decomposed into smaller chunks and the function to be called on each individual chunk.
* siphash24: move last compression iteration from compression step to ↵Tom Gundersen2017-03-29
| | | | | | | 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.
* siphash24: split out the compression stepTom Gundersen2017-03-29
|
* siphash24: split out the finalization stepTom Gundersen2017-03-29
|
* siphash24: introduce state structTom Gundersen2017-03-29
| | | | | Encapsulate the four state variables in a struct so we can more easily pass them around.
* log: properly return -EINVAL from log_set_max_level_from_string()Lennart Poettering2017-03-29
| | | | | | | | 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.
* sd-event: don't provide priority stabilityDavid Herrmann2017-03-29
| | | | | | | | | | | | | | 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.
* prioq: never shuffle identical entriesDavid Herrmann2017-03-29
| | | | | Skip shuffling identical entries in shuffle_up(), just like we already do in shuffle_down().
* sd-event: fix prepare priority queue comparison functionKrzysztof Kotlenga2017-03-29
| | | | | | | 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
* mising: add __NR_memfd_create syscall number for s390Hendrik Brueckner2017-03-29
|
* mount: propagate error codes correctlyDavid Herrmann2017-03-29
| | | | | | | | | | 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>.
* util: clean-ups to enum parsersLennart Poettering2017-03-29
| | | | | | | | | | | | 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.
* util: minor cleanups for loop_read() and friendsLennart Poettering2017-03-29
| | | | | | | | 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.
* pam: elogind-user - call selinux moduleKay Sievers2017-03-29
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1262933
* sd-id128: make size constraints a bit more obviousLennart Poettering2017-03-29
|