summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* check nobody user/group validity only when not cross compilingChen Qi2018-10-29
| | | | | | | | | | | | | Using `getent' and `id' command in case of cross compiling does not make much sense. This is because it is the host files that are checked. Besides, in some restricted cross compilation environment, these two command may not even be available. This is to avoid host comtamination. So we should only check the validity using getent and id when not cross compiling. (cherry picked from commit 2484bff32bc5af4af811381393df1090d6e4586f)
* login1: policy: Authorize active users to boot to firmwareCarlo Caione2018-10-29
| | | | | | | | | | Currently to set the flag to reboot into the firmware setup an authentication by an administrative user is required. Since we are already enabling active users to reboot the system, it is advisable to let the user decide if he wants to boot into the firmware setup without any more hassle. (cherry picked from commit ba9778d9b7e8c33acc0d9f41e747b1066196a201)
* meson: do not build module-util.c when libkmod is not foundYu Watanabe2018-10-29
| | | | | | | | Follow-up for 3cb9b42af3b205fba176ebf51ce0e07739698278 (#9516). Fixes oss-fuzz-9532. (cherry picked from commit ba323bbead1dda558a5bbe42846cdee5c8b0fc85)
* Move module-util.h to src/shared/ and load_module() to libsharedZbigniew Jędrzejewski-Szmek2018-10-29
| | | | | | | | | | Unfortunately this needs libshared to link to libkmod. Before it was linked into systemd-udevd, udevadm, and systemd each seperately. On most systems this doesn't make much difference, because at least systemd would be installed, but it might not be in small chroots. It is a small library, so I hope this is not a big issue. (cherry picked from commit 3cb9b42af3b205fba176ebf51ce0e07739698278)
* bus-socket: Fix line_begins() to accept word matching full stringFilipe Brandenburger2018-10-29
| | | | | | | | | | | | | | | | | | | | | | | The switch to memory_startswith() changed the logic to only look for a space or NUL byte after the matched word, but matching the full size should also be acceptable. This changed the behavior of parsing of "AUTH\r\n", where m will be set to 4, since even though the word will match, the check for it being followed by ' ' or NUL will make line_begins() return false. Tested: - Using netcat to connect to the private socket directly: $ echo -ne '\0AUTH\r\n' | sudo nc -U /run/systemd/private REJECTED EXTERNAL ANONYMOUS - Running the Ignition blackbox test: $ sudo sh -c 'PATH=$PWD/bin/amd64:$PATH ./tests.test' PASS Fixes: d27b725abf64a19a6b2f99332b663f17ad046771 (cherry picked from commit 3f10c66270b74530339b3f466c43874bb40c210f)
* login: fix typo in log messageYu Watanabe2018-10-29
| | | | | | Reported in #9590. (cherry picked from commit 948f7ce4fbbb393e3c6a12ab3fbc7023b4124e43)
* format-table: fix typo in commentYu Watanabe2018-10-29
| | | | (cherry picked from commit 475d8599b0821eefb6e6c283f4f9847cffbb4b7b)
* test: add a reproducer of issue #9549Yu Watanabe2018-10-29
| | | | (cherry picked from commit a6e964712c53b877543cf18aff59ae99cffc1f50)
* format-table: make all widths be set properlyNOGISAKA Sadata2018-10-29
| | | | | | Fixes #9549. (cherry picked from commit a26db0bc5d4011de24e5930af6fd9051deeb46be)
* login: use parse_uid() when unmounting user runtime directoryYu Watanabe2018-10-29
| | | | | | | | | | | When unmounting user runtime directory, only UID is necessary, and the corresponding user may not exist anymore. This makes first try to parse the input by parse_uid(), and only if it fails, prase the input by get_user_creds(). Fixes #9541. (cherry picked from commit 86d18f3b09ec984ef3732567af992adb2dc77a8a)
* sd-bus: unref slot->match_callback.install_slot when slot is disconnectedYu Watanabe2018-10-29
| | | | | | | | | | | When a slot is disconnected, then slot->match_callback.install_slot is also disconnected. So, bus_slot_disconnect() removes the install_slot from the list of slots in bus, although it is a floating object. This makes install_slot unreffed from bus when it is disconnected. Fixes #9505 and #9510. (cherry picked from commit 20d4ee2cbc21e0c4d2dd6c01d5a18a4cf0d98222)
* Use #if instead of #ifdef for ENABLE_GSHADOWChenQi19892018-10-29
| | | | | | ENABLE_GSHADOW is defined to be 0 or 1. So #if should be used instead of #ifdef. (cherry picked from commit 4f07ffa8f5ab85011422bb7114f1cddf49d4923d)
* basic: add missing comma in raw_clone assembly for sparcMike Gilbert2018-10-29
| | | | | | Fixes: 96f64eb5741b157f26a9089816fdd992e959792e Closes: https://github.com/systemd/systemd/issues/9444 (cherry picked from commit 358248caa3eca525751694de7c34b16bb46d5a9c)
* bus-util: make log level lower in request_name_destroy_callback()Yu Watanabe2018-10-29
| | | | | | Fixes #9442. (cherry picked from commit 04e075b572b168a183cde29480dbb30d027d4fe7)
* sd-bus: fix implicit downcast of bitfield reported by LGTMYu Watanabe2018-10-29
| | | | (cherry picked from commit affaed1e55685e8e248db1afd50b3e0f466ce5cc)
* meson: rename -Ddebug to -Ddebug-extraZbigniew Jędrzejewski-Szmek2018-10-29
| | | | | | | | | Meson added -Doptimization and -Ddebug options, which obviously causes a conflict with our -Ddebug options. Let's rename it. Fixes #9883. (cherry picked from commit 8f6b442a78d0b485f044742ad90b2e8271b4e68e)
* bus-util: fix error handlingYu Watanabe2018-10-29
| | | | (cherry picked from commit 0ceff9068d4def8895929ba8c201a23502a7f941)
* core/dbus-execute: fix parsing CPUScheduling* and Nice for transient servicesYu Watanabe2018-10-29
| | | | | | Fixes #10290. (cherry picked from commit c250bf671b89768ed27984defe9b5af262618e42)
* meson: unify linux/stat.h check with other checks and use _GNU_SOURCEZbigniew Jędrzejewski-Szmek2018-10-29
| | | | | | | | Using _GNU_SOURCE is better because that's how we include the headers in the actual build, and some headers define different stuff when it is defined. sys/stat.h for example defines 'struct statx' conditionally. (cherry picked from commit 9c869d08d82c73f62ab3527567858ce4b0cf1257)
* build-sys: Detect whether struct statx is defined in sys/stat.hFilipe Brandenburger2018-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with glibc 2.27.9000-36.fc29, include file sys/stat.h will have a definition for struct statx, in which case include file linux/stat.h should be avoided, in order to prevent a duplicate definition. In file included from ../src/basic/missing.h:18, from ../src/basic/util.h:28, from ../src/basic/hashmap.h:10, from ../src/shared/bus-util.h:12, from ../src/libsystemd/sd-bus/bus-creds.c:11: /usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’ struct statx { ^~~~~ In file included from /usr/include/sys/stat.h:446, from ../src/basic/util.h:19, from ../src/basic/hashmap.h:10, from ../src/shared/bus-util.h:12, from ../src/libsystemd/sd-bus/bus-creds.c:11: /usr/include/bits/statx.h:36:8: note: originally defined here struct statx ^~~~~ Extend our meson.build to look for struct statx when only sys/stat.h is included and, in that case, do not include linux/stat.h anymore. Tested that systemd builds correctly when using a glibc version that includes a definition for struct statx. glibc Fedora RPM update: https://src.fedoraproject.org/rpms/glibc/c/28cb5d31fc1e5887912283c889689c47076278ae glibc upstream commit: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=fd70af45528d59a00eb3190ef6706cb299488fcd (cherry picked from commit 75720bff62a84896e9a0654afc7cf9408cf89a38)
* Update Version to 239.1Sven Eden2018-10-17
|
* Prep v239: Fix an issue with program_invocation[_short]_name :Sven Eden2018-10-16
| | | | | | | | | | | | | | The old implementation was done assuming that only glibc provides both program_invocation_name and program_invocation_short_name. This worked well for users using musl-libc with the library having been built without -D_GNU_SOURCE. However, alternative libc implementations that actually do provide these variables, could cause elogind to crash. To be on the safe side, we now actually check whether both these variables are present by letting meson check whether a code snippet accessing these compiles and links.
* 238/239 : Fix session finalizationSven Eden2018-10-15
| | | | | | | | | | While migrating the v237/v238 commits, a migration error caused session_may_gc() to always return false. This caused closed sessions to stay on state "closing" forever. Bug: https://github.com/elogind/elogind/issues/82 Closes: https://github.com/elogind/elogind/issues/82 Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
* Prep v239: Mask unneeded test in test-strip-ansiSven Eden2018-09-29
| | | | | | | | | | | | | | The final test use the outcome of the already masked part that utilizes terminal_urlify_path(). That function is masked, because it is nowhere used within elogind. The previously unmasked final test used the outcome of that already masked part and therefore crashed. Bug: https://github.com/elogind/elogind/issues/81 Closes: https://github.com/elogind/elogind/issues/81 Signed-of-by: Sven Eden <sven.eden@prydeworx.com>
* Create elogind-inhibit.xmlLorenzo2018-09-29
| | | Elogind is missing the man page for elogind-inhibit: this is just a copy of the systemd-inhibit manpage from systemd upstream, with 'systemd' replaced by 'elogind', where applicable.
* Prep v239: Touch .keep_dir into systemshutdowndir and systemsleepdir.Sven Eden2018-09-28
| | | | | | Package managers like Portage strip empty directories. To ensure that these directories are still installed, we simply touch empty and hidden files into them.
* Prep v239: Add execution of executables in systemshutdowndirSven Eden2018-09-28
|
* Prep v239: Unmask creation of systemshutdowndir and systemsleepdir.Sven Eden2018-09-28
| | | | | | | | | | | The creation of the system shutdown dir and the system sleep dir had been masked. This was an oversight that is now fixed. systemshutdowndir defaults to [/usr]/lib/elogind/system-shutdown systemsleepdir defaults to [/usr]/lib/elogind/system-sleep Executables in these folders are meant to run prior the system either shuts down or goes to sleep, including all variants.
* Support system_bus_socket to be found in /var/run/dbus as well as /run/dbus.Christoph Willing2018-09-26
| | | | | | | | | | | | | | | | Currently the path to system_bus_socket is hardcoded to /run/dbus/system_bus_socket which works everywhere for systemd. However, distributions which do no symlink /var/run on /run will have it only accessible via /run/dbus/system_bus_socket which should be supported by elogind, too. Closes #77 Signed-off-by: Christoph Willing <chris.willing@linux.com> Sigend-off-by: Sven Eden <sven.eden@prydeworx.com>
* Enhance the dealing with glibc-2.28Sven Eden2018-09-26
| | | | | | | It appears that the necessary bits were already there, but commented out. When meson checked for 'struct statx', the inclusion of both sys/stat.h and linux/stat.h where commented out. Uncommenting them should be enough.
* pwx: Revision bump for rebuild_all.sh having the renamed debug -> ↵Sven Eden2018-09-26
| | | | debug-extra option
* meson: rename -Ddebug to -Ddebug-extraZbigniew Jędrzejewski-Szmek2018-09-26
| | | | | | | Meson added -Doptimization and -Ddebug options, which obviously causes a conflict with our -Ddebug options. Let's rename it. Fixes #76.
* Deal with glibc-2.28Christoph Willing2018-09-25
| | | | | | Closes: https://github.com/elogind/elogind/issues/74 Signed-off-by: Christoph Willing <chris.willing@linux.com> Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
* Prep v239: Re-Add the new ENV{} mechanism to 70-power-switch.rules, but ↵Sven Eden2018-09-10
| | | | leave out gpio.
* Revert "logind: relax udev rules matching devices logind watches for"Sven Eden2018-09-10
| | | | | | | | This reverts commit 964a6d9fb555cc86528eb1cc1f6d044f85584842. Bug: https://github.com/elogind/elogind/issues/51 elogind doesn't respond to lid events with eudev-3.2.5
* pwx: Add information about v239-stableSven Eden2018-09-10
|
* Prep v239: Fix and add debug messages to method_can_shutdown_or_sleep()Sven Eden2018-08-31
|
* Prep v239: Only _HANDLE_ACTION_INVALID makes method_can_shutdown_or_sleep() ↵Sven Eden2018-08-30
| | | | answer 'no'
* Prep v239: Add support for suspend-then-hibernate to loginctl.Sven Eden2018-08-29
|
* Prep v239: Utilize new user_runtime_dir() functionSven Eden2018-08-29
|
* Prep v239: Add new user-runtime-dir main() function as user_runtime_dir().Sven Eden2018-08-29
|
* Prep v239: As we need the rootlibexecdir, 73-seat-late.rules.m4 must be ↵Sven Eden2018-08-28
| | | | configured first.
* Prep v239: meson.build: Enabled listing of now supported options.Sven Eden2018-08-28
|
* Prep v239: Sync libelogind_version with upstream libsystemd_versionSven Eden2018-08-28
|
* Prep v239: A few cosmetic upgradesSven Eden2018-08-27
|
* Prep v239: Add man/custom-entities.ent.in, we now need it.Sven Eden2018-08-24
|
* Prep v239: Do not test terminal_urlify_path()Sven Eden2018-08-24
| | | | elogind doesn't need and thus does not support it.
* Prep v239: Do not test ioprio_class_from_to_string()Sven Eden2018-08-24
| | | | elogind doesn't need and thus does not support it.
* Prep v239: Mask unneedd tests test_copy_atomic() and assert_equal_fd()Sven Eden2018-08-24
|
* Prep v239: Unmask cg_weight_parse()Sven Eden2018-08-24
|