chiark / gitweb /
Sven Eden [Mon, 14 May 2018 05:31:02 +0000 (07:31 +0200)]
check_tree.pl: Add --create to allow creation of files, and --stay to not reset the upstream tree on program end.
Sven Eden [Wed, 9 May 2018 05:19:24 +0000 (07:19 +0200)]
pwx/check_tree.pl: Switch to use Git::Wrapper for checking out the wanted refid on the upstream tree.
Sven Eden [Mon, 7 May 2018 17:34:57 +0000 (19:34 +0200)]
pwx/migrate_tree.pl: New program to consolidate the pwx git bash helpers.
maxice8 [Fri, 27 Apr 2018 13:05:25 +0000 (10:05 -0300)]
musl_missing.h: add FTW_* macros missing from musl libc.
Sven Eden [Thu, 26 Apr 2018 17:51:19 +0000 (19:51 +0200)]
Fix double-hyphen error in man/logind.conf.xml and man/user-system-options.xml
Sven Eden [Thu, 26 Apr 2018 17:41:40 +0000 (19:41 +0200)]
Updated man/loginctl.xml to fit elogind a bit better.
Sven Eden [Thu, 26 Apr 2018 17:41:14 +0000 (19:41 +0200)]
Remove man/standard-conf.xml, as this does not apply for elogind.
Sven Eden [Mon, 23 Apr 2018 16:40:49 +0000 (18:40 +0200)]
Move /var/lib/systemd/linger to /var/lib/elogind/.
Sven Eden [Mon, 23 Apr 2018 16:38:53 +0000 (18:38 +0200)]
Reverted accidential renaming of /run/systemd to /run/elogind. Applications using elogind as a drop-in replacement expect the first.
Sven Eden [Mon, 23 Apr 2018 09:03:46 +0000 (11:03 +0200)]
check_tree.pl: Do not change /run/systemd
Sven Eden [Fri, 20 Apr 2018 15:24:07 +0000 (17:24 +0200)]
Fix 'double dash in comment' error.
Sven Eden [Fri, 20 Apr 2018 15:12:17 +0000 (17:12 +0200)]
check_tree.pl: Add preparation for XML files.
Sven Eden [Thu, 19 Apr 2018 16:37:32 +0000 (18:37 +0200)]
Update man page sources to upstream tag v236 variants.
Sven Eden [Thu, 19 Apr 2018 16:15:56 +0000 (18:15 +0200)]
man/sd_id128_randomize.xml: Added check_tree.pl compatible elogind masking.
Sven Eden [Thu, 19 Apr 2018 16:15:56 +0000 (18:15 +0200)]
man/logind.conf.xml: Added check_tree.pl compatible elogind masking.
Sven Eden [Thu, 19 Apr 2018 16:15:56 +0000 (18:15 +0200)]
man/loginctl.xml: Added check_tree.pl compatible elogind masking.
Sven Eden [Thu, 19 Apr 2018 16:15:56 +0000 (18:15 +0200)]
man/elogind.xml: Added check_tree.pl compatible elogind masking.
Sven Eden [Thu, 19 Apr 2018 16:14:50 +0000 (18:14 +0200)]
check_tree.pl : Enhance XML handling.
Sven Eden [Wed, 18 Apr 2018 15:09:23 +0000 (17:09 +0200)]
Manpages: update elogind refentry for better handling through check_tree.pl
Sven Eden [Wed, 18 Apr 2018 15:08:42 +0000 (17:08 +0200)]
Prepare src/libelogind/libelogind.pc.in for better handling through check_tree.pl
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2018 13:04:50 +0000 (14:04 +0100)]
missing_syscall: when adding syscall replacements, use different names (#8229)
In meson.build we check that functions are available using:
meson.get_compiler('c').has_function('foo')
which checks the following:
- if __stub_foo or __stub___foo are defined, return false
- if foo is declared (a pointer to the function can be taken), return true
- otherwise check for __builtin_memfd_create
_stub is documented by glibc as
It defines a symbol '__stub_FUNCTION' for each function
in the C library which is a stub, meaning it will fail
every time called, usually setting errno to ENOSYS.
So if __stub is defined, we know we don't want to use the glibc version, but
this doesn't tell us if the name itself is defined or not. If it _is_ defined,
and we define our replacement as an inline static function, we get an error:
In file included from ../src/basic/missing.h:1358:0,
from ../src/basic/util.h:47,
from ../src/basic/calendarspec.h:29,
from ../src/basic/calendarspec.c:34:
../src/basic/missing_syscall.h:65:19: error: static declaration of 'memfd_create' follows non-static declaration
static inline int memfd_create(const char *name, unsigned int flags) {
^~~~~~~~~~~~
.../usr/include/bits/mman-shared.h:46:5: note: previous declaration of 'memfd_create' was here
int memfd_create (const char *__name, unsigned int __flags) __THROW;
^~~~~~~~~~~~
To avoid this problem, call our inline functions different than glibc,
and use a #define to map the official name to our replacement.
Fixes #8099.
v2:
- use "missing_" as the prefix instead of "_"
v3:
- rebase and update for statx()
Unfortunately "statx" is also present in "struct statx", so the define
causes issues. Work around this by using a typedef.
I checked that systemd compiles with current glibc
(glibc-devel-2.26-24.fc27.x86_64) if HAVE_MEMFD_CREATE, HAVE_GETTID,
HAVE_PIVOT_ROOT, HAVE_SETNS, HAVE_RENAMEAT2, HAVE_KCMP, HAVE_KEYCTL,
HAVE_COPY_FILE_RANGE, HAVE_BPF, HAVE_STATX are forced to 0.
Setting HAVE_NAME_TO_HANDLE_AT to 0 causes an issue, but it's not because of
the define, but because of struct file_handle.
Sven Eden [Thu, 29 Mar 2018 05:53:20 +0000 (07:53 +0200)]
Prep v236.1: To catch up with upstream, already branch out v236-stable.
Sven Eden [Mon, 26 Mar 2018 16:22:06 +0000 (18:22 +0200)]
Prep v236: Adapt elogind parts in the build system to upstream changes.
Sven Eden [Fri, 16 Mar 2018 06:59:32 +0000 (07:59 +0100)]
check_tree.pl: Added *.sym and *.in file handling.
Sven Eden [Fri, 16 Mar 2018 05:56:25 +0000 (06:56 +0100)]
check_tree.pl: Do not remove empty lines prior masks/inserts. Do not rename 'systemd' in mask blocks.
Sven Eden [Thu, 15 Mar 2018 05:12:03 +0000 (06:12 +0100)]
check_tree.pl: chomp git rev-parse results.
Sven Eden [Thu, 15 Mar 2018 05:03:12 +0000 (06:03 +0100)]
Prep v236: Update root build files.
Sven Eden [Tue, 13 Mar 2018 18:20:00 +0000 (19:20 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (9/9) tools
Sven Eden [Tue, 13 Mar 2018 18:19:10 +0000 (19:19 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (8/9) src/test
Sven Eden [Tue, 13 Mar 2018 18:18:29 +0000 (19:18 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (7/9) src/systemd
Sven Eden [Tue, 13 Mar 2018 18:17:48 +0000 (19:17 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (6/9) src/shared
Sven Eden [Tue, 13 Mar 2018 18:14:05 +0000 (19:14 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (5/9) src/login
Sven Eden [Tue, 13 Mar 2018 18:12:55 +0000 (19:12 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (4/9) src/libelogind
Sven Eden [Tue, 13 Mar 2018 18:12:26 +0000 (19:12 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (3/9) src/core
Sven Eden [Tue, 13 Mar 2018 18:11:43 +0000 (19:11 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (2/9) src/basic
Sven Eden [Tue, 13 Mar 2018 18:10:50 +0000 (19:10 +0100)]
Prep v236 : Add missing SPDX-License-Identifier (1/9) shell-completion
Sven Eden [Tue, 13 Mar 2018 18:16:48 +0000 (19:16 +0100)]
Prep v236: Remove obsolete files that have slithered in.
Sven Eden [Tue, 13 Mar 2018 18:05:56 +0000 (19:05 +0100)]
Prep v236: Update build system and adapt to eloginds needs.
Sven Eden [Tue, 13 Mar 2018 07:17:29 +0000 (08:17 +0100)]
Prep v236: Apply missing upstream updates to the build system
Sven Eden [Tue, 13 Mar 2018 07:16:23 +0000 (08:16 +0100)]
New: pwx/update_po_files.pl : Coment out all translations to non-existent files.
=> Update po translation files
Sven Eden [Tue, 13 Mar 2018 06:55:12 +0000 (07:55 +0100)]
check_tree.pl: Added the possibility to (manualy) check root files and enhanced shell mask handling.
Sven Eden [Mon, 12 Mar 2018 05:59:45 +0000 (06:59 +0100)]
Prep v236: Update root level files
Zbigniew Jędrzejewski-Szmek [Thu, 14 Dec 2017 13:12:39 +0000 (14:12 +0100)]
Update TODO
Zbigniew Jędrzejewski-Szmek [Thu, 14 Dec 2017 09:15:41 +0000 (10:15 +0100)]
Make taint message structured and add catalog entry
Dec 14 14:10:54 krowka elogind[1]: System is tainted: overflowgid-not-65534
-- Subject: The system is configured in a way that might cause problems
-- Defined-By: elogind
-- Support: https://lists.freedesktop.org/mailman/listinfo/elogind-devel
--
-- The following "tags" are possible:
-- - "split-usr" — /usr is a separate file system and was not mounted when elogind
-- was booted
-- - "cgroups-missing" — the kernel was compiled without cgroup support or access
-- to expected interface files is resticted
-- - "var-run-bad" — /var/run is not a symlink to /run
-- - "overflowuid-not-65534" — the kernel user ID used for "unknown" users (with
-- NFS or user namespaces) is not 65534
-- - "overflowgid-not-65534" — the kernel group ID used for "unknown" users (with
-- NFS or user namespaces) is not 65534
-- Current system is tagged as overflowgid-not-65534.
Lennart Poettering [Mon, 11 Dec 2017 15:10:25 +0000 (16:10 +0100)]
meson: increase version numbers
Daniel Black [Thu, 14 Dec 2017 11:17:43 +0000 (22:17 +1100)]
core: add EXTEND_TIMEOUT_USEC={usec} - prevent timeouts in startup/runtime/shutdown (#7214)
With Type=notify services, EXTEND_TIMEOUT_USEC= messages will delay any startup/
runtime/shutdown timeouts.
A service that hasn't timed out, i.e, start time < TimeStartSec,
runtime < RuntimeMaxSec and stop time < TimeoutStopSec, may by sending
EXTEND_TIMEOUT_USEC=, allow the service to continue beyond the limit for
the execution phase (i.e TimeStartSec, RunTimeMaxSec and TimeoutStopSec).
EXTEND_TIMEOUT_USEC= must continue to be sent (in the same way as
WATCHDOG=1) within the time interval specified to continue to reprevent
the timeout from occuring.
Watchdog timeouts are also extended if a EXTEND_TIMEOUT_USEC is greater
than the remaining time on the watchdog counter.
Fixes #5868.
Daniel Black [Thu, 14 Dec 2017 04:51:23 +0000 (15:51 +1100)]
man: elogind.unit: move note about clearing lists (#7621)
This is mainly for drop-in files.
Tiago Salem Herrmann [Tue, 12 Dec 2017 15:52:45 +0000 (13:52 -0200)]
sysctl: disable buffer while writing to /proc
fputs() writes only first 2048 bytes and fails
to write to /proc when values are larger than that.
This patch adds a new flag to WriteStringFileFlags
that make it possible to disable the buffer under
specific cases.
Thomas Haller [Wed, 13 Dec 2017 07:41:11 +0000 (08:41 +0100)]
tree-wide: use STRLEN() to allocate buffer of constant size
Using strlen() to declare a buffer results in a variable-length array,
even if the compiler likely optimizes it to be a compile time constant.
When building with -Wvla, certain versions of gcc complain about such
buffers. Compiling with -Wvla has the advantage of preventing variably
length array, which defeat static asserts that are implemented by
declaring an array of negative length.
Thomas Haller [Wed, 13 Dec 2017 07:17:07 +0000 (08:17 +0100)]
basic/macros: add STRLEN() to get length of string literal as constant expression
While the compiler likely optimizes strlen(x) for string literals,
it is not a constant expression.
Hence,
char buffer[strlen("OPTION_000") + 1];
declares a variable-length array. STRLEN() can be used instead
when a constant espression is needed.
It's not entirely identical to strlen(), as STRLEN("a\0") counts 2.
Also, it only works with string literals and the macro enforces
that the argument is a literal.
Lennart Poettering [Tue, 12 Dec 2017 19:13:16 +0000 (20:13 +0100)]
meson: link NSS modules with -z nodelete (#7607)
We might end up allocating mempools, and when we are unloaded we might
orphan them, thus leaking them. Hence, let's just stick around for good,
so the mempools remain referenced continously and for good, and thus no
memory is leaked (though the memory isn't cleaned up either).
Fixes: #7596
Lennart Poettering [Mon, 11 Dec 2017 22:10:11 +0000 (23:10 +0100)]
verbs: add a new VERB_MUSTBEROOT flag
Given that we regularly have verbs that require privileges, let's just
make this a flag of the verb.
Lennart Poettering [Fri, 8 Dec 2017 19:52:38 +0000 (20:52 +0100)]
tree-wide: drop a few == NULL and != NULL comparison
Our CODING_STYLE suggests not comparing with NULL, but relying on C's
downgrade-to-bool feature for that. Fix up some code to match these
guidelines. (This is not comprehensive, the coccinelle output for this
is unfortunately kinda borked)
Olaf Hering [Fri, 8 Dec 2017 21:21:42 +0000 (22:21 +0100)]
virt: use XENFEAT_dom0 to detect the hardware domain (#6442, #6662) (#7581)
The detection of ConditionVirtualisation= relies on the presence of
/proc/xen/capabilities. If the file exists and contains the string
"control_d", the running system is a dom0 and VIRTUALIZATION_NONE should
be set. In case /proc/xen exists, or some sysfs files indicate "xen",
VIRTUALIZATION_XEN should be set to indicate the system is a domU.
With an (old) xenlinux based kernel, /proc/xen/capabilities is always
available and the detection described above works always. But with a
pvops based kernel, xenfs must be mounted on /proc/xen to get
"capabilities". This is done by a proc-xen.mount unit, which is part of
xen.git. Since the mounting happens "late", other units may be scheduled
before "proc-xen.mount". If these other units make use of
"ConditionVirtualisation=", the virtualization detection returns
incorect results. detect_vm() will set VIRTUALIZATION_XEN because "xen"
is found in sysfs. This value will be cached. Once xenfs is mounted, the
next process that runs detect_vm() will get VIRTUALIZATION_NONE.
This misdetection can be fixed by using
/sys/hypervisor/properties/features, which exports the value returned by
the "XENVER_get_features" hypercall. If the bit XENFEAT_dom0 is set, the
domain is the "hardware domain". It is supposed to have permissions to
access all hardware. The used sysfs file is available since v2.6.31.
The commonly used term "dom0" refers to the control domain which runs
the toolstack and has access to all hardware. But the virtualization
host may be configured such that one dedicated domain becomes the
"hardware domain", and another one the "toolstack domain".
Yu Watanabe [Fri, 8 Dec 2017 12:34:25 +0000 (21:34 +0900)]
acl: fix typo in comment (#7580)
Dmitry Rozhkov [Mon, 23 Oct 2017 11:46:13 +0000 (14:46 +0300)]
resolved: implement D-Bus API for DNS-SD
Clinton Roy [Fri, 8 Dec 2017 02:44:20 +0000 (15:44 +1300)]
man: missing whitespace (#7579)
Olaf Hering [Thu, 7 Dec 2017 20:09:32 +0000 (21:09 +0100)]
virt: propagate errors in detect_vm_xen_dom0 (#7553)
Update detect_vm_xen_dom0 to propagate errors in case reading
/proc/xen/capabilites fails. This does not fix any bugs, it just makes
it consistent with other functions called by detect_vm.
Zbigniew Jędrzejewski-Szmek [Thu, 7 Dec 2017 09:44:43 +0000 (10:44 +0100)]
meson: place elogind-sulogin-shell in build/
We do that will all executables so that it's easy to call them.
Yu Watanabe [Thu, 7 Dec 2017 08:19:11 +0000 (17:19 +0900)]
meson: warn if nobody-user and nobody-group are set to different name
It may work, but is very strange. So, let's warn about that.
v2:
Debian uses nobody and nogroup. Do not warn such case.
Yu Watanabe [Thu, 7 Dec 2017 06:49:16 +0000 (15:49 +0900)]
sysusers: use NOBODY_USER_NAME
Lennart Poettering [Wed, 6 Dec 2017 19:16:30 +0000 (20:16 +0100)]
virt: remove triple spurious newline
Olaf Hering [Wed, 6 Dec 2017 18:59:30 +0000 (19:59 +0100)]
virt: use /proc/xen as indicator for a Xen domain (#6442, #6662) (#7555)
The file /proc/xen/capabilities is only available if xenfs is mounted.
With a classic xenlinux based kernel that file is available
unconditionally. But with a modern pvops based kernel, xenfs must be
mounted before the "capabilities" may appear. xenfs is mounted very late
via .services files provided by the Xen toolstack. Other units may be
scheduled before xenfs is mounted, which will confuse the detection of
VIRTUALIZATION_XEN.
In all Xen enabled kernels, and if that kernel is actually running on
the Xen hypervisor, the "/proc/xen" directory is the reliable indicator
that this instance runs in a "Xen guest".
Adjust the code to check for /proc/xen instead of
/proc/xen/capabilities.
Fixes commit
3f61278b5 ("basic: Bugfix Detect XEN Dom0 as no virtualization")
Max Resch [Wed, 6 Dec 2017 14:29:52 +0000 (15:29 +0100)]
Set secure_boot flag in Kernel Zero-Page (#7482)
Setting the secure_boot flag, avoids getting the printout
"EFI stub: UEFI Secure Boot is enabled." when booting
a Linux kernel with linuxx64.efi.stub and EFI SecureBoot enabled.
This is mainly a cosmetic fixup, as the "quiet" kernel parameter does
not silence pr_efi printouts in the linux kernel (this only works using
the efi stub from the linux source tree)
hanklank [Wed, 6 Dec 2017 12:52:25 +0000 (13:52 +0100)]
Added some missing Swedish Strings (#7552)
Lennart Poettering [Tue, 5 Dec 2017 10:00:24 +0000 (11:00 +0100)]
meson: print warnings if the "nobody" user/group name is not compatible with the local system
At least on Fedora and Debian systems this not obvious to get right,
hence warn.
Lennart Poettering [Mon, 4 Dec 2017 16:06:56 +0000 (17:06 +0100)]
user-util: add UID_NOBODY defines that resolve to (uid_t) 65534
We use it all over the place, let's add a #define for it. Makes things
easier greppable, and more explanatory I think.
Lennart Poettering [Sat, 2 Dec 2017 12:07:18 +0000 (13:07 +0100)]
nss-elogind: tweak checks when we consult PID 1 for dynamic UID/GID lookups
Instead of contacting PID 1 for dynamic UID/GID lookups for all
UIDs/GIDs that do not qualify as "system" do the more precise check
instead: check if they actually qualify for the "dynamic" range.
Lennart Poettering [Sat, 2 Dec 2017 11:59:21 +0000 (12:59 +0100)]
user-util: add new uid_is_system() helper
This adds uid_is_system() and gid_is_system(), similar in style to
uid_is_dynamic(). That a helper like this is useful is illustrated by
the fact that test-condition.c didn't get the check right so far, which
this patch fixes.
Lennart Poettering [Sat, 2 Dec 2017 11:48:31 +0000 (12:48 +0100)]
build-sys: make the dynamic UID range, and the container UID range configurable
Also, export these ranges in our pkg-config files.
Zbigniew Jędrzejewski-Szmek [Thu, 23 Nov 2017 12:02:21 +0000 (13:02 +0100)]
util-lib: kill duplicate slashes in lookup paths
Since we're munging the array anyway, we can make the output a bit
nicer too.
Lennart Poettering [Tue, 5 Dec 2017 15:42:58 +0000 (16:42 +0100)]
hexdecoct: fix comment typo (#7548)
Lennart Poettering [Tue, 28 Nov 2017 15:37:53 +0000 (16:37 +0100)]
string-util: rework strextend() to optionally inset separators between each appended string
This adds a new flavour of strextend(), called
strextend_with_separator(), which takes an optional separator string. If
specified, the separator is inserted between each appended string, as
well as before the first one, but only if the original string was
non-empty.
This new call is particularly useful when appending new options to mount
option strings and suchlike, which need to be comma-separated, and
initially start out from an empty string.
Yu Watanabe [Tue, 5 Dec 2017 05:01:39 +0000 (14:01 +0900)]
meson: fix indentation
Lennart Poettering [Sun, 3 Dec 2017 19:57:24 +0000 (20:57 +0100)]
util-lib,tests: rework unbase64 so that we skip over whitespace automatically (#7522)
Let's optimize things a bit, and instead of having to strip whitespace
first before decoding base64, let's do that implicitly while doing so.
Given that base64 was designed the way it was designed specifically to
be tolerant to whitespace changes, it's a good idea to do this
automatically and implicitly.
Ikey Doherty [Sun, 3 Dec 2017 12:28:23 +0000 (12:28 +0000)]
sysusers: Provide meson argument to set gid for 'users' group (#7533)
To allow better integration with distributions requiring an explicitly
set gid for the `users` group, provide the new `-Dusers-gid` option to
set to a new numeric value.
In the absence of a specified gid, we'll fallback to the default existing
behaviour of `-` as the gid value, to automatically assign the next available
gid on the system.
Yu Watanabe [Thu, 30 Nov 2017 16:15:42 +0000 (01:15 +0900)]
fs-util: remove comment about non-existing function
Yu Watanabe [Thu, 30 Nov 2017 17:19:44 +0000 (02:19 +0900)]
fs-util: chase_symlinks(): remove unnecessary slash at the head
Before this, chase_symlinks("/../../foo/bar",...) returns //foo/bar.
This removes the unnecessary slash at the head.
Vito Caputo [Sat, 2 Dec 2017 00:49:52 +0000 (16:49 -0800)]
*: fix some inconsistent control statement style
Zbigniew Jędrzejewski-Szmek [Fri, 1 Dec 2017 15:25:19 +0000 (16:25 +0100)]
NEWS: update the text a bit (#7524)
This fixes various typos, removes some duplications, and adds a bit more
detail in the few places which are potential pitfalls for users.
Also change the way the paragraphs about new options begin, because having
a paragraph saying "Two new options have been added", and then bit lower
again "Two new options have been added" is confusing.
Zbigniew Jędrzejewski-Szmek [Wed, 29 Nov 2017 19:02:11 +0000 (20:02 +0100)]
Add x-elogind.growfs option for fstab
Zbigniew Jędrzejewski-Szmek [Tue, 21 Nov 2017 22:18:05 +0000 (23:18 +0100)]
Add x-elogind.makefs option for fstab
I opted to completely generate a unit for both mount points and swaps. For
swaps, it would be possible to use fixed template unit like elogind-mkswap@.service,
because there's no information passed except the device name. For mount points,
that's not possible because both the device name and file system type need to
be passed. Nevertheless, I expect that options will need to passed to both mkfs
and mkswap, in which case it'll be necessary to create units of both types
anyway.
Zbigniew Jędrzejewski-Szmek [Sun, 26 Nov 2017 21:51:29 +0000 (22:51 +0100)]
Add mkfs wrapper which first checks if the partition is empty
Zbigniew Jędrzejewski-Szmek [Tue, 21 Nov 2017 17:56:52 +0000 (18:56 +0100)]
growfs: add support for resizing encrypted partitions
Zbigniew Jędrzejewski-Szmek [Mon, 23 Oct 2017 11:40:38 +0000 (13:40 +0200)]
Add elogind-growfs tool
Zbigniew Jędrzejewski-Szmek [Tue, 31 Oct 2017 09:52:30 +0000 (10:52 +0100)]
test-mount-util: move test_path_is_mount_point here
path-util.c and mount-util.c are intertwined, but path_is_mount_point() is
defined in mount-util.c.
No functional difference.
Krzysztof Nowicki [Thu, 30 Nov 2017 10:59:29 +0000 (11:59 +0100)]
Fix SELinux labels in cgroup filesystem root directory (#7496)
When using SELinux with legacy cgroups the tmpfs on /sys/fs/cgroup is by
default labelled as tmpfs_t. This label is also inherited by the "cpu"
and "cpuacct" symbolic links. Unfortunately the policy expects them to
be labelled as cgroup_t, which is used for all the actual cgroup
filesystems. Failure to do so results in a stream of denials.
This state cannot be fixed reliably when the cgroup filesystem structure
is set-up as the SELinux policy is not yet loaded at this
moment. It also cannot be fixed later as the root of the cgroup
filesystem is remounted read-only. In order to fix it the root of the
cgroup filesystem needs to be temporary remounted read-write, relabelled
and remounted back read-only.
Zbigniew Jędrzejewski-Szmek [Tue, 28 Nov 2017 20:46:53 +0000 (21:46 +0100)]
meson: emit a warning if rootprefix is set
It's printed at the end because it's the easiest to spot there.
When meson is upgraded to 0.43.1, we'll be able to use warning() instead.
Lennart Poettering [Mon, 27 Nov 2017 15:06:39 +0000 (16:06 +0100)]
fileio: document why fileio-label.c and fileio.c are two different modules
Lennart Poettering [Wed, 22 Nov 2017 11:10:39 +0000 (12:10 +0100)]
logind: fix sysfs change trigger code
We can't create files in sysfs, hence don't bother. Also if we ignore
the return value, do so explicitly by casting to void.
Lennart Poettering [Tue, 21 Nov 2017 16:52:31 +0000 (17:52 +0100)]
specifier: add helper for escaping '%' characters to avoid making them subject for expansion
This is ultimately just a wrapper around strreplace(), but it makes
things a bit more self-descriptive.
Lennart Poettering [Tue, 21 Nov 2017 18:38:49 +0000 (19:38 +0100)]
string-util: update strreplace() a bit, use GREEDY_REALLOC()
Zbigniew Jędrzejewski-Szmek [Tue, 28 Nov 2017 11:35:49 +0000 (12:35 +0100)]
Add set/hashmap helpers for non-trivial freeing and use where straighforward
A macro is needed because otherwise we couldn't ensure type safety.
Some simple tests are included.
No functional change intended.
Zbigniew Jędrzejewski-Szmek [Tue, 28 Nov 2017 19:00:10 +0000 (20:00 +0100)]
Revert "meson: drop rootprefix option"
This reverts commit
ee4bfa21f62dbf4d8f2be27d3c763c3c16743bfd.
Also add comment so that this doesn't get deleted again by mistake.
Replaces #7461.
Yu Watanabe [Tue, 28 Nov 2017 13:06:34 +0000 (22:06 +0900)]
cap-list: check range of numeric value
Yu Watanabe [Tue, 28 Nov 2017 09:11:58 +0000 (18:11 +0900)]
alloc-util: coding style fix
Zbigniew Jędrzejewski-Szmek [Mon, 27 Nov 2017 21:52:32 +0000 (21:52 +0000)]
test-process-util: add (void) cast to make coverity happy
The intent is for the call to succeed only when privileged, so make
that clear.
Lennart Poettering [Mon, 27 Nov 2017 15:28:53 +0000 (16:28 +0100)]
sd-resolve: propagate timeouts in sd_resolve_wait() the same way as in sd_bus_wait(): ETIMEDOUT
Thankfully this is an internal API still, so we can mkae changes like
this.
Lennart Poettering [Mon, 13 Nov 2017 18:06:11 +0000 (19:06 +0100)]
logind: use the new FDSTOREREMOVE=1 sd_notify() message
Let's explicitly tell PID 1 that we don't need an fd anymore, instead of
relying exclusively on POLLERR/POLLHUP for it to be removed.
Fixes: #6908
Lennart Poettering [Mon, 13 Nov 2017 17:26:04 +0000 (18:26 +0100)]
core: add a new sd_notify() message for removing fds from the FD store again
Currenly the only way to remove fds from the fdstore is to fully
stop the service, or to somehow trigger POLLERR/POLLHUP on the fd, in
which case elogind will remove the fd automatically.
Let's add another way: a new message that can be sent to remove fds
explicitly, given their name.