summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Prep v235: Update build system to fit elogindSven Eden2017-08-16
| | | | | | - Update man/rules/meson.build with elogind set of xml files. - Update documentation generating tools to fit elogind. - Follow upstream and link against libelogind-shared-<version>.so
* Prep v235: Add missing includes and dependencies.Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (10/10) [src/update-utmp]Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (9/10) [src/test]Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (8/10) [src/systemd]Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (7/10) [src/shared]Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (6/10) [src/login]Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (5/10) [src/libelogind]Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (4/10) [src/core]Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (3/10) [src/basic]Sven Eden2017-08-14
|
* Prep v235: Remove superfluous .gitignore filesSven Eden2017-08-14
|
* tests: when running a manager object in a test, migrate to private cgroup ↵Lennart Poettering2017-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subroot first (#6576) Without this "meson test" will end up running all tests in the same cgroup root, and they all will try to manage it. Which usually isn't too bad, except when they end up clearing up each other's cgroups. This race is hard to trigger but has caused various CI runs to fail spuriously. With this change we simply move every test that runs a manager object into their own private cgroup. Note that we don't clean up the cgroup at the end, we leave that to the cgroup manager around it. This fixes races that become visible by test runs throwing out errors like this: ``` exec-systemcallfilter-failing.service: Passing 0 fds to service exec-systemcallfilter-failing.service: About to execute: /bin/echo 'This should not be seen' exec-systemcallfilter-failing.service: Forked /bin/echo as 5693 exec-systemcallfilter-failing.service: Changed dead -> start exec-systemcallfilter-failing.service: Failed to attach to cgroup /exec-systemcallfilter-failing.service: No such file or directory Received SIGCHLD from PID 5693 ((echo)). Child 5693 ((echo)) died (code=exited, status=219/CGROUP) exec-systemcallfilter-failing.service: Child 5693 belongs to exec-systemcallfilter-failing.service exec-systemcallfilter-failing.service: Main process exited, code=exited, status=219/CGROUP exec-systemcallfilter-failing.service: Changed start -> failed exec-systemcallfilter-failing.service: Unit entered failed state. exec-systemcallfilter-failing.service: Failed with result 'exit-code'. exec-systemcallfilter-failing.service: cgroup is empty Assertion 'service->main_exec_status.status == status_expected' failed at ../src/src/test/test-execute.c:71, function check(). Aborting. ``` BTW, I tracked this race down by using perf: ``` # perf record -e cgroup:cgroup_mkdir,cgroup_rmdir … # perf script ``` Thanks a lot @iaguis, @alban for helping me how to use perf for this. Fixes #5895.
* sd-login: test - fix failure when run from non-graphical seatAlan Jenkins2017-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observed when running from the console of a elogind nspawn container (see failure below). The value of r was tested, when r was last set by sd_session_can_graphical(). This did not correspond to the value expected. Fix the code, so we compare relevant values now. Hopefully :). Test failure ------------ /* Information printed is from the live system */ sd_pid_get_unit(0, …) → "session-13.scope" sd_pid_get_user_unit(0, …) → "n/a" sd_pid_get_slice(0, …) → "user-1000.slice" sd_pid_get_session(0, …) → "13" sd_pid_get_owner_uid(0, …) → 1000 sd_pid_get_cgroup(0, …) → "/user.slice/user-1000.slice/session-13.scope" sd_uid_get_display(1000, …) → "13" sd_uid_get_sessions(1000, …) → [2] "15 13" sd_uid_get_seats(1000, …) → [1] "seat0" sd_session_is_active("13") → yes sd_session_is_remote("13") → no sd_session_get_state("13") → "active" sd_session_get_uid("13") → 1000 sd_session_get_type("13") → "tty" sd_session_get_class("13") → "user" sd_session_get_display("13") → "n/a" sd_session_get_remote_user("13") → "n/a" sd_session_get_remote_host("13") → "n/a" sd_session_get_seat("13") → "seat0" sd_session_can_multi_seat("seat0") → no sd_session_can_tty("seat0") → no sd_session_can_graphical("seat0") → no sd_uid_get_state(1000, …) → active Assertion '!!k == !!r' failed at ../src/libelogind/sd-login/test-login.c:191, function test_login(). Aborting.
* sd-login: test - fix function name in outputAlan Jenkins2017-08-10
|
* treewide: fix typos (#6566)Torstein Husebø2017-08-10
|
* sd-bus: free everything when bus_set_address_user fails (#6552)Evgeny Vereshchagin2017-08-10
| | | | | | | | | | | | | | | | | | Fixes: ``` $ env -i valgrind --leak-check=full ./build/test-bus-chat ... ==7763== 1,888 (1,824 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 2 ==7763== at 0x4C2FA50: calloc (vg_replace_malloc.c:711) ==7763== by 0x4F8FF9A: sd_bus_new (sd-bus.c:175) ==7763== by 0x4F938BF: sd_bus_open_user (sd-bus.c:1138) ==7763== by 0x109ACD: server_init (test-bus-chat.c:70) ==7763== by 0x10BCF8: main (test-bus-chat.c:526) ==7763== ``` Closes #6481
* process-util: add sched_{policy,priority}_is_valid()Yu Watanabe2017-08-10
|
* securebits-util: add secure_bits_{from_string,to_string_alloc}()Yu Watanabe2017-08-10
|
* bus-util: do not print (uint64_t) -1 as is (#6522)Yu Watanabe2017-08-10
| | | | Closes #4295 and #6511.
* process-util: update the end pointer of the process name on rename (#6492)Jouke Witteveen2017-08-10
| | | | | We only updated the end pointer when allocating new memory, i.e. on the first call to rename_process.
* resolved,nss-myhostname: use _gateway for the gatewayZbigniew Jędrzejewski-Szmek2017-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the symbolic name for the default gateway from "gateway" to "_gateway". A new configuration option -Dcompat-gateway-hostname=true|false is added. If it is set, the old name is also supported, but the new name is used as the canonical name in either case. This is intended as a temporary measure to make the transition easier, and the option should be removed after a few releases, at which point only the new name will be used. The old "gateway" name mostly works OK, but hasn't gained widespread acceptance because of the following (potential) conflicts: - it is completely legal to have a host called "gateway" - there is no guarantee that "gateway" will not be registered as a TLD, even though this currently seems unlikely. (Even then, there would be no conflict except for the case when the top-level domain itself was being resolved. The "gateway" or "_gateway" labels have only special meaning when the whole name consists of a single label, so resolution of any subdomain of the hypothetical gateway. TLD would still work OK. ) Moving to "_gateway" avoids those issues because underscores are not allowed in host names (RFC 1123, §2.1) and avoids potential conflicts with local or global names. v2: - simplify the logic to hardcode "_gateway" and allow -Dcompat-gateway-hostname=true as a temporary measure.
* string-util: optimize strshorten() a bitLennart Poettering2017-07-20
| | | | | There's no reason to determine the full length of the string, it's sufficient to know whether it is larger than the intended size...
* alloc-util: add new helpers memdup_suffix0() and newdup_suffix0()Lennart Poettering2017-07-20
| | | | | | | These are similar to memdup() and newdup(), but reserve one extra NUL byte at the end of the new allocation and initialize it. It's useful when copying out data from fixed size character arrays where NUL termination can't be assumed.
* process-util: slightly optimize querying of our own process metadataLennart Poettering2017-07-17
| | | | When we are checking our own data, we can optimize things a bit.
* core, sd-bus, logind: make use of uid_is_valid() in more placesLennart Poettering2017-07-14
|
* basic: cosmetic changes (#6440)Yu Watanabe2017-08-10
|
* Drop kdbus bitsZbigniew Jędrzejewski-Szmek2017-08-10
| | | | | | | | | Some kdbus_flag and memfd related parts are left behind, because they are entangled with the "legacy" dbus support. test-bus-benchmark is switched to "manual". It was already broken before (in the non-kdbus mode) but apparently nobody noticed. Hopefully it can be fixed later.
* Drop bus-policy bitsZbigniew Jędrzejewski-Szmek2017-08-10
|
* Drop busname unit typeZbigniew Jędrzejewski-Szmek2017-08-10
| | | | | | | Since busname units are only useful with kdbus, they weren't actively used. This was dead code, only compile-tested. If busname units are ever added back, it'll be cleaner to start from scratch (possibly reverting parts of this patch).
* virt: enable detecting QEMU (TCG) via CPUID (#6399)Daniel Berrange2017-08-10
| | | | | | | | | | | | QEMU >= 2.10 will include a CPUID leaf with value "TCGTCGTCGTCG" on x86 when running with the TCG CPU emulator: https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg05231.html Existing methods of detecting QEMU are left unchanged for sake of backcompatibility. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* basic: use _unlocked() stdio in strip_tab_ansi() (#6385)Vito Caputo2017-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial performance boost by explicitly bypassing the implicit locking of stdio. This significantly affects common cases of `journalctl` usage: Before: # time ./journalctl -b -1 > /dev/null real 0m26.628s user 0m26.495s sys 0m0.125s # time ./journalctl -b -1 > /dev/null real 0m27.069s user 0m26.936s sys 0m0.134s # time ./journalctl -b -1 > /dev/null real 0m26.727s user 0m26.607s sys 0m0.119s After: # time ./journalctl -b -1 > /dev/null real 0m23.394s user 0m23.244s sys 0m0.142s # time ./journalctl -b -1 > /dev/null real 0m23.283s user 0m23.160s sys 0m0.121s # time ./journalctl -b -1 > /dev/null real 0m23.274s user 0m23.125s sys 0m0.144s Fixes https://github.com/elogind/elogind/issues/6341
* test-hashmap: use $SYSTEMD_SLOW_TESTS variableZbigniew Jędrzejewski-Szmek2017-08-10
| | | | | test-hashmap is a very good test, but it gets in the way when one wants to compile and quickly test changes.
* General: Update build system to upstream support of meson+ninja.Sven Eden2017-08-04
| | | | | | | | Upstream thinks, that the auto tools are too 'legacy', or that they are at least no longer fitting. We follow, as the classic auto tools files have been removed, so no other choice here...
* Prep v234: Check against TRANSPORT_LOCAL in check_inhibitors()Sven Eden2017-07-27
|
* Prep v234: Eventually fix the cgroup stuff. elogind is not init.Sven Eden2017-07-27
|
* Prep 234: Rename pam-systemd to pam-elogind in pam module init log message.Sven Eden2017-07-26
|
* Prep v234: Re-add user/session to the gc_queue when stopping.Sven Eden2017-07-26
| | | | | | If manager_gc() does not find the user/session, their respective finalize_*() method is never called, leaving stale state files in /run/systemd/sessions and run/systemd/users.
* Prep v234: Apply missing upstream fixes in src/test (6/6)Sven Eden2017-07-25
|
* Prep v234: Apply missing upstream fixes in src/systemd (5/6)Sven Eden2017-07-25
|
* Prep v234: Apply missing upstream fixes in src/shared (4/6)Sven Eden2017-07-25
|
* Prep v234: Apply missing upstream fixes in src/login (3/6)Sven Eden2017-07-25
|
* Prep v234: Apply missing upstream fixes in src/libelogind (2/6)Sven Eden2017-07-25
|
* Prep v234: Apply missing upstream fixes in src/basic (1/6)Sven Eden2017-07-25
|
* Prep v234: Remove now obsolete text files from src/libelogind/sd-busSven Eden2017-07-25
|
* Prep v234: Update root build files to upstream.Sven Eden2017-07-25
|
* Revert "core: link user keyring to session keyring (#6275)" (#6342)Lennart Poettering2017-07-25
| | | | | | | This reverts commit 437a85112e02042b62751395b9e7225628c1b708. The outcome of this isn't that clear, let's revert this for now, see discussion on #6286.
* time-util: make parse_timestamp() return -EINVAL if the input is very old ↵Yu Watanabe2017-07-25
| | | | | | | | | date (#6327) This reverts 7635ab8e74ea4a94e81143c3077570a986df375c and makes parse_timestamp() return -EINVAL if the input is older than 1970-01-01. Fixes #6290.
* Add comments to log_functions which shouldn't be called from library code ↵Zbigniew Jędrzejewski-Szmek2017-07-25
| | | | (#6326)
* random-util: we are fine if ints are 16 bytes actuallyLennart Poettering2017-07-25
| | | | Not that it matters IRL, but let's make this less surprising to read...
* random-util: always cast from smaller to bigger type when comparingLennart Poettering2017-07-25
| | | | | | When we compare two size values, let's make sure we cast from the smaller to the bigger type first, if both types differ, rather than the reverse in order to not run into overflows.