]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoinitrd: fix systemd.debug-shell & friends 14177/head
Zbigniew Jędrzejewski-Szmek [Tue, 3 Dec 2019 13:48:27 +0000 (14:48 +0100)] 
initrd: fix systemd.debug-shell & friends

They would get assigned to an inactive target in the initramfs.

4 years agoman: document initrd.target
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2019 09:01:27 +0000 (10:01 +0100)] 
man: document initrd.target

4 years agopid1: use initrd.target in the initramfs by default
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2019 08:48:26 +0000 (09:48 +0100)] 
pid1: use initrd.target in the initramfs by default

This makes the code do what the documentation says. The code had no inkling
about initrd.target, so I think this change is fairly risky. As a fallback,
default.target will be loaded, so initramfses which relied on current behaviour
will still work, as along as they don't have a different initrd.target.

In an initramfs created with recent dracut:
$ ls -l usr/lib/systemd/system/{default.target,initrd.target}
lrwxrwxrwx. usr/lib/systemd/system/default.target -> initrd.target
-rw-r--r--. usr/lib/systemd/system/initrd.target
So at least for dracut, there should be no difference.

Also avoid a pointless allocation.

4 years agotree-wide: normalize includes of public headers
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2019 08:14:22 +0000 (09:14 +0100)] 
tree-wide: normalize includes of public headers

They are supposed to go into a sectinon of their own.

4 years agocore: use SPECIAL_DEFAULT_TARGET more
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2019 08:13:45 +0000 (09:13 +0100)] 
core: use SPECIAL_DEFAULT_TARGET more

4 years agoshared/ask-password-api: modify keyctl break value
Kevin Kuehler [Thu, 28 Nov 2019 00:35:15 +0000 (16:35 -0800)] 
shared/ask-password-api: modify keyctl break value

We can break if KEYCTL_READ return value is equal to our buffer size.

From keyctl(2):

On a successful return, the return value is always the total size of
the payload data.  To determine whether the buffer was of sufficient
size, check to see that the return value is less than or equal to the
value supplied in arg4.

4 years agosystemctl: fix indentation of cgroup tree
Lennart Poettering [Wed, 27 Nov 2019 13:52:30 +0000 (14:52 +0100)] 
systemctl: fix indentation of cgroup tree

Follow-up for 0d588deae21234c9a9d64d9eddbcbe7da5c9a39d.

In that commit the output got moved a 2 chars to the right, hence make
sure to also shift the cgroup tree to the right, so that it gets
properly aligned under the cgroup path again.

4 years agocryptsetup: reduce the chance that we will be OOM killed
Michal Sekletár [Wed, 27 Nov 2019 13:27:58 +0000 (14:27 +0100)] 
cryptsetup: reduce the chance that we will be OOM killed

cryptsetup introduced optional locking scheme that should serialize
unlocking keyslots which use memory hard key derivation
function (argon2). Using the serialization should prevent OOM situation
in early boot while unlocking encrypted volumes.

4 years agoMerge pull request #14164 from poettering/exec-start-transient-fix
Lennart Poettering [Wed, 27 Nov 2019 17:32:30 +0000 (18:32 +0100)] 
Merge pull request #14164 from poettering/exec-start-transient-fix

fix ExecStart= line generation for transient units

4 years agoMerge pull request #14145 from poettering/process-bypass
Zbigniew Jędrzejewski-Szmek [Wed, 27 Nov 2019 13:53:39 +0000 (14:53 +0100)] 
Merge pull request #14145 from poettering/process-bypass

/proc bypass in various process-util.c calls

4 years agocore: prefer non-@ syntax for ExecStart= 14164/head
Lennart Poettering [Wed, 27 Nov 2019 11:05:57 +0000 (12:05 +0100)] 
core: prefer non-@ syntax for ExecStart=

If the zeroth and first argv[] element on the same we don't need to
generate the "@" syntax for ExecStart= and friends.

4 years agocore: write out correct field name when creating transient service units
Lennart Poettering [Wed, 27 Nov 2019 11:05:38 +0000 (12:05 +0100)] 
core: write out correct field name when creating transient service units

4 years agoMerge pull request #14160 from mwilck/fix-shutdown-hang
Yu Watanabe [Wed, 27 Nov 2019 10:16:12 +0000 (19:16 +0900)] 
Merge pull request #14160 from mwilck/fix-shutdown-hang

Fix shutdown hang caused by recent udev change

4 years agoman/systemd.link: Add missing verb *be*
Paul Menzel [Tue, 26 Nov 2019 21:52:17 +0000 (22:52 +0100)] 
man/systemd.link: Add missing verb *be*

4 years agoudevd: don't use monitor after manager_exit() 14160/head
Martin Wilck [Tue, 26 Nov 2019 17:39:09 +0000 (18:39 +0100)] 
udevd: don't use monitor after manager_exit()

If udevd receives an exit signal, it releases its reference on the udev
monitor in manager_exit(). If at this time a worker is hanging, and if
the event timeout for this worker expires before udevd exits, udevd
crashes in on_sigchld()->udev_monitor_send_device(), because the monitor
has already been freed.

Fix this by testing the validity of manager->monitor in on_sigchld().

4 years agoRevert "udevd: fix crash when workers time out after exit is signal caught"
Martin Wilck [Tue, 26 Nov 2019 17:36:46 +0000 (18:36 +0100)] 
Revert "udevd: fix crash when workers time out after exit is signal caught"

This reverts commit 5db454b8031c58a743cc4ee3d5d1dd01dcff17e8.
See https://github.com/systemd/systemd/issues/14128

4 years agotest-fileio: cast EOF to (char) before comparing with char explicitly
Lennart Poettering [Mon, 25 Nov 2019 14:15:38 +0000 (15:15 +0100)] 
test-fileio: cast EOF to (char) before comparing with char explicitly

EOF is defined to -1, hence on platforms that have "char" unsigned we
can't compare it as-is, except if we accept an implicit cast. let's make
it an explicit cast, acknowledging the issue.

Fixes: #14118
4 years agoudev: tiny update for log messages
Yu Watanabe [Tue, 26 Nov 2019 05:01:25 +0000 (14:01 +0900)] 
udev: tiny update for log messages

4 years agonetwork: also assume Table=local for ipv6 route if Type=local, broadcast, anycast...
Yu Watanabe [Tue, 26 Nov 2019 03:41:54 +0000 (12:41 +0900)] 
network: also assume Table=local for ipv6 route if Type=local, broadcast, anycast or nat (#14148)

Also, if Type=multicast and scope is not set, then assume Scope=link.

Fixes #14122.

4 years agoMerge pull request #14134 from keszybz/variables-and-docs
Yu Watanabe [Tue, 26 Nov 2019 03:40:30 +0000 (12:40 +0900)] 
Merge pull request #14134 from keszybz/variables-and-docs

Documentation and option parsing fixes

4 years agoMerge pull request #14151 from mk-fg/fix-timer-dump-syntax-bug
Anita Zhang [Mon, 25 Nov 2019 23:56:33 +0000 (15:56 -0800)] 
Merge pull request #14151 from mk-fg/fix-timer-dump-syntax-bug

core.timer: fix "systemd-analyze dump" and docs syntax inconsistencies wrt OnTimezoneChange=

4 years agocore.timer: fix "systemd-analyze dump" and docs syntax inconsistencies wrt OnTimezone... 14151/head
Mike Kazantsev [Mon, 25 Nov 2019 23:29:03 +0000 (04:29 +0500)] 
core.timer: fix "systemd-analyze dump" and docs syntax inconsistencies wrt OnTimezoneChange=

4 years agoMerge pull request #14112 from keszybz/restart-no-log
Anita Zhang [Mon, 25 Nov 2019 20:09:00 +0000 (12:09 -0800)] 
Merge pull request #14112 from keszybz/restart-no-log

core/service: downgrade "scheduling restart" message to debug

4 years agoprocess-util: shortcut get_process_state() for our own process 14145/head
Lennart Poettering [Mon, 25 Nov 2019 13:59:01 +0000 (14:59 +0100)] 
process-util: shortcut get_process_state() for our own process

4 years agoprocess-util: shortcut get_process_comm() for our own process
Lennart Poettering [Mon, 25 Nov 2019 13:58:24 +0000 (14:58 +0100)] 
process-util: shortcut get_process_comm() for our own process

Let's bypass /proc if we can.

4 years agoprocess-util: tweak get_process_cwd() when calling for own process
Lennart Poettering [Mon, 25 Nov 2019 13:55:50 +0000 (14:55 +0100)] 
process-util: tweak get_process_cwd() when calling for own process

Let's bypass /proc if we can.

4 years agoman: refer to systemd.syntax(7) from systemd.nspawn(5) 14134/head
Zbigniew Jędrzejewski-Szmek [Sun, 24 Nov 2019 15:14:52 +0000 (16:14 +0100)] 
man: refer to systemd.syntax(7) from systemd.nspawn(5)

systemd.nspawn(5) contained a partial repeat of the stuff that is now in the
dedicated man page. Let's just refer to that.

While at it, do s/searched/searched for/ where appropriate and reword some
sentences for brevity.

4 years agofuzz-unit-file: add new items to the corpus
Zbigniew Jędrzejewski-Szmek [Sun, 24 Nov 2019 13:19:50 +0000 (14:19 +0100)] 
fuzz-unit-file: add new items to the corpus

4 years agopid1: fix the names of AllowedCPUs= and AllowedMemoryNodes=
Zbigniew Jędrzejewski-Szmek [Sun, 24 Nov 2019 13:14:43 +0000 (14:14 +0100)] 
pid1: fix the names of AllowedCPUs= and AllowedMemoryNodes=

The original PR was submitted with CPUSetCpus and CPUSetMems, which was later
changed to AllowedCPUs and AllowedMemmoryNodes everywhere (including the parser
used by systemd-run), but not in the parser for unit files.

Since we already released -rc1, let's keep support for the old names. I think
we can remove it in a release or two if anyone remembers to do that.

Fixes #14126. Follow-up for 047f5d63d7a1ab75073f8485e2f9b550d25b0772.

4 years agoMerge pull request #14129 from jlxawk/hwdb-sensor-jumper-ezpad-go
hadess [Mon, 25 Nov 2019 10:59:38 +0000 (11:59 +0100)] 
Merge pull request #14129 from jlxawk/hwdb-sensor-jumper-ezpad-go

hwdb: add accel sensor entry for Jumper EZpad Go

4 years agotest-proc-cmdline: disable EFI-dependent tests when EFI is disabled
Mike Gilbert [Mon, 25 Nov 2019 01:24:44 +0000 (20:24 -0500)] 
test-proc-cmdline: disable EFI-dependent tests when EFI is disabled

Fixes: https://github.com/systemd/systemd/issues/14116
4 years agohwdb: add bluetooth entry for Logitech MX Anywhere 2S
Haochen Tong [Wed, 20 Nov 2019 20:47:14 +0000 (21:47 +0100)] 
hwdb: add bluetooth entry for Logitech MX Anywhere 2S

4 years agoman: restores ConditionVirtualization documentation (#14138)
Steve Ramage [Mon, 25 Nov 2019 07:31:39 +0000 (23:31 -0800)] 
man: restores ConditionVirtualization documentation (#14138)

Resolves #14137. Error introduced in 337b733449924860eb71190e6eff95729909ede6.

4 years agoman: document all pager variables for systemctl and systemd
Zbigniew Jędrzejewski-Szmek [Sun, 24 Nov 2019 12:59:32 +0000 (13:59 +0100)] 
man: document all pager variables for systemctl and systemd

In those two pages, we need to include individual entries with xi:include to
merge the list less-variables.xml with the other entries, which is obviously
error prone. All variables are supported in both tools so add them.

4 years agobasic/terminal-util: add support for $NO_COLOR
Zbigniew Jędrzejewski-Szmek [Sun, 24 Nov 2019 12:59:22 +0000 (13:59 +0100)] 
basic/terminal-util: add support for $NO_COLOR

See inline comments. Fixes #13752.

4 years agotravis: add missing closing quote sign
Yu Watanabe [Sun, 24 Nov 2019 09:29:57 +0000 (18:29 +0900)] 
travis: add missing closing quote sign

Fixes #14127.

4 years agohwdb: add accel sensor entry for Jumper EZpad Go 14129/head
J. Xing [Sat, 23 Nov 2019 23:10:56 +0000 (07:10 +0800)] 
hwdb: add accel sensor entry for Jumper EZpad Go

This commit fix the accelerometer orientation on the Jumper EZpad
Go tablet.

The tablet does not have its product name filled in dmi table, make
the match string a bit generic.  Here we assume that the use of a
KIOX000A + bios-vendor + chassis-type combo is unique enough to
match the currently available product in Jumper's x86 tablet series.

For future reference, as in 2019, the tablet has a dmialias of:

  dmi:bvnAmericanMegatrendsInc.:bvrZB-BI-11.6-SF133AR200-059-J \
  :bd05/21/2019:svnjumper:pnEZpad:pvrTobefilledbyO.E.M.:rvnTob \
  efilledbyO.E.M.:rnTobefilledbyO.E.M.:rvrTobefilledbyO.E.M.:c \
  vnTobefilledbyO.E.M.:ct31:cvrTobefilledbyO.E.M.:

4 years agomeson: bump version numbers for v244 v244-rc1
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 13:41:10 +0000 (14:41 +0100)] 
meson: bump version numbers for v244

4 years agoMerge pull request #14099 from keszybz/machine-ref-unref-fix
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 13:33:27 +0000 (14:33 +0100)] 
Merge pull request #14099 from keszybz/machine-ref-unref-fix

Fix for the issue when machine cannot be started second time, and better nspawn logging

4 years agosystemd-tmpfiles: don't install timer when service isn't installed either
Pascal de Bruijn [Fri, 22 Nov 2019 08:20:20 +0000 (09:20 +0100)] 
systemd-tmpfiles: don't install timer when service isn't installed either

Fixes: systemd-tmpfiles-clean.timer: Refusing to start, unit
systemd-tmpfiles-clean.service to trigger not loaded.

4 years agoMerge pull request #14109 from poettering/varlink-tweaks
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 13:30:16 +0000 (14:30 +0100)] 
Merge pull request #14109 from poettering/varlink-tweaks

varlink: fix more/continues method calls, and correctly apply method call timeout

4 years agocore/service: downgrade "scheduling restart" message to debug 14112/head
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 13:19:51 +0000 (14:19 +0100)] 
core/service: downgrade "scheduling restart" message to debug

I see we log this during every boot, even though it is a routine expected event:
Nov 12 14:50:01 krowka systemd[1]: systemd-journald.service: Service has no hold-off time (RestartSec=0), scheduling restart.
(and for other services too). Let's downgrade this to debug level.

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

4 years agovarlink: fix enablement of varlink timeout event source 14109/head
Lennart Poettering [Thu, 21 Nov 2019 11:14:58 +0000 (12:14 +0100)] 
varlink: fix enablement of varlink timeout event source

4 years agovarlink: drop too much whitespace
Lennart Poettering [Thu, 21 Nov 2019 11:14:44 +0000 (12:14 +0100)] 
varlink: drop too much whitespace

4 years agovarlink: port varlink code over to use getdtablesize() for sizing number of concurren...
Lennart Poettering [Tue, 20 Aug 2019 12:07:09 +0000 (14:07 +0200)] 
varlink: port varlink code over to use getdtablesize() for sizing number of concurrent connections

Use the official glibc API for determining this parameter. In most other
cases in our tree it's better to go directly for RLIMIT_NOFILE since
it's semantically what we want, but for this case it appears more
appropriate to use the friendlier, shorter, explicit API.

4 years agovarlink: move connection fds > fd2
Lennart Poettering [Thu, 15 Aug 2019 07:34:05 +0000 (09:34 +0200)] 
varlink: move connection fds > fd2

We want to use this code in NSS modules, and we never know the execution
environment we are run in there, hence let's move our fds up to ensure
we won't step into dangerous fd territory.

This is similar to how we already do it in sd-bus for client connection
fds.

4 years agovarlink: fix support for more/continues method calls
Lennart Poettering [Wed, 7 Aug 2019 10:44:13 +0000 (12:44 +0200)] 
varlink: fix support for more/continues method calls

4 years agomachine: fold machine_stop_scope() into machine_stop() 14099/head
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 13:54:11 +0000 (14:54 +0100)] 
machine: fold machine_stop_scope() into machine_stop()

No functional change.

4 years agomachined: simplify reference handling for units
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 13:41:32 +0000 (14:41 +0100)] 
machined: simplify reference handling for units

Before, we'd unref from machine_stop_unit, still keeping the unit name around,
and only forget the name later, when garbage collecting. If we didn't call
manager_stop_unit(), then we wouldn't do the unref. Let's unref at the same
point where we do garbage collection, so that it is always true that
iff we have the name generated with AddRef=1, then have a reference to the unit,
and as soon as we forget the name, we drop the reference.

This should fix the issue when repeated systemd-nspawn --register=yes fails
with "scope already exists" error.

Incidentally, this fixes an error in the code path where r was used instead of q.

4 years agomachine: simplify machine_start_scope()
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 13:32:51 +0000 (14:32 +0100)] 
machine: simplify machine_start_scope()

It is called from only one place, and we can make things simpler by calculating the
necessary stuff directly in the function. No functional change.

4 years agomachine: make machine_start_scope() static
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 12:44:33 +0000 (13:44 +0100)] 
machine: make machine_start_scope() static

Having this function which is called only from one place in a separate file
makes the code harder to follow. In preparation for subsequent changes, let's
make it static.

4 years agonspawn: log syscalls we cannot add at debug level
Zbigniew Jędrzejewski-Szmek [Wed, 20 Nov 2019 18:02:36 +0000 (19:02 +0100)] 
nspawn: log syscalls we cannot add at debug level

Without out at least a debug log line it is hard to figure out when something
goes wrong.

Reduce scope of a variable while at it.

4 years agoman: use <constant> for capability names in nspawn page
Zbigniew Jędrzejewski-Szmek [Wed, 20 Nov 2019 17:35:26 +0000 (18:35 +0100)] 
man: use <constant> for capability names in nspawn page

4 years agonspawn: dump capability list with --capabilities=help
Zbigniew Jędrzejewski-Szmek [Wed, 20 Nov 2019 17:33:32 +0000 (18:33 +0100)] 
nspawn: dump capability list with --capabilities=help

4 years agoNEWS: add contributors for v244
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 08:33:59 +0000 (09:33 +0100)] 
NEWS: add contributors for v244

4 years agomailmap: update
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 08:33:40 +0000 (09:33 +0100)] 
mailmap: update

4 years agoMerge pull request #14081 from poettering/xattr-list-rework
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 08:18:24 +0000 (09:18 +0100)] 
Merge pull request #14081 from poettering/xattr-list-rework

xattr-util rework and addition of flistxattr_malloc() helper plus test

4 years agoMerge pull request #14105 from keszybz/man-directives-cleanup
Zbigniew Jędrzejewski-Szmek [Fri, 22 Nov 2019 08:06:28 +0000 (09:06 +0100)] 
Merge pull request #14105 from keszybz/man-directives-cleanup

Man formatting and sorting fixes

4 years agohwdb: Dell venue 10 pro 5055 accel mount matrix (#14104)
ksbex [Fri, 22 Nov 2019 07:51:44 +0000 (02:51 -0500)] 
hwdb: Dell venue 10 pro 5055 accel mount matrix (#14104)

4 years agoman: sort options without "=" in the directives index 14105/head
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 21:02:07 +0000 (22:02 +0100)] 
man: sort options without "=" in the directives index

Some options would appear twice in the index, e.g. --collect= and
--collect. Some man pages use one form, some the other, and the argument
might be mandatory for some commands but not others. Anyway, let's display
them as one entry, to reduce the total number of items listed.

4 years agoman: fix a few bogus entries in directives index
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 19:33:26 +0000 (20:33 +0100)] 
man: fix a few bogus entries in directives index

When wrong element types are used, directives are sometimes placed in the wrong
section. Also, strip part of text starting with "'", which is used in a few
places and which is displayed improperly in the index.

4 years agoman: change noindex="true" to index="false"
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 19:22:12 +0000 (20:22 +0100)] 
man: change noindex="true" to index="false"

We nowadays prefer positive options over negative.

4 years agoman: use <command> not <option> for commands in resolvectl(1)
Zbigniew Jędrzejewski-Szmek [Thu, 21 Nov 2019 19:18:42 +0000 (20:18 +0100)] 
man: use <command> not <option> for commands in resolvectl(1)

4 years agobootctl: make 'random-seed' handle inability to write system token EFI variable grace...
Lennart Poettering [Tue, 19 Nov 2019 15:33:22 +0000 (16:33 +0100)] 
bootctl: make 'random-seed' handle inability to write system token EFI variable gracefully

Apparently some firmwares don't allow us to write this token, and refuse
it with EINVAL. We should normally consider that a fatal error, but not
really in the case of "bootctl random-seed" when called from the
systemd-boot-system-token.service since it's called as "best effort"
service after boot on various systems, and hence we shouldn't fail
loudly.

Similar, when we cannot find the ESP don't fail either, since there are
systems (arch install ISOs) that carry a boot loader capable of the
random seed logic but don't mount it after boot.

Fixes: #13603
4 years agoresolve: rename define fixing a typo
Zbigniew Jędrzejewski-Szmek [Tue, 19 Nov 2019 09:15:57 +0000 (10:15 +0100)] 
resolve: rename define fixing a typo

4 years agoMerge pull request #14093 from poettering/cgroups-delegate-xattr
Zbigniew Jędrzejewski-Szmek [Wed, 20 Nov 2019 22:53:03 +0000 (23:53 +0100)] 
Merge pull request #14093 from poettering/cgroups-delegate-xattr

mark delegated cgroups via xattr, and visualize the cut points in cgls

4 years agoupdate TODO 14093/head
Lennart Poettering [Wed, 20 Nov 2019 16:49:38 +0000 (17:49 +0100)] 
update TODO

4 years agocgls: visually separate processes from cgroups
Lennart Poettering [Wed, 20 Nov 2019 16:44:54 +0000 (17:44 +0100)] 
cgls: visually separate processes from cgroups

Let's show them in grey, since we generally want to focus on showing the
cgroups much less than the processes in them.

4 years agocgls: show delegation boundaries by underlining the cgroup in the output
Lennart Poettering [Wed, 20 Nov 2019 16:43:09 +0000 (17:43 +0100)] 
cgls: show delegation boundaries by underlining the cgroup in the output

This should help visualize where one manager's territory begins and
another's starts. Do this by underlining (since it's a "cut" point an
underline made most sense to me). Since underlining is not visible on
the console let's also show an ellipses for all lines that are
delegation boundaries.

Unfortunately this all is not as useful as it appears. The
"trusted.delegate" xattr is only visible to roo, which means
"systemd-cgls" has be called as root to show the boundaries.
Unfortunately cgroupfs doesn't support unprivileged xattrs on cgroups.

4 years agocore: set "trusted.delegate" xattr on cgroups that are delegation boundaries
Lennart Poettering [Wed, 20 Nov 2019 16:42:02 +0000 (17:42 +0100)] 
core: set "trusted.delegate" xattr on cgroups that are delegation boundaries

Let's mark cgroups that are delegation boundaries to us. This can then
be used by tools such as "systemd-cgls" to show where the next manager
takes over.

4 years agocgroup-util: add new cg_remove_xattr() for removing xattr from cgroup
Lennart Poettering [Wed, 20 Nov 2019 16:41:48 +0000 (17:41 +0100)] 
cgroup-util: add new cg_remove_xattr() for removing xattr from cgroup

4 years agoMerge pull request #14090 from poettering/clonenewns-fix
Lennart Poettering [Wed, 20 Nov 2019 16:27:56 +0000 (17:27 +0100)] 
Merge pull request #14090 from poettering/clonenewns-fix

make sure systemd-logind.service can start if unshare() is blocked

4 years agoupdate NEWS
Lennart Poettering [Wed, 20 Nov 2019 11:47:52 +0000 (12:47 +0100)] 
update NEWS

4 years agoMerge pull request #14036 from keszybz/systectl-add-logs-and-watchdogs
Zbigniew Jędrzejewski-Szmek [Wed, 20 Nov 2019 15:15:09 +0000 (16:15 +0100)] 
Merge pull request #14036 from keszybz/systectl-add-logs-and-watchdogs

Systemctl add log-level, log-target, service-watchdogs commands

4 years agoMerge pull request #14074 from keszybz/rename-system-options
Zbigniew Jędrzejewski-Szmek [Wed, 20 Nov 2019 15:13:46 +0000 (16:13 +0100)] 
Merge pull request #14074 from keszybz/rename-system-options

Rename system-options

4 years agocore: don't insist on ProtectHostname= if unshare() is blocked 14090/head
Lennart Poettering [Wed, 20 Nov 2019 11:27:28 +0000 (12:27 +0100)] 
core: don't insist on ProtectHostname= if unshare() is blocked

Previously we'd only skip ProtectHostname= if kernel support for
namespaces was lacking. With this change we also accept if unshare()
fails because it is blocked.

4 years agocore: be more lenient when checking whether sandboxing is necessary
Lennart Poettering [Wed, 20 Nov 2019 11:23:17 +0000 (12:23 +0100)] 
core: be more lenient when checking whether sandboxing is necessary

In some containers unshare() is made unavailable entirely. Let's deal
with this that more gracefully and disable our sandboxing of services
then, so that we work in a container, under the assumption the container
manager is then responsible for sandboxing if we can't do it ourselves.

Previously, we'd insist on sandboxing as soon as any form of BindPath=
is used. With this change we only insist on it if we have a setting like
that where source and destination differ, i.e. there's a mapping
established that actually rearranges things, and thus would result in
systematically different behaviour if skipped (as opposed to mappings
that just make stuff read-only/writable that otherwise arent').

(Let's also update a test that intended to test for this behaviour with
a more specific configuration that still triggers the behaviour with
this change in place)

Fixes: #13955
(For testing purposes unshare() can easily be blocked with
systemd-nspawn --system-call-filter=~unshare.)

4 years agoerrno-util: add ERRNO_IS_PRIVILEGE() helper
Lennart Poettering [Wed, 20 Nov 2019 11:22:40 +0000 (12:22 +0100)] 
errno-util: add ERRNO_IS_PRIVILEGE() helper

4 years agoid128: fix initializer element is not constant
Anita Zhang [Wed, 20 Nov 2019 05:50:51 +0000 (21:50 -0800)] 
id128: fix initializer element is not constant

Was getting:

  ../src/id128/id128.c:15:1: error: initializer element is not constant
   static sd_id128_t arg_app = SD_ID128_NULL;
    ^
when building on CentOS 7.

Other parts of the code initialize `static sd_id128_t` to {} and this
was the original setting before a19fdd66c22 anyways.

4 years agotest: make sure our tests get exclusive TTY access
Lennart Poettering [Tue, 19 Nov 2019 17:54:47 +0000 (18:54 +0100)] 
test: make sure our tests get exclusive TTY access

This sould make our test suite a bit more robust if it is slow running.
A few of our test services use StandardOutput=tty or StandardError=tty
in the tests in order to connect test services to the container console.
This gets into conflict with the container getty which wants exclusive
access to the console. Since the container getty is started with
Type=idle it typically gets started after a timeout only if the TTY is
already used, which hence introduces a race: if the test finishes
earlier all is good, if not, then the test gets kicked off the TTY which
then causes bash to abort since it cannot write any error messages
anymore.

Let's fix this hence: all tests that connect to the tty are now
synchronized to getty-pre.target, so they finish before any getty is
started.

4 years agoMerge pull request #14085 from poettering/ask-password-api
Lennart Poettering [Tue, 19 Nov 2019 23:54:28 +0000 (00:54 +0100)] 
Merge pull request #14085 from poettering/ask-password-api

make sure asking for a pw works in a container too if keyctl() and friends are blocked

4 years agopam_systemd: prolong method call timeout when allocating session
Lennart Poettering [Mon, 19 Aug 2019 13:15:13 +0000 (15:15 +0200)] 
pam_systemd: prolong method call timeout when allocating session

Starting a session might involve starting the user@.service instance,
hence let's make the bus call timeout substantially longer.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83828
4 years agoMerge pull request #14078 from poettering/cryptsetup-fixlets
Zbigniew Jędrzejewski-Szmek [Tue, 19 Nov 2019 19:46:53 +0000 (20:46 +0100)] 
Merge pull request #14078 from poettering/cryptsetup-fixlets

trivial cryptsetup fixlets (mostly: use more STR_IN_SET())

4 years agoMerge pull request #14079 from poettering/pam-systemd-fixlets
Zbigniew Jędrzejewski-Szmek [Tue, 19 Nov 2019 19:45:15 +0000 (20:45 +0100)] 
Merge pull request #14079 from poettering/pam-systemd-fixlets

trivial pam_systemd fixlets

4 years agoudev: do not propagate error in executing PROGRAM and IMPORT{program}
Yu Watanabe [Mon, 18 Nov 2019 11:56:33 +0000 (20:56 +0900)] 
udev: do not propagate error in executing PROGRAM and IMPORT{program}

Also, this adds more logs.

Fixes #14027.

4 years agoask-password: skip kernel keyring logic if we see EPERM 14085/head
Lennart Poettering [Tue, 19 Nov 2019 17:47:31 +0000 (18:47 +0100)] 
ask-password: skip kernel keyring logic if we see EPERM

Let's improve compat with container managers that block the keyring
logic and return EPERM for them.

4 years agoerrno: add new ERRNO_IS_NOT_SUPPORTED() helper
Lennart Poettering [Mon, 15 Jul 2019 11:32:03 +0000 (13:32 +0200)] 
errno: add new ERRNO_IS_NOT_SUPPORTED() helper

4 years agotest-copy: test that xattrs are properly copied 14081/head
Lennart Poettering [Tue, 19 Nov 2019 14:16:46 +0000 (15:16 +0100)] 
test-copy: test that xattrs are properly copied

4 years agocopy: port over to flistxattr_malloc() and fgetxattr_malloc()
Lennart Poettering [Tue, 19 Nov 2019 11:29:19 +0000 (12:29 +0100)] 
copy: port over to flistxattr_malloc() and fgetxattr_malloc()

4 years agoxattr-util: add flistxattr_malloc() that returns a NULSTR
Lennart Poettering [Thu, 14 Nov 2019 13:51:04 +0000 (14:51 +0100)] 
xattr-util: add flistxattr_malloc() that returns a NULSTR

4 years agoxattr-util: modernize getxattr_malloc() a bit
Lennart Poettering [Thu, 14 Nov 2019 13:50:22 +0000 (14:50 +0100)] 
xattr-util: modernize getxattr_malloc() a bit

Let's use automatic cleanup/TAKE_PTR where appropriate

4 years agoupdate TODO
Lennart Poettering [Tue, 19 Nov 2019 14:42:55 +0000 (15:42 +0100)] 
update TODO

4 years agoMerge pull request #14080 from poettering/table-uid-pid
Zbigniew Jędrzejewski-Szmek [Tue, 19 Nov 2019 14:35:25 +0000 (15:35 +0100)] 
Merge pull request #14080 from poettering/table-uid-pid

format-table: introduce TABLE_UID/TABLE_GID to match TABLE_PID and use it

4 years agocryptsetup: use STR_IN_SET() where appropriate 14078/head
Lennart Poettering [Wed, 21 Aug 2019 08:45:42 +0000 (10:45 +0200)] 
cryptsetup: use STR_IN_SET() where appropriate

Note that this slightly changes behaviour: "none" is only allowed as
option, if it's the only option specified, but not in combination with
other options. I think this makes more sense, since it's the choice when
no options shall be specified.

4 years agocryptsetup: minor coding style clean-ups
Lennart Poettering [Wed, 21 Aug 2019 08:40:04 +0000 (10:40 +0200)] 
cryptsetup: minor coding style clean-ups

4 years agopam_systemd: add one more assert 14079/head
Lennart Poettering [Tue, 13 Aug 2019 12:14:42 +0000 (14:14 +0200)] 
pam_systemd: add one more assert

4 years agopam_systemd: don't use PAM_SYSTEM_ERR for something that isn't precisely a system...
Lennart Poettering [Tue, 13 Aug 2019 12:14:47 +0000 (14:14 +0200)] 
pam_systemd: don't use PAM_SYSTEM_ERR for something that isn't precisely a system error

It's not really clear which PAM errors to use for which conditions, but
something called PAM_SYSTEM_ERR should probably not be used when the
error is not the result of some system call failure.

4 years agopam-systemd: voidify pam_get_item() calls
Lennart Poettering [Mon, 12 Aug 2019 14:39:55 +0000 (16:39 +0200)] 
pam-systemd: voidify pam_get_item() calls

4 years agopam-systemd: remove duplicate error logging
Lennart Poettering [Mon, 12 Aug 2019 14:39:40 +0000 (16:39 +0200)] 
pam-systemd: remove duplicate error logging

4 years agologin: port tables over to use TABLE_UID/TABLE_PID 14080/head
Lennart Poettering [Wed, 7 Aug 2019 12:50:01 +0000 (14:50 +0200)] 
login: port tables over to use TABLE_UID/TABLE_PID