chiark / gitweb /
elogind.git
6 years agoVersion 235.3 Release v235.3
Sven Eden [Fri, 9 Mar 2018 06:57:50 +0000 (07:57 +0100)]
Version 235.3 Release

6 years agocheck_tree.pl: Added handling of xml files.
Sven Eden [Fri, 9 Mar 2018 06:53:40 +0000 (07:53 +0100)]
check_tree.pl: Added handling of xml files.

6 years agocheck_tree.pl : Add handling of .gperf files.
Sven Eden [Fri, 9 Mar 2018 06:32:56 +0000 (07:32 +0100)]
check_tree.pl : Add handling of .gperf files.

6 years agocheck_tree.pl: Do not search 'po' directory. Better resurrect (aka rewrite) 'update_p...
Sven Eden [Fri, 9 Mar 2018 06:22:12 +0000 (07:22 +0100)]
check_tree.pl: Do not search 'po' directory. Better resurrect (aka rewrite) 'update_po.sh'

6 years agocheck_tree.pl: Do not allow commented out includes to be moved under our elogind...
Sven Eden [Thu, 8 Mar 2018 07:18:48 +0000 (08:18 +0100)]
check_tree.pl: Do not allow commented out includes to be moved under our elogind block.

6 years agocheck_tree.pl: Handle renames elogind<=>systemd-logind correctly.
Sven Eden [Wed, 7 Mar 2018 17:08:37 +0000 (18:08 +0100)]
check_tree.pl: Handle renames elogind<=>systemd-logind correctly.

6 years agoAdd migration tools for safe keeping.
Sven Eden [Wed, 7 Mar 2018 16:51:03 +0000 (17:51 +0100)]
Add migration tools for safe keeping.

6 years agosystemdstatedir is not used anywhere and leads to an empty directory being created...
Sven Eden [Wed, 7 Mar 2018 16:39:55 +0000 (17:39 +0100)]
systemdstatedir is not used anywhere and leads to an empty directory being created upon install. -> removed.

6 years agoSome minor cleanups
Sven Eden [Wed, 7 Mar 2018 16:35:44 +0000 (17:35 +0100)]
Some minor cleanups

6 years agotools/check-includes.pl : Prepared for check-tree.pl handling.
Sven Eden [Tue, 6 Mar 2018 07:34:00 +0000 (08:34 +0100)]
tools/check-includes.pl : Prepared for check-tree.pl handling.

6 years agoMeson build system: Add missing '#' in masked blocks
Sven Eden [Tue, 6 Mar 2018 07:19:58 +0000 (08:19 +0100)]
Meson build system: Add missing '#' in masked blocks

6 years agotools/check-includes.pl : Fixed errors. The constant long list of errors in Eclipse...
Sven Eden [Fri, 2 Feb 2018 06:15:23 +0000 (07:15 +0100)]
tools/check-includes.pl : Fixed errors. The constant long list of errors in Eclipse Epic drove me nuts. ;-)

6 years agoFix build on musl
Bjorn Pagen [Thu, 22 Feb 2018 22:05:31 +0000 (17:05 -0500)]
Fix build on musl

Before this fix, elogind did not compile on musl, as the header "musl-missing.h" tries to include a nonexistant header: "config.h". This patch fixes that. Musl compiles with no issues once this patch is administered.

6 years agouaccess-command: [trivial] Differentiate apply vs reset error log messages.
Arthur Taylor [Tue, 13 Feb 2018 19:51:19 +0000 (11:51 -0800)]
uaccess-command: [trivial] Differentiate apply vs reset error log messages.

Also change systemd to logind in a comment.

6 years agoIntroduce elogind-uaccess-command to replace uaccess builtin.
Arthur Taylor [Thu, 8 Feb 2018 23:03:50 +0000 (15:03 -0800)]
Introduce elogind-uaccess-command to replace uaccess builtin.

The uaccess udev builtin command is only used by logind and contains
functionality only implemented in logind. As such, while we cannot
write udev-builtin commands in elogind (not being udev), we can write
standalone binaries and rewrite our udev rules to use them instead.

This fixes the feature of granting users access to devices using a user
ACL which is toggled only when the user is associated with an active
session. Currently this functionality is half broken, as while the ACL
is granted and revoked while VT-switching, it is not granted to new
devices as they are plugged in. This issue is fixed by this commit.

6 years agoClose stdin, stdout and stderr on daemonizing
Andreas Messer [Sat, 27 Jan 2018 18:34:24 +0000 (19:34 +0100)]
Close stdin, stdout and stderr on daemonizing

6 years agotest/test-hexdecoct.c: Add include for musl_missin.h for strndupa().
Sven Eden [Thu, 25 Jan 2018 06:52:49 +0000 (07:52 +0100)]
test/test-hexdecoct.c: Add include for musl_missin.h for strndupa().
shared/musl_missing.h: Rewrite strndupa() define to use x_ prefixed
                       variables, so they won't shadow surronding
                       variables of the same name.

6 years agotest/test-parse-util.c: Masked the test of strtod() with set german
Sven Eden [Thu, 25 Jan 2018 06:40:28 +0000 (07:40 +0100)]
test/test-parse-util.c: Masked the test of strtod() with set german
locale to be only used with __GLIBC__.

It seems that the strtod() function in stdlib.h from musl_libc does
not heed the set locale. It fails with a german floating point
number.

6 years agotest/test-sizeof.c: disable tests for missing typedefs in musl
maxice8 [Tue, 16 Jan 2018 11:08:15 +0000 (09:08 -0200)]
test/test-sizeof.c: disable tests for missing typedefs in musl

6 years agowork-around usage of glibc-specific __register_atfork for musl systems
maxice8 [Tue, 16 Jan 2018 10:29:32 +0000 (08:29 -0200)]
work-around usage of glibc-specific __register_atfork for musl systems

__register_atfork is glibc-specific but is roughly equivalent to
pthread_atfork, add a definition of it on musl_missing.h and guard
against the definition of __register_atfork on src/basic/process-util.c
using #ifdef __GLIBC__

6 years agoshared/musl_missing.h: replace ifdef with if on HAVE_[__]SECURE_GETENV
maxice8 [Tue, 16 Jan 2018 10:25:32 +0000 (08:25 -0200)]
shared/musl_missing.h: replace ifdef with if on HAVE_[__]SECURE_GETENV

now meson defines itself on config.h HAVE_[__]SECURE_GETENV, instead of
checking if it is defined, check if it set to false value.

also undefine before redefining it to true.

6 years agoshared/musl_missing.h: replace ifdef HAVE_UTMP with if ENABLE_UTMP
maxice8 [Tue, 16 Jan 2018 10:23:17 +0000 (08:23 -0200)]
shared/musl_missing.h: replace ifdef HAVE_UTMP with if ENABLE_UTMP

now meson defines if the feature is enabled or not, check if the
feature is enabled

6 years agoPrep v235.3 : Fix cgroup hierarchy detection code
Sven Eden [Thu, 18 Jan 2018 22:01:12 +0000 (23:01 +0100)]
Prep v235.3 : Fix cgroup hierarchy detection code

There is no sub-grouping with elogind, so /sys/fs/cgroup/elogind is
not needed to be mounted as cgroup fs in legacy mode.

Fixes Bug https://bugs.gentoo.org/644834

6 years agoVersion 235.2 Release v235.2
Sven Eden [Mon, 15 Jan 2018 19:34:18 +0000 (20:34 +0100)]
Version 235.2 Release

6 years agoIf elogind is just started, /sys/fs/cgroup/elogind might not exist, yet on legacy...
Sven Eden [Mon, 15 Jan 2018 19:20:52 +0000 (20:20 +0100)]
If elogind is just started, /sys/fs/cgroup/elogind might not exist, yet on legacy and hybrid systems.

6 years agoVersion 235.1 Release v235.1
Sven Eden [Sun, 14 Jan 2018 17:09:55 +0000 (18:09 +0100)]
Version 235.1 Release

6 years agoPrep 235: Don't allow multiple jobs being executed at the same time
Sven Eden [Sun, 14 Jan 2018 17:07:25 +0000 (18:07 +0100)]
Prep 235: Don't allow multiple jobs being executed at the same time

6 years agoPrep 235: Removed orphaned header
Sven Eden [Thu, 11 Jan 2018 07:12:13 +0000 (08:12 +0100)]
Prep 235: Removed orphaned header

6 years agoPrep 235: Make cgroups2 available, hybrid mode already works.
Sven Eden [Wed, 10 Jan 2018 17:06:23 +0000 (18:06 +0100)]
Prep 235: Make cgroups2 available, hybrid mode already works.

6 years agoPrep 235: Make elogind masks in sd-bus.h c90 compatible again.
Sven Eden [Tue, 9 Jan 2018 17:59:35 +0000 (18:59 +0100)]
Prep 235: Make elogind masks in sd-bus.h c90 compatible again.

6 years agoPrep 235: Enabled sd_peer_get_session() and sd_peer_get_owner_uid() to try to work...
Sven Eden [Tue, 9 Jan 2018 17:57:22 +0000 (18:57 +0100)]
Prep 235: Enabled sd_peer_get_session() and sd_peer_get_owner_uid() to try to work with eloginds session id to user mapping.

6 years agoPrep 235: Enabled sd_bus_creds_get_slice(), sd_bus_creds_get_user_slice(), sd_peer_ge...
Sven Eden [Tue, 9 Jan 2018 17:52:14 +0000 (18:52 +0100)]
Prep 235: Enabled sd_bus_creds_get_slice(), sd_bus_creds_get_user_slice(), sd_peer_get_user_slice() and sd_pid_get_user_slice() to try to work with eloginds session id to user mapping.

6 years agoPrep 235: Enabled sd_peer_get_slice() and sd_pid_get_slice() to at least try to work...
Sven Eden [Tue, 9 Jan 2018 17:35:22 +0000 (18:35 +0100)]
Prep 235: Enabled sd_peer_get_slice() and sd_pid_get_slice() to at least try to work. This is considered experimental.

6 years agoPrep 235: Although systemd slices are unsupported, make cg_path_get_slice() available...
Sven Eden [Tue, 9 Jan 2018 08:13:45 +0000 (09:13 +0100)]
Prep 235: Although systemd slices are unsupported, make cg_path_get_slice() available, but in 'elogind jargon'

6 years agosrc/systemd/meson.build: Fix add_install_script() call
Sven Eden [Tue, 9 Jan 2018 07:46:25 +0000 (08:46 +0100)]
src/systemd/meson.build: Fix add_install_script() call

6 years agoRemove coccinelle files that slithered back in.
Sven Eden [Mon, 8 Jan 2018 17:42:40 +0000 (18:42 +0100)]
Remove coccinelle files that slithered back in.

6 years agoDev: Add loginctl target to Code::Blocks project file
Sven Eden [Mon, 8 Jan 2018 07:37:08 +0000 (08:37 +0100)]
Dev: Add loginctl target to Code::Blocks project file

6 years agoPrep 235: Add loginctl target to Makefile
Sven Eden [Mon, 8 Jan 2018 07:36:28 +0000 (08:36 +0100)]
Prep 235: Add loginctl target to Makefile

6 years agoForgot to symlink _sdcommon.h
Sven Eden [Fri, 15 Dec 2017 05:01:07 +0000 (06:01 +0100)]
Forgot to symlink _sdcommon.h

6 years agoPrep 235: Implement an alternative approach for sd_pid_get_owner_uid(), making test...
Sven Eden [Wed, 13 Dec 2017 18:21:30 +0000 (19:21 +0100)]
Prep 235: Implement an alternative approach for sd_pid_get_owner_uid(), making test-login to no longer fail.

6 years agoAdd test-login target for Code::Blocks for easier debugging.
Sven Eden [Wed, 13 Dec 2017 07:54:48 +0000 (08:54 +0100)]
Add test-login target for Code::Blocks for easier debugging.

6 years agosd-bus.h, sd-daemon.h : MAke elogind masks ISO C90 compatible.
Sven Eden [Wed, 13 Dec 2017 07:50:52 +0000 (08:50 +0100)]
sd-bus.h, sd-daemon.h : MAke elogind masks ISO C90 compatible.

6 years agobasic/siphash24.c: Only disable -Wimplicit-fallthrough on gcc-7+
Sven Eden [Tue, 12 Dec 2017 17:35:44 +0000 (18:35 +0100)]
basic/siphash24.c: Only disable -Wimplicit-fallthrough on gcc-7+

6 years agoUpdate README - Attempt to reduce the chance of becoming flame-bait.
Sven Eden [Tue, 12 Dec 2017 17:32:40 +0000 (18:32 +0100)]
Update README - Attempt to reduce the chance of becoming flame-bait.

6 years agoPrep v234.4: ake all supportable API functions visible
Sven Eden [Tue, 12 Dec 2017 17:21:24 +0000 (18:21 +0100)]
Prep v234.4: ake all supportable API functions visible
 (v234 addition).

6 years ago Prep v237.3: Make all supportable API functions visible
Sven Eden [Tue, 12 Dec 2017 17:18:28 +0000 (18:18 +0100)]
 Prep v237.3: Make all supportable API functions visible
(v233 addition).

6 years agoPrep v232.6: Make all supportable API functions visible
Sven Eden [Tue, 12 Dec 2017 17:06:57 +0000 (18:06 +0100)]
Prep v232.6: Make all supportable API functions visible
 (v232 addition).

6 years agotime-util: Disable explicit fallthrough wanring on gcc-7+
Sven Eden [Tue, 12 Dec 2017 17:02:58 +0000 (18:02 +0100)]
time-util: Disable explicit fallthrough wanring on gcc-7+

6 years agoPrep 229.9: Make all supportable API functions visible.
Sven Eden [Tue, 12 Dec 2017 06:54:16 +0000 (07:54 +0100)]
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.

6 years agoMask unused entries in .po files.
Sven Eden [Mon, 11 Dec 2017 16:14:55 +0000 (17:14 +0100)]
Mask unused entries in .po files.

6 years agobasic/exec-utils:do_execute() : Remove "maybe unitialized" warning
Sven Eden [Mon, 11 Dec 2017 16:12:50 +0000 (17:12 +0100)]
basic/exec-utils:do_execute() : Remove "maybe unitialized" warning

6 years agoCleaned up orphaned files
Sven Eden [Mon, 11 Dec 2017 16:06:40 +0000 (17:06 +0100)]
Cleaned up orphaned files

6 years agosrc/basic/meson.build: Prepare generate_cap_list fix for our migration scripts
Sven Eden [Mon, 11 Dec 2017 07:33:35 +0000 (08:33 +0100)]
src/basic/meson.build: Prepare generate_cap_list fix for our migration scripts

6 years agoFix and fortify cap-list generation and inlcude symlinking for gentoo build system.
Sven Eden [Sun, 10 Dec 2017 14:15:12 +0000 (15:15 +0100)]
Fix and fortify cap-list generation and inlcude symlinking for gentoo build system.

6 years agoMeson build system: Recreate the symlinking of elogind/systemd/*.h headers into elogin/
Sven Eden [Fri, 8 Dec 2017 16:53:48 +0000 (17:53 +0100)]
Meson build system: Recreate the symlinking of elogind/systemd/*.h headers into elogin/

6 years agoFix various build failures with the latest systemd updates.
Sven Eden [Fri, 8 Dec 2017 16:52:41 +0000 (17:52 +0100)]
Fix various build failures with the latest systemd updates.

6 years agoApply missing updates from upstream
Sven Eden [Fri, 8 Dec 2017 07:02:34 +0000 (08:02 +0100)]
Apply missing updates from upstream

6 years agoman: explain precedence for options which take a list (#7010)
Zbigniew Jędrzejewski-Szmek [Fri, 6 Oct 2017 08:04:49 +0000 (10:04 +0200)]
man: explain precedence for options which take a list (#7010)

Hopefully finally fixes #6639.

6 years agomeson: fix feature list (#7011)
Yu Watanabe [Fri, 6 Oct 2017 07:33:21 +0000 (16:33 +0900)]
meson: fix feature list (#7011)

6 years agobuild-sys: bump so revisions for prepation of 235
Lennart Poettering [Thu, 5 Oct 2017 15:14:04 +0000 (17:14 +0200)]
build-sys: bump so revisions for prepation of 235

6 years agounit: when JobTimeoutSec= is turned off, implicitly turn off JobRunningTimeoutSec...
Lennart Poettering [Wed, 27 Sep 2017 15:30:50 +0000 (17:30 +0200)]
unit: when JobTimeoutSec= is turned off, implicitly turn off JobRunningTimeoutSec= too

We added JobRunningTimeoutSec= late, and Dracut configured only
JobTimeoutSec= to turn of root device timeouts before. With this change
we'll propagate a reset of JobTimeoutSec= into JobRunningTimeoutSec=,
but only if the latter wasn't set explicitly.

This should restore compatibility with older elogind versions.

Fixes: #6402
6 years agohwdb: Add accelerometer orientation entry for Chuwi Hi8 Pro tablet (#6998)
Hans de Goede [Wed, 4 Oct 2017 23:06:55 +0000 (01:06 +0200)]
hwdb: Add accelerometer orientation entry for Chuwi Hi8 Pro tablet (#6998)

Add an accelerometer orientation entry for the Chuwi Hi8 Pro tablet.

6 years agodynamic-user: don't use a UID that currently owns IPC objects (#6962)
Lennart Poettering [Wed, 4 Oct 2017 19:40:01 +0000 (21:40 +0200)]
dynamic-user: don't use a UID that currently owns IPC objects (#6962)

This fixes a mostly theoretical potential security hole: if for some
reason we failed to remove IPC objects created for a dynamic user (maybe
because a MAC/SElinux erronously prohibited), then we should not hand
out the same UID again until they are successfully removed.

With this commit we'll enumerate the IPC objects currently existing, and
step away from using a UID for the dynamic UID logic if there are any
matching it.

6 years agohwdb: switch meson to use ids_parser.py (#6964)
Zbigniew Jędrzejewski-Szmek [Wed, 4 Oct 2017 17:32:59 +0000 (19:32 +0200)]
hwdb: switch meson to use ids_parser.py (#6964)

Also drop the now-unused perl implementation (that doesn't do sorting),
so it's incompatible anyway.

6 years agologind: don's change dry-run boolean before we actually enqueue the operation
Lennart Poettering [Mon, 2 Oct 2017 14:09:24 +0000 (16:09 +0200)]
logind: don's change dry-run boolean before we actually enqueue the operation

Let's not affect change before the PK check.

6 years agologind: reorder things a bit
Lennart Poettering [Mon, 2 Oct 2017 14:08:49 +0000 (16:08 +0200)]
logind: reorder things a bit

Let's keep the three sleep method implementations close to each other.

6 years agologind: add Halt() and CanHalt() APIs
Lennart Poettering [Mon, 2 Oct 2017 14:03:55 +0000 (16:03 +0200)]
logind: add Halt() and CanHalt() APIs

This adds new method calls Halt() and CanHalt() to the logind bus APIs.
They aren't overly useful (as the whole concept of halting isn't really
too useful), however they clean up one major asymmetry: currently, using
the "shutdown" legacy commands it is possibly to enqueue a "halt"
operation through logind, while logind officially doesn't actually
support this. Moreover, the path through "shutdown" currently ultimately
fails, since the referenced "halt" action isn't actually defined in
PolicyKit.

Finally, the current logic results in an unexpected asymmetry in
systemctl: "systemctl poweroff", "systemctl reboot" are currently
asynchronous (due to the logind involvement) while "systemctl halt"
isnt. Let's clean this up, and make all three APIs implemented by
logind natively, and all three hence asynchronous in "systemctl".

Moreover, let's add the missing PK action.

Fixes: #6957
6 years agoudevadm,basic: replace nulstr_contains with STR_IN_SET (#6965)
Zbigniew Jędrzejewski-Szmek [Wed, 4 Oct 2017 17:32:12 +0000 (19:32 +0200)]
udevadm,basic: replace nulstr_contains with STR_IN_SET (#6965)

STR_IN_SET is a newer approach which is easier to write and read, and which
seems to result in space savings too:

before:
4949848 build/src/shared/libelogind-shared-234.so
 350704 build/systemctl
4967184 build/elogind
 826216 build/udevadm

after:
4949848 build/src/shared/libelogind-shared-234.so
 350704 build/systemctl
4966888 build/elogind
 826168 build/udevadm

6 years agologind: use pid_is_valid() where appropriate
Alan Jenkins [Tue, 3 Oct 2017 11:26:02 +0000 (12:26 +0100)]
logind: use pid_is_valid() where appropriate

These two sites _do_ match the definition of pid_is_valid(); they don't
provide any special handling for the invalid PID value 0.  (They're used
by dbus methods, so the PID value 0 is handled with reference to the dbus
client creds, outside of these functions).

6 years agotree-wide: use IN_SET macro (#6977)
Yu Watanabe [Wed, 4 Oct 2017 14:01:32 +0000 (23:01 +0900)]
tree-wide: use IN_SET macro (#6977)

6 years agotest-sizeof: add pid_t and gid_t
Zbigniew Jędrzejewski-Szmek [Wed, 4 Oct 2017 13:22:07 +0000 (15:22 +0200)]
test-sizeof: add pid_t and gid_t

C.f. #6975.

6 years agotest-copy: fix operation when test-copy is too small
Zbigniew Jędrzejewski-Szmek [Wed, 4 Oct 2017 13:17:09 +0000 (15:17 +0200)]
test-copy: fix operation when test-copy is too small

Fixes #6981.

6 years agomeson: generate ENABLE_* names automatically
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2017 11:15:27 +0000 (13:15 +0200)]
meson: generate ENABLE_* names automatically

After previous changes, the naming of configuration options and internal
defines is consistent.

6 years agobuild-sys: s/HAVE_SMACK/ENABLE_SMACK/
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2017 10:22:40 +0000 (12:22 +0200)]
build-sys: s/HAVE_SMACK/ENABLE_SMACK/

Same justification as for HAVE_UTMP.

6 years agobuild-sys: s/HAVE_IMA/ENABLE_IMA/
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2017 10:20:49 +0000 (12:20 +0200)]
build-sys: s/HAVE_IMA/ENABLE_IMA/

Same justification as for HAVE_UTMP.

6 years agobuild-sys: require all defines under #if to be present
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2017 10:11:49 +0000 (12:11 +0200)]
build-sys: require all defines under #if to be present

This should help to catch any errors with typos and HAVE/ENABLE mismatches.

6 years agoApply updates from upstream
Sven Eden [Thu, 7 Dec 2017 17:59:58 +0000 (18:59 +0100)]
Apply updates from upstream

6 years agobuild-sys: use #if Y instead of #ifdef Y everywhere
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2017 08:41:51 +0000 (10:41 +0200)]
build-sys: use #if Y instead of #ifdef Y everywhere

The advantage is that is the name is mispellt, cpp will warn us.

$ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/"
$ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;'
$ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g'
$ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g'
+ manual changes to meson.build

squash! build-sys: use #if Y instead of #ifdef Y everywhere

v2:
- fix incorrect setting of HAVE_LIBIDN2

6 years agoRevert "tree-wide: use pid_is_valid() at more places"
Alan Jenkins [Tue, 3 Oct 2017 11:05:24 +0000 (12:05 +0100)]
Revert "tree-wide: use pid_is_valid() at more places"

This reverts commit ee043777be58251e7441b4f04594e9e3792d7fb2.

It broke almost everywhere it touched.  The places that
handn't been converted, were mostly followed by special
handling for the invalid PID `0`.  That explains why they
tested for `pid < 0` instead of `pid <= 0`.

I think that one was the first commit I reviewed, heh.

6 years agomeson: check for sys/auxv.h
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2017 10:09:40 +0000 (12:09 +0200)]
meson: check for sys/auxv.h

This check was present in configure.ac, but was never added under meson.
The code under HAVE_SYS_AUX_H has been dead ever since :(.

6 years agobuild-sys: change all HAVE_DECL_ macros to HAVE_
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2017 08:32:34 +0000 (10:32 +0200)]
build-sys: change all HAVE_DECL_ macros to HAVE_

This is a legacy of autotools, where one detection routine used a different
prefix then the others.

$ git grep -e HAVE_DECL_ -l|xargs sed -i s/HAVE_DECL_/HAVE_/g

6 years agopath-util: some updates to path_make_relative()
Lennart Poettering [Mon, 2 Oct 2017 08:51:19 +0000 (10:51 +0200)]
path-util: some updates to path_make_relative()

Don't miscount number of "../" to generate, if we "." is included in an
input path.

Also, refuse if we encounter "../" since we can't possibly follow that
up properly, without file system access.

Some other modernizations.

6 years agocore: chown() StateDirectory= and friends recursively when starting a service
Lennart Poettering [Thu, 28 Sep 2017 17:13:44 +0000 (19:13 +0200)]
core: chown() StateDirectory= and friends recursively when starting a service

This is particularly useful when used in conjunction with DynamicUser=1,
where the UID might change for every invocation, but is useful in other
cases too, for example, when these directories are shared between
systems where the UID assignments differ slightly.

6 years agotree-wide: use `!IN_SET(..)` for `a != b && a != c && …`
Andreas Rammhold [Fri, 29 Sep 2017 07:58:22 +0000 (09:58 +0200)]
tree-wide: use `!IN_SET(..)` for `a != b && a != c && …`

The included cocci was used to generate the changes.

Thanks to @flo-wer for pointing this case out.

6 years agotree-wide: use IN_SET where possible
Andreas Rammhold [Thu, 28 Sep 2017 22:37:23 +0000 (00:37 +0200)]
tree-wide: use IN_SET where possible

In addition to the changes from #6933 this handles cases that could be
matched with the included cocci file.

6 years agosd-bus: drop bloom fields
Lennart Poettering [Fri, 29 Sep 2017 15:58:11 +0000 (17:58 +0200)]
sd-bus: drop bloom fields

These fields are unused since kdbus support has been removed.

6 years agosd-bus: drop match cookie concept
Lennart Poettering [Fri, 29 Sep 2017 15:57:34 +0000 (17:57 +0200)]
sd-bus: drop match cookie concept

THe match cookie was used by kdbus to identify matches we install
uniquely. But given that kdbus is gone, the cookie serves no process
anymore, let's kill it.

6 years agosd-bus: when showing brief message info show error name in debug out put too
Lennart Poettering [Fri, 29 Sep 2017 15:48:29 +0000 (17:48 +0200)]
sd-bus: when showing brief message info show error name in debug out put too

When debug logging is enabled we show brief information about every bus
message we send or receieve. Pretty much all information is shown,
except for the error name if a message is an error (interestingly we do
print the error text however). Fix that, and add the error name as well.

6 years agomount-util: add fusectl to list of API VFS
Lennart Poettering [Fri, 29 Sep 2017 12:36:06 +0000 (14:36 +0200)]
mount-util: add fusectl to list of API VFS

6 years agodissect: split list of discard-supporting fs out into mount-util.c
Lennart Poettering [Fri, 29 Sep 2017 12:23:17 +0000 (14:23 +0200)]
dissect: split list of discard-supporting fs out into mount-util.c

Let's manage the list of file systems that do a specific thing at one
place, following similar naming.

No functional changes.

6 years agodissect: automatically mark partitions read-only that have a read-only file system
Lennart Poettering [Fri, 29 Sep 2017 12:19:22 +0000 (14:19 +0200)]
dissect: automatically mark partitions read-only that have a read-only file system

Specifically, squashfs and iso9660 are always read-only, hence make sure
we never even think about mounting them writable.

6 years agomeson: move library version defines to the top (#6939)
Zbigniew Jędrzejewski-Szmek [Thu, 28 Sep 2017 17:24:16 +0000 (19:24 +0200)]
meson: move library version defines to the top (#6939)

6 years agomeson: bump release to 235
Lennart Poettering [Thu, 28 Sep 2017 09:29:52 +0000 (11:29 +0200)]
meson: bump release to 235

6 years agolibelogind: use IN_SET macro
Yu Watanabe [Thu, 28 Sep 2017 08:17:04 +0000 (17:17 +0900)]
libelogind: use IN_SET macro

6 years agocgroup: IN_SET() FTW!
Lennart Poettering [Tue, 26 Sep 2017 20:49:09 +0000 (22:49 +0200)]
cgroup: IN_SET() FTW!

6 years agocgroup: after determining that a cgroup is empty, asynchronously dispatch this
Lennart Poettering [Tue, 26 Sep 2017 20:43:08 +0000 (22:43 +0200)]
cgroup: after determining that a cgroup is empty, asynchronously dispatch this

This makes sure that if we learn via inotify or another event source
that a cgroup is empty, and we checked that this is indeed the case (as
we might get spurious notifications through inotify, as the inotify
logic through the "cgroups.event" is pretty unspecific and might be
trigger for a variety of reasons), then we'll enqueue a defer event for
it, at a priority lower than SIGCHLD handling, so that we know for sure
that if there's waitid() data for a process we used it before
considering the cgroup empty notification.

Fixes: #6608
6 years agocore: rename cgroup_queue → cgroup_realize_queue
Lennart Poettering [Tue, 26 Sep 2017 20:15:02 +0000 (22:15 +0200)]
core: rename cgroup_queue → cgroup_realize_queue

We are about to add second cgroup-related queue, called
"cgroup_empty_queue", hence let's rename "cgroup_queue" to
"cgroup_realize_queue" (as that is its purpose) to minimize confusion
about the two queues.

Just a rename, no functional changes.

6 years agocore/cgroup: add a helper macro for a common pattern (#6926)
Zbigniew Jędrzejewski-Szmek [Wed, 27 Sep 2017 15:54:06 +0000 (17:54 +0200)]
core/cgroup: add a helper macro for a common pattern (#6926)

6 years agofs-util: propagate EEXIST error in symlink_idempotent() as EEXIST
Lennart Poettering [Tue, 26 Sep 2017 16:26:20 +0000 (18:26 +0200)]
fs-util: propagate EEXIST error in symlink_idempotent() as EEXIST

We really shouldn't silently translate the error code here for no
reason.

6 years agolog: add a mode where we open the log fds for every single log message
Lennart Poettering [Tue, 26 Sep 2017 15:45:09 +0000 (17:45 +0200)]
log: add a mode where we open the log fds for every single log message

This we can then make use in execute.c to make error logging a bit less
special when preparing for process execution, as we can still log but
don't have any fds open continously.