chiark / gitweb /
elogind.git
7 months agoCommit patch queue (exported by git-debrebase) chiark/234.4-1+devuan1.1+iwj1
Ian Jackson [Fri, 5 Oct 2018 22:01:16 +0000 (23:01 +0100)]
Commit patch queue (exported by git-debrebase)

[git-debrebase make-patches: export and commit patches]

7 months agochangelog: finalise +iwj1
Ian Jackson [Fri, 5 Oct 2018 21:57:44 +0000 (22:57 +0100)]
changelog: finalise +iwj1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
7 months agodebian/.gitignore: Ignore files produced by the package build
Ian Jackson [Fri, 5 Oct 2018 21:30:30 +0000 (22:30 +0100)]
debian/.gitignore: Ignore files produced by the package build

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
7 months agodebian/rules: Drop erroneous whitespace from rules file
Ian Jackson [Fri, 5 Oct 2018 21:26:01 +0000 (22:26 +0100)]
debian/rules: Drop erroneous whitespace from rules file

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
7 months agoconfigure.ac: memshr_create: Detect and use from <sys/mman.h>
Ian Jackson [Fri, 5 Oct 2018 21:43:34 +0000 (22:43 +0100)]
configure.ac: memshr_create: Detect and use from <sys/mman.h>

Recent glibc versions do have a wrapper for this function.  It is available via
<sys/mman.h>.  So:
  * Add <sys/mman.h> to the list of header checks.
  * Add a conditional include of <sys/mman.h> to the configure test
    for memshr_create, so that it will pass if the function is there.
  * Add the same conditional include to missing.h, so that we
    get it declared when we build.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
7 months agofix-udev-rules
Andreas Messer [Fri, 5 Oct 2018 22:00:20 +0000 (23:00 +0100)]
fix-udev-rules

Gbp-Pq: Name fix-udev-rules.diff

7 months agogit-debrebase import: declare upstream
Ian Jackson [Fri, 5 Oct 2018 22:00:20 +0000 (23:00 +0100)]
git-debrebase import: declare upstream

First breakwater merge.

[git-debrebase anchor: declare upstream]

7 months agogit-debrebase convert-from-gbp: drop patches from tree
Ian Jackson [Fri, 5 Oct 2018 22:00:20 +0000 (23:00 +0100)]
git-debrebase convert-from-gbp: drop patches from tree

Delete debian/patches, as part of converting to git-debrebase format.

[git-debrebase convert-from-gbp: drop patches from tree]

16 months agoadded upstream-tags in gbp.conf
KatolaZ [Wed, 10 Jan 2018 20:08:21 +0000 (20:08 +0000)]
added upstream-tags in gbp.conf

16 months agoadded upstream-tags in gbp.conf
KatolaZ [Wed, 10 Jan 2018 20:07:18 +0000 (20:07 +0000)]
added upstream-tags in gbp.conf

16 months agostaging version 234.4-1+devuan1.1
KatolaZ [Wed, 10 Jan 2018 20:00:31 +0000 (20:00 +0000)]
staging version 234.4-1+devuan1.1

16 months agoadded ignore-branch=True in gpb.conf
KatolaZ [Wed, 10 Jan 2018 19:52:12 +0000 (19:52 +0000)]
added ignore-branch=True in gpb.conf

16 months agoreplaced experimental -> unstable in changelog
KatolaZ [Wed, 10 Jan 2018 19:43:39 +0000 (19:43 +0000)]
replaced experimental -> unstable in changelog

16 months agocreating suite suites/ceres
KatolaZ [Wed, 10 Jan 2018 19:42:20 +0000 (19:42 +0000)]
creating suite suites/ceres

16 months agocreating suite suites/unstable
Andreas Messer [Wed, 10 Jan 2018 19:30:48 +0000 (20:30 +0100)]
creating suite suites/unstable

16 months agoRevert "Update build-dep"
Andreas Messer [Wed, 10 Jan 2018 19:29:29 +0000 (20:29 +0100)]
Revert "Update build-dep"

This reverts commit acbd078e3ad962437d3bfcf1d4b22b30a5aba5b4.

16 months agoUpdate build-dep
Andreas Messer [Wed, 10 Jan 2018 19:10:09 +0000 (20:10 +0100)]
Update build-dep

16 months agoAdd "Replaces" field
Andreas Messer [Mon, 8 Jan 2018 21:12:28 +0000 (22:12 +0100)]
Add "Replaces" field

16 months agoUpdate package relations
Andreas Messer [Mon, 8 Jan 2018 20:58:59 +0000 (21:58 +0100)]
Update package relations

16 months agoLet elogind conflict with systemd
Andreas Messer [Mon, 8 Jan 2018 20:20:55 +0000 (21:20 +0100)]
Let elogind conflict with systemd

16 months agoRemove "Conflicts: openrc"
Andreas Messer [Mon, 8 Jan 2018 20:09:11 +0000 (21:09 +0100)]
Remove "Conflicts: openrc"

16 months agoSet cgroup controller fix to "elogin"
Andreas Messer [Mon, 8 Jan 2018 20:07:00 +0000 (21:07 +0100)]
Set cgroup controller fix to "elogin"

16 months agoFix dependencies for Debian
Andreas Messer [Mon, 8 Jan 2018 19:45:31 +0000 (20:45 +0100)]
Fix dependencies for Debian

16 months agoUpdate version and add patch to disable unsupported udev rule
Andreas Messer [Mon, 8 Jan 2018 18:01:00 +0000 (19:01 +0100)]
Update version and add patch to disable unsupported udev rule

16 months agoMerge patches from Hleb Valoshka
Andreas Messer [Sun, 7 Jan 2018 15:51:29 +0000 (16:51 +0100)]
Merge patches from Hleb Valoshka

16 months agoFactor out common files to fix multi-arch installs
Andreas Messer [Sun, 7 Jan 2018 10:12:51 +0000 (11:12 +0100)]
Factor out common files to fix multi-arch installs

16 months agoFix several issues found by review
Andreas Messer [Sat, 6 Jan 2018 17:59:31 +0000 (18:59 +0100)]
Fix several issues found by review

16 months agoAdd sysv init scripts and splitoff pam module
Andreas Messer [Fri, 5 Jan 2018 19:19:02 +0000 (20:19 +0100)]
Add sysv init scripts and splitoff pam module

16 months agoFix install locations
Andreas Messer [Thu, 4 Jan 2018 22:05:59 +0000 (23:05 +0100)]
Fix install locations

16 months agoadd devuan build control files
Andreas Messer [Thu, 4 Jan 2018 19:11:20 +0000 (20:11 +0100)]
add devuan build control files

16 months agosetup initial project structure
Andreas Messer [Wed, 3 Jan 2018 21:38:44 +0000 (22:38 +0100)]
setup initial project structure

20 months agoVersion 234.4 Release
Sven Eden [Mon, 25 Sep 2017 11:31:07 +0000 (13:31 +0200)]
Version 234.4 Release

20 months agoPrep v234.4: ake all supportable API functions visible (v234 addition).
Sven Eden [Mon, 25 Sep 2017 11:30:33 +0000 (13:30 +0200)]
Prep v234.4: ake all supportable API functions visible (v234 addition).

20 months agoPrep v233.7: Make all supportable API functions visible (v233 addition).
Sven Eden [Mon, 25 Sep 2017 09:50:36 +0000 (11:50 +0200)]
Prep v233.7: Make all supportable API functions visible (v233 addition).

20 months agoPrep v232.6: Make all supportable API functions visible (v232 addition).
Sven Eden [Fri, 22 Sep 2017 12:27:48 +0000 (14:27 +0200)]
Prep v232.6: Make all supportable API functions visible (v232 addition).

20 months agoPrep v231.7: Make all supportable API functions visible (v231 addition).
Sven Eden [Fri, 22 Sep 2017 12:01:10 +0000 (14:01 +0200)]
Prep v231.7: Make all supportable API functions visible (v231 addition).

20 months agoPrep 229.9: Make all supportable API functions visible.
Sven Eden [Fri, 22 Sep 2017 07:04:02 +0000 (09:04 +0200)]
Prep 229.9: Make all supportable API functions visible.

The process of cleaning up elogind, meaning to mask all bits that are
unneeded by elogind, has been finished a while ago.

It is therefore time to re-enable all previously masked API functions
that elogind can support. This will make it easier for future
developers to integrate elogind into their software where they
already support systemd-login.

20 months agoVersion 234.3 Release
Sven Eden [Fri, 8 Sep 2017 08:27:42 +0000 (10:27 +0200)]
Version 234.3 Release

20 months agoPrep v231.6: Fix pam_elogind to not falter when elogind is not running, yet.
Sven Eden [Thu, 7 Sep 2017 09:01:42 +0000 (11:01 +0200)]
Prep v231.6: Fix pam_elogind to not falter when elogind is not running, yet.

20 months agoPrep v231.6: Allow elogind to be daemonized using -D/--daemon option
Sven Eden [Thu, 7 Sep 2017 09:01:12 +0000 (11:01 +0200)]
Prep v231.6: Allow elogind to be daemonized using -D/--daemon option

20 months agoPrep v231.6: Upstream installs in lib/systemd, we install in lib/elogind.
Sven Eden [Thu, 7 Sep 2017 09:00:02 +0000 (11:00 +0200)]
Prep v231.6: Upstream installs in lib/systemd, we install in lib/elogind.

20 months agoPrep v234.3: Set defaults for the sleep config *after* loading the config file.
Sven Eden [Tue, 29 Aug 2017 14:36:34 +0000 (16:36 +0200)]
Prep v234.3: Set defaults for the sleep config *after* loading the config file.

21 months agoPrep v235: Fix pkgconfig/libelogind.pc
Sven Eden [Tue, 22 Aug 2017 14:55:10 +0000 (16:55 +0200)]
Prep v235: Fix pkgconfig/libelogind.pc

21 months agoVersion 234.2 Release
Sven Eden [Fri, 28 Jul 2017 07:35:32 +0000 (09:35 +0200)]
Version 234.2 Release

21 months agoPrep v234.2: Apply upstream fixes in tools (6/6)
Sven Eden [Fri, 28 Jul 2017 06:35:36 +0000 (08:35 +0200)]
Prep v234.2: Apply upstream fixes in tools (6/6)

21 months agoPrep v234.2: Apply upstream fixes in src/login (5/6)
Sven Eden [Fri, 28 Jul 2017 06:35:36 +0000 (08:35 +0200)]
Prep v234.2: Apply upstream fixes in src/login (5/6)

21 months agoPrep v234.2: Apply upstream fixes in src/core (4/6)
Sven Eden [Fri, 28 Jul 2017 06:35:36 +0000 (08:35 +0200)]
Prep v234.2: Apply upstream fixes in src/core (4/6)

21 months agoPrep v234.2: Apply upstream fixes in src/basic (3/6)
Sven Eden [Fri, 28 Jul 2017 06:35:36 +0000 (08:35 +0200)]
Prep v234.2: Apply upstream fixes in src/basic (3/6)

21 months agoPrep v234.2: Apply upstream fixes in po (2/6)
Sven Eden [Fri, 28 Jul 2017 06:35:36 +0000 (08:35 +0200)]
Prep v234.2: Apply upstream fixes in po (2/6)

21 months agoPrep v234.2: Apply upstream fixes in m4 (1/6)
Sven Eden [Fri, 28 Jul 2017 06:35:36 +0000 (08:35 +0200)]
Prep v234.2: Apply upstream fixes in m4 (1/6)

21 months agoPrep v234.2: Remove obsolete files in coccinelle, docs/ and m4/
Sven Eden [Fri, 28 Jul 2017 05:50:54 +0000 (07:50 +0200)]
Prep v234.2: Remove obsolete files in coccinelle, docs/ and m4/

21 months agoVersion 234.1 Release
Sven Eden [Thu, 27 Jul 2017 15:52:28 +0000 (17:52 +0200)]
Version 234.1 Release

21 months agoPrep v234: Check against TRANSPORT_LOCAL in check_inhibitors()
Sven Eden [Thu, 27 Jul 2017 15:48:36 +0000 (17:48 +0200)]
Prep v234: Check against TRANSPORT_LOCAL in check_inhibitors()

21 months agoALL: Add --with-rootlibexecdir and change default to ${libdir}/libexec
Sven Eden [Thu, 27 Jul 2017 14:07:50 +0000 (16:07 +0200)]
ALL: Add --with-rootlibexecdir and change default to ${libdir}/libexec

22 months agoPrep v234: Eventually fix the cgroup stuff. elogind is not init.
Sven Eden [Thu, 27 Jul 2017 08:18:44 +0000 (10:18 +0200)]
Prep v234: Eventually fix the cgroup stuff. elogind is not init.

22 months agoPrep 234: Fix Makefile.am to install elogind in rootlibexecdir, like upstream does...
Sven Eden [Thu, 27 Jul 2017 08:17:16 +0000 (10:17 +0200)]
Prep 234: Fix Makefile.am to install elogind in rootlibexecdir, like upstream does with systemd-login.

22 months agoPrep 234: Rename pam-systemd to pam-elogind in pam module init log message.
Sven Eden [Wed, 26 Jul 2017 13:13:56 +0000 (15:13 +0200)]
Prep 234: Rename pam-systemd to pam-elogind in pam module init log message.

22 months agoPrep v234: Re-add user/session to the gc_queue when stopping.
Sven Eden [Wed, 26 Jul 2017 08:26:15 +0000 (10:26 +0200)]
Prep v234: Re-add user/session to the gc_queue when stopping.

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.

22 months agoPrep v233.4: Update LTO usage to be more convenient.
Sven Eden [Fri, 21 Jul 2017 11:37:31 +0000 (13:37 +0200)]
Prep v233.4: Update LTO usage to be more convenient.

- Add -fuse-linker-plugin to work around odd compiler and binutils
  installs. Should fix most "plugin needed to handle lto object"
  issues.
- Read back whether LTO really has been enabled or not, so we can
  display a status line at the end of configure.
- Only enforce gold linker if LTO has been enabled.

These checks can still be disabled with the --disable-lto option,
which will make configure to skip all checks regarding LTO.

22 months agoPrep v234: Apply missing upstream fixes in src/test (6/6)
Sven Eden [Tue, 25 Jul 2017 08:20:12 +0000 (10:20 +0200)]
Prep v234: Apply missing upstream fixes in src/test (6/6)

22 months agoPrep v234: Apply missing upstream fixes in src/systemd (5/6)
Sven Eden [Tue, 25 Jul 2017 08:20:01 +0000 (10:20 +0200)]
Prep v234: Apply missing upstream fixes in src/systemd (5/6)

22 months agoPrep v234: Apply missing upstream fixes in src/shared (4/6)
Sven Eden [Tue, 25 Jul 2017 09:41:55 +0000 (11:41 +0200)]
Prep v234: Apply missing upstream fixes in src/shared (4/6)

22 months agoPrep v234: Apply missing upstream fixes in src/login (3/6)
Sven Eden [Tue, 25 Jul 2017 08:19:45 +0000 (10:19 +0200)]
Prep v234: Apply missing upstream fixes in src/login (3/6)

22 months agoPrep v234: Apply missing upstream fixes in src/libelogind (2/6)
Sven Eden [Tue, 25 Jul 2017 09:41:55 +0000 (11:41 +0200)]
Prep v234: Apply missing upstream fixes in src/libelogind (2/6)

22 months agoPrep v234: Apply missing upstream fixes in src/basic (1/6)
Sven Eden [Tue, 25 Jul 2017 08:19:24 +0000 (10:19 +0200)]
Prep v234: Apply missing upstream fixes in src/basic (1/6)

22 months agoPrep v234: Clarify status of $XDG_RUNTIME_DIR
Sven Eden [Tue, 25 Jul 2017 08:18:10 +0000 (10:18 +0200)]
Prep v234: Clarify status of $XDG_RUNTIME_DIR

22 months agoPrep v234: Remove now obsolete text files from src/libelogind/sd-bus
Sven Eden [Tue, 25 Jul 2017 07:49:53 +0000 (09:49 +0200)]
Prep v234: Remove now obsolete text files from src/libelogind/sd-bus

22 months agoPrep v234: Update root build files to upstream.
Sven Eden [Tue, 25 Jul 2017 06:32:29 +0000 (08:32 +0200)]
Prep v234: Update root build files to upstream.

22 months agoRevert "core: link user keyring to session keyring (#6275)" (#6342)
Lennart Poettering [Wed, 12 Jul 2017 14:00:44 +0000 (16:00 +0200)]
Revert "core: link user keyring to session keyring (#6275)" (#6342)

This reverts commit 437a85112e02042b62751395b9e7225628c1b708.

The outcome of this isn't that clear, let's revert this for now, see
discussion on #6286.

22 months agotime-util: make parse_timestamp() return -EINVAL if the input is very old date (...
Yu Watanabe [Tue, 11 Jul 2017 17:12:48 +0000 (02:12 +0900)]
time-util: make parse_timestamp() return -EINVAL if the input is very old date (#6327)

This reverts 7635ab8e74ea4a94e81143c3077570a986df375c and makes parse_timestamp()
return -EINVAL if the input is older than 1970-01-01.

Fixes #6290.

22 months agoAdd comments to log_functions which shouldn't be called from library code (#6326)
Zbigniew Jędrzejewski-Szmek [Tue, 11 Jul 2017 08:40:11 +0000 (04:40 -0400)]
Add comments to log_functions which shouldn't be called from library code (#6326)

22 months agorandom-util: we are fine if ints are 16 bytes actually
Lennart Poettering [Tue, 11 Jul 2017 08:36:53 +0000 (10:36 +0200)]
random-util: we are fine if ints are 16 bytes actually

Not that it matters IRL, but let's make this less surprising to read...

22 months agorandom-util: always cast from smaller to bigger type when comparing
Lennart Poettering [Tue, 11 Jul 2017 08:35:47 +0000 (10:35 +0200)]
random-util: always cast from smaller to bigger type when comparing

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.

22 months agobasic/strv: use existing qsort_safe() helper
Zbigniew Jędrzejewski-Szmek [Mon, 10 Jul 2017 18:55:14 +0000 (14:55 -0400)]
basic/strv: use existing qsort_safe() helper

strv_sort() predates qsort_safe(), but we can convert it to it to
save a few lines.

22 months agosd_uid_get_state: do not return -ENOENT if state is "offline" (#6302)
Yu, Li-Yu [Sat, 8 Jul 2017 22:59:29 +0000 (17:59 -0500)]
sd_uid_get_state: do not return -ENOENT if state is "offline" (#6302)

22 months agosd-login: fix memleak when output argument is NULL
Zbigniew Jędrzejewski-Szmek [Sat, 8 Jul 2017 22:04:44 +0000 (18:04 -0400)]
sd-login: fix memleak when output argument is NULL

22 months agotime-util: make parse_timestamp() set 0 if the input is very old date (#6297)
Yu Watanabe [Sat, 8 Jul 2017 19:59:07 +0000 (04:59 +0900)]
time-util: make parse_timestamp() set 0 if the input is very old date (#6297)

If the input is older than "1970-01-01 UTC", then `parse_timestamp()`
fails and returns -EINVAL. However, if the input is e.g. `-100years`,
then the function succeeds and sets `usec = 0`.
This commit makes the function also succeed for old dates and set
`usec = 0`.

Fixes #6290.

22 months agocore/load-fragment: refuse units with errors in RootDirectory/RootImage/DynamicUser
Zbigniew Jędrzejewski-Szmek [Thu, 6 Jul 2017 17:54:42 +0000 (13:54 -0400)]
core/load-fragment: refuse units with errors in RootDirectory/RootImage/DynamicUser

Behaviour of the service is completely different with the option off, so the
service would probably mess up state on disk and do unexpected things.

22 months agobasic/log: use getenv instead of secure_getenv
Zbigniew Jędrzejewski-Szmek [Wed, 5 Jul 2017 03:54:00 +0000 (23:54 -0400)]
basic/log: use getenv instead of secure_getenv

secure_getenv does not work when the process has a nonempty permitted
capability set, which means that it's unduly hard to configure logging in
elogind-logind, elogind-resolved, and others.

secure_getenv is useful for code in libraries which might get called from a
setuid application. log_parse_environment() is never called from our library
code, but directly form various top-level executables. None of them are
installed suid, and none are prepared to be used this way, since many
additional changes would be required to make that safe. We may just as well
drop the check and allow SYSTEMD_LOG_* to properly parsed.

Fixes #4900.

22 months agotest-fs-util: re-order test_readlink_and_make_absolute and test_get_files_in_director...
Mike Gilbert [Wed, 5 Jul 2017 03:22:47 +0000 (23:22 -0400)]
test-fs-util: re-order test_readlink_and_make_absolute and test_get_files_in_directory (#6288)

test_readlink_and_make_absolute switches to a temp directory, and then
removes it.

test_get_files_in_directory calls opendir(".") from a directory that has
been removed from the filesystem.

This call sequence triggers a bug in Gentoo's sandbox library. This
library attempts to resolve the "." to an absolute path, and aborts when
it ultimately fails to do so.

Re-ordering the calls works around the issue until the sandbox library
can be fixed to more gracefully deal with this.

Bug: https://bugs.gentoo.org/590084

22 months agobasic: Fix build warning in random-util (#6284)
Benjamin Robin [Tue, 4 Jul 2017 21:42:20 +0000 (23:42 +0200)]
basic: Fix build warning in random-util (#6284)

22 months agoudev: move the KEY_* defines to missing.h (#6278)
Peter Hutterer [Tue, 4 Jul 2017 07:41:46 +0000 (17:41 +1000)]
udev: move the KEY_* defines to missing.h (#6278)

22 months agocore: link user keyring to session keyring (#6275)
Christian Hesse [Tue, 4 Jul 2017 07:38:31 +0000 (09:38 +0200)]
core: link user keyring to session keyring (#6275)

Commit  74dd6b515fa968c5710b396a7664cac335e25ca8 (core: run each system
service with a fresh session keyring) broke adding keys to user keyring.
Added keys could not be accessed with error message:

keyctl_read_alloc: Permission denied

So link the user keyring to our session keyring.

22 months agoParse "timeout=0" as infinity in various generators (#6264)
Zbigniew Jędrzejewski-Szmek [Mon, 3 Jul 2017 12:29:32 +0000 (08:29 -0400)]
Parse "timeout=0" as infinity in various generators (#6264)

This extends 2d79a0bbb9f651656384a0a86ed814e6306fb5dd to the kernel
command line parsing.

The parsing is changed a bit to only understand "0" as infinity. If units are
specified, parse normally, e.g. "0s" is just 0. This makes it possible to
provide a zero timeout if necessary.

Simple test is added.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1462378.

22 months agoBe slightly more verbose in error message
Zbigniew Jędrzejewski-Szmek [Sun, 2 Jul 2017 16:03:25 +0000 (12:03 -0400)]
Be slightly more verbose in error message

Including the full path is always useful.

Also use PID_FMT in one more place.

22 months agobus-util: replace non-printable values with [unprintable]
Zbigniew Jędrzejewski-Szmek [Sat, 1 Jul 2017 20:49:15 +0000 (16:49 -0400)]
bus-util: replace non-printable values with [unprintable]

Like I said in the previous commit, such values do not seem to appear in normal
use, but it's pretty hard to prove that all paths to assign values properly
check that they contain no spaces. So just in case some slip through, replace
values with spaces (in case of single-valued properties) or spaces and newlines
(in case of array proprties) with "[unprintable]". We were already doing it
in case of properties which we didn't know how to print, so this fits in well.
The advantage is the previous code which used escaping that a) this is easier
to spot, b) does not mess up printing of properties which were properly escaped
already.

v2:
- add comments

22 months agoRevert "bus: when dumping string property values escape the chars we use as end-of...
Zbigniew Jędrzejewski-Szmek [Sat, 1 Jul 2017 20:17:12 +0000 (16:17 -0400)]
Revert "bus: when dumping string property values escape the chars we use as end-of-line and end-of-item marks"

This reverts commit 27e9c5af817147ea1c678769e45e83f2e4b4ae96.

Property values already use escaping, so escaping them a second time is
confusing. It also should be mostly unnecessary: we take care to make property
values only contains strings which (after the initial escaping) are printable
and parseable without any futher escaping.

Before revert:
$ systemctl list-dependencies 'dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device'
dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device
● ├─dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.swap
● └─elogind-cryptsetup@luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.service
$ systemctl show -p Wants,Requires 'dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device'
Requires=elogind-cryptsetup@luks\x5cx2d8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.service
Wants=dev-mapper-luks\x5cx2d8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.swap

Difference between systemctl show before revert and now:
-Slice=system-elogind\x5cx2dcryptsetup.slice
+Slice=system-elogind\x2dcryptsetup.slice

-Id=elogind-cryptsetup@luks\x5cx2d8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.service
+Id=elogind-cryptsetup@luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.service

-Names=elogind-cryptsetup@luks\x5cx2d8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.service
+Names=elogind-cryptsetup@luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.service

-Requires=system-elogind\x5cx2dcryptsetup.slice
+Requires=system-elogind\x2dcryptsetup.slice

-BindsTo=dev-mapper-luks\x5cx2d8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.device dev-disk-by\x5cx2duuid-8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.device
+BindsTo=dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device dev-disk-by\x2duuid-8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device

-RequiredBy=dev-mapper-luks\x5cx2d8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.device cryptsetup.target
+RequiredBy=dev-mapper-luks\x2d8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device cryptsetup.target

-WantedBy=dev-disk-by\x5cx2duuid-8db85dcf\x5cx2d6230\x5cx2d4e88\x5cx2d940d\x5cx2dba176d062b31.device
+WantedBy=dev-disk-by\x2duuid-8db85dcf\x2d6230\x2d4e88\x2d940d\x2dba176d062b31.device

22 months agoman: fix spelling error of sd_bus_error_set_const (#6246)
Lars Karlitski [Fri, 30 Jun 2017 09:57:13 +0000 (11:57 +0200)]
man: fix spelling error of sd_bus_error_set_const (#6246)

22 months agosd-bus: never augment creds when we are operating on remote connections (#6217)
Lennart Poettering [Wed, 28 Jun 2017 17:20:16 +0000 (19:20 +0200)]
sd-bus: never augment creds when we are operating on remote connections (#6217)

It's not always clear when something is a remote connection, hence only
flag the obvious cases as local.

Fixes: #6207

22 months agologind: filter out input devices that have none of the keys/switche we care about
Lennart Poettering [Tue, 27 Jun 2017 15:46:28 +0000 (17:46 +0200)]
logind: filter out input devices that have none of the keys/switche we care about

Let's check what keys are there, before we actually hang on to the
opened devices.

22 months agologind: relax udev rules matching devices logind watches for
Lennart Poettering [Tue, 27 Jun 2017 14:14:30 +0000 (16:14 +0200)]
logind: relax udev rules matching devices logind watches for

Now that we have support for key/switch masking in logind, we can relax
the rules by which logind picks the devices to watch a bit, after all we
won't wake up anymore for every single event, but instead only the
events we actually care about.

This should make power/suspend keys on normal usb/atkbd keyboards just
work.

22 months agologind: make use of EVIOCSMASK input ioctl to mask out events we aren't interested in
Lennart Poettering [Mon, 26 Jun 2017 19:35:12 +0000 (21:35 +0200)]
logind: make use of EVIOCSMASK input ioctl to mask out events we aren't interested in

This way logind will get woken up only when an actual event took place,
and not for every key press on the system.

The ioctl EVIOCSMASK was added by @dvdhrm already in October 2015, for
the use in logind, among others, hence let's actually make use of it
now.

While we are at it, also fix usage of the EVIOCGSW ioctl, where we
assumed a byte array, even though a unsigned long native endian array is
returned.

22 months agosd-bus: use GetConnectionCredentials() when querying credentials, if available
Lennart Poettering [Mon, 26 Jun 2017 16:52:47 +0000 (18:52 +0200)]
sd-bus: use GetConnectionCredentials() when querying credentials, if available

Newer D-Bus versions implement the GetConnectionCredentials() driver
call to get all connection creds in one go. Make use of that to reduce
the number of bus calls we do.

When only a single credential field is queried we will still use the old
calls, which we'll also use if the new call isn't implemented.

22 months agosd-bus: when credentials of the "org.freedesktop.DBus" service are queried return...
Lennart Poettering [Mon, 26 Jun 2017 16:24:58 +0000 (18:24 +0200)]
sd-bus: when credentials of the "org.freedesktop.DBus" service are queried return the bus owner's credentials

The bus driver service is always implemented by the owner of the bus,
hence let's shortcut the credential operation and use our cached data.
This makes sure things simply work, given that dbus itself doesn't
support GetConnectionSELinuxSecurityContext() on the bus driver name
itself.

Fixes: #6120

22 months agocore: make IOSchedulingClass= and IOSchedulingPriority= settable for transient units
Lennart Poettering [Mon, 26 Jun 2017 15:40:08 +0000 (17:40 +0200)]
core: make IOSchedulingClass= and IOSchedulingPriority= settable for transient units

This patch is a bit more complex thant I hoped. In particular the single
IOScheduling= property exposed on the bus is split up into
IOSchedulingClass= and IOSchedulingPriority= (though compat is
retained). Otherwise the asymmetry between setting props and getting
them is a bit too nasty.

Fixes #5613

22 months agoCopy defines for renameat2 from casync (#6181)
Zbigniew Jędrzejewski-Szmek [Mon, 26 Jun 2017 07:34:03 +0000 (03:34 -0400)]
Copy defines for renameat2 from casync (#6181)

22 months agobasic/random-util: do not fall back to /dev/urandom if getrandom() returns short
Zbigniew Jędrzejewski-Szmek [Sun, 25 Jun 2017 21:09:05 +0000 (17:09 -0400)]
basic/random-util: do not fall back to /dev/urandom if getrandom() returns short

During early boot, we'd call getrandom(), and immediately fall back to
reading from /dev/urandom unless we got the full requested number of bytes.
Those two sources are the same, so the most likely result is /dev/urandom
producing some pseudorandom numbers for us, complaining widely on the way.

Let's change our behaviour to be more conservative:
- if the numbers are only used to initialize a hash table, a short read is OK,
  we don't really care if we get the first part of the seed truly random and
  then some pseudorandom bytes. So just do that and return "success".

- if getrandom() returns -EAGAIN, fall back to rand() instead of querying
  /dev/urandom again.

  The idea with those two changes is to avoid generating a warning about
  reading from an /dev/urandom when the kernel doesn't have enough entropy.

- only in the cases where we really need to make the best effort possible
  (sd_id128_randomize and firstboot password hashing), fall back to
  /dev/urandom.

When calling getrandom(), drop the checks whether the argument fits in an int —
getrandom() should do that for us already, and we call it with small arguments
only anyway.

Note that this does not really change the (relatively high) number of random
bytes we request from the kernel. On my laptop, during boot, PID 1 and all
other processes using this code through libelogind request:
  74780 bytes with high_quality_required == false
    464 bytes with high_quality_required == true
and it does not eliminate reads from /dev/urandom completely. If the kernel was
short on entropy and getrandom() would fail, we would fall back to /dev/urandom
for those 464 bytes.

When falling back to /dev/urandom, don't lose the short read we already got,
and just read the remaining bytes.

If getrandom() syscall is not available, we fall back to /dev/urandom same
as before.

Fixes #4167 (possibly partially, let's see).

22 months agotests: add tests for environment serialization
Zbigniew Jędrzejewski-Szmek [Sat, 24 Jun 2017 00:43:48 +0000 (20:43 -0400)]
tests: add tests for environment serialization

22 months agobasic/env-util: when serializing, actually use escaping
Zbigniew Jędrzejewski-Szmek [Sat, 24 Jun 2017 00:27:12 +0000 (20:27 -0400)]
basic/env-util: when serializing, actually use escaping

Fixes #6152.

22 months agomanager: just warn about an invalid environment entry
Zbigniew Jędrzejewski-Szmek [Fri, 23 Jun 2017 23:20:54 +0000 (19:20 -0400)]
manager: just warn about an invalid environment entry

Apart from bugs (as in #6152), this can happen if we ever make
our requirements for environment entries more stringent. As with
the rest of deserialization, we should just warn and continue.