Zbigniew Jędrzejewski-Szmek [Thu, 5 Dec 2019 09:22:01 +0000 (10:22 +0100)]
Merge pull request #14209 from poettering/sd-bus-sensitive
sd-bus bits from homed PR
Zbigniew Jędrzejewski-Szmek [Thu, 5 Dec 2019 09:17:10 +0000 (10:17 +0100)]
Merge pull request #14221 from poettering/homed-preparatory-resizefs
preparatory fs resizing support split out of homed PR
Yu Watanabe [Thu, 5 Dec 2019 07:10:29 +0000 (16:10 +0900)]
Merge pull request #14229 from yuwata/nspawn-network-interface-14223
nspawn: do not fail if udev is not running
Anita Zhang [Thu, 5 Dec 2019 00:14:11 +0000 (16:14 -0800)]
Merge pull request #14173 from ssahani/tc-sfq
network: tc: introduce sfq and tbf
Anita Zhang [Thu, 5 Dec 2019 00:07:41 +0000 (16:07 -0800)]
Merge pull request #14219 from poettering/homed-preparatory-loop
preparatory /dev/loopN support split out of homed PR
Yu Watanabe [Wed, 4 Dec 2019 10:12:36 +0000 (19:12 +0900)]
network: if /sys is rw, then udev should be around
This switches detect_container() to path_is_read_only_rw("/sys"), as if
systemd-udevd.service is conditionalized with that way.
This also updates the log message.
Yu Watanabe [Mon, 2 Dec 2019 15:51:44 +0000 (00:51 +0900)]
nspawn: do not fail if udev is not running
If /sys is read only filesystem, e.g., nspawn is running in container,
then usually udev is not running. In such a case, let's assume that
the interface is already initialized. Also, this makes nspawn refuse
to use the network interface which is under renaming.
Fixes #14223.
Guilhem Lettron [Sat, 30 Nov 2019 02:51:40 +0000 (03:51 +0100)]
Implement SNI when using DNS-over-TLS
Some DNS providers need SNI to identify client.
This can be used by adding #name to a DNS.
Example:
[Resolve]
DNS=192.168.1.1#example.com
Lennart Poettering [Wed, 4 Dec 2019 13:12:24 +0000 (14:12 +0100)]
Merge pull request #14111 from keszybz/unknown-section-warning
Warn about unknown sections
Lennart Poettering [Tue, 20 Aug 2019 13:35:53 +0000 (15:35 +0200)]
sd-bus: don't include properties maked as "emit-invalidation" in InterfacesAdded signals
Properties marked this way really shouldn't be sent around willy-nilly,
that's what the flag is about, hence exclude it from InterfacesAdded
signals (and in fact anything that is a signal).
Lennart Poettering [Mon, 19 Aug 2019 18:28:34 +0000 (20:28 +0200)]
sd-bus: add new call sd_bus_message_sensitive() and SD_BUS_VTABLE_SENSITIVE
This allows marking messages that contain "sensitive" data with a flag.
If it's set then the messages are erased from memory when the message is
freed.
Similar, a flag may be set on vtable entries: incoming/outgoing message
matching the entry will then automatically be flagged this way.
This is supposed to be an easy method to mark messages containing
potentially sensitive data (such as passwords) for proper destruction.
(Note that this of course is only is as safe as the broker in between is
doing something similar. But let's at least not be the ones at fault
here.)
Zbigniew Jędrzejewski-Szmek [Wed, 4 Dec 2019 12:30:52 +0000 (13:30 +0100)]
Merge pull request #13953 from SpencerMichaels/systemd-boot-efistub-id-fix
boot: Fix default/oneshot selection for EFISTUB entries
Lennart Poettering [Wed, 4 Dec 2019 12:13:38 +0000 (13:13 +0100)]
Merge pull request #14218 from poettering/homed-preparatory-small-stuff
Assorted smaller stuff split out from homed PR
Lennart Poettering [Wed, 4 Dec 2019 12:13:18 +0000 (13:13 +0100)]
Merge pull request #13886 from poettering/sd-event-pidfd
add pidfd support to sd-event (but not yet PID 1)
Yu Watanabe [Tue, 3 Dec 2019 14:20:50 +0000 (23:20 +0900)]
test-network: add a test case for SFQ
Yu Watanabe [Tue, 3 Dec 2019 14:12:00 +0000 (23:12 +0900)]
network: SFQ cannot be configured with netem or TBF
Susant Sahani [Wed, 27 Nov 2019 11:42:21 +0000 (12:42 +0100)]
network: tc introduce sfq - Stochastic Fairness Queueing
Stochastic Fairness Queueing is a classless queueing discipline.
SFQ does not shape traffic but only schedules the transmission of packets, based on 'flows'.
The goal is to ensure fairness so that each flow is able to send data in turn,
thus preventing any single flow from drowning out the rest.
Yu Watanabe [Sun, 24 Nov 2019 12:23:48 +0000 (21:23 +0900)]
test-network: add test case for TBF
Yu Watanabe [Mon, 25 Nov 2019 14:15:08 +0000 (23:15 +0900)]
network: drop unnecessary headers
Yu Watanabe [Mon, 25 Nov 2019 14:13:54 +0000 (23:13 +0900)]
network: make network_emulator_fill_message() take NetworkEmulator
Yu Watanabe [Mon, 25 Nov 2019 14:07:58 +0000 (23:07 +0900)]
network: rename QDiscs to QDisc
Yu Watanabe [Sun, 24 Nov 2019 11:31:38 +0000 (20:31 +0900)]
network: ignore sections which have both NetworkEmulator and TokenBufferFilter settings
Susant Sahani [Sun, 17 Nov 2019 06:30:03 +0000 (07:30 +0100)]
networkd tc: introduce tbf
See https://linux.die.net/man/8/tc-tbf
Lennart Poettering [Thu, 27 Dec 2018 13:31:27 +0000 (14:31 +0100)]
shared: add new wrapper for online fs resizing ioctls
Lennart Poettering [Fri, 28 Dec 2018 18:01:53 +0000 (19:01 +0100)]
missing: add XFS magic
Lennart Poettering [Fri, 17 May 2019 08:17:06 +0000 (10:17 +0200)]
main-func: send main exit code to parent via sd_notify() on exit
So far we silently convert negative return values from run() as
EXIT_FAILURE, which is how UNIX expects it. In many cases it would be
very useful for the caller to retrieve the actual error number we exit
with. Let's generically return that via sd_notify()'s ERRNO= attribute.
This means callers can set $NOTIFY_SOCKET and get the actual error
number delivered at their doorstep just like that.
Lennart Poettering [Mon, 6 May 2019 20:38:43 +0000 (22:38 +0200)]
process-util: add new safe_fork() flag for connecting stdout to stderr
This adds a new safe_fork() flag. If set the child process' fd 1 becomes
fd 2 of the caller. This is useful for invoking tools (such as various
mkfs/fsck implementations) that output status messages to stdout, but
which we invoke and don't want to pollute stdout with their output.
Lennart Poettering [Thu, 4 Jul 2019 14:48:32 +0000 (16:48 +0200)]
tmpfile-util: modernize mkostemp_safe() a bit
Lennart Poettering [Tue, 23 Apr 2019 13:23:48 +0000 (15:23 +0200)]
tmpfile-util: if no path is passed to fopen_temporary() make one up
Let's beef up functionality a bit, and modernize the whole function.
Lennart Poettering [Wed, 7 Aug 2019 10:34:46 +0000 (12:34 +0200)]
user-util: add uid_is_container() for checking whether UID is in container range
We have similar calls for the dynamic user and system range, let's add
this too here.
Lennart Poettering [Wed, 7 Aug 2019 10:34:29 +0000 (12:34 +0200)]
user-util: export is_nologin_shell() so that we can use it elsewhere
Charles (Chas) Williams [Thu, 21 Nov 2019 15:26:24 +0000 (10:26 -0500)]
man: document journal rate limit burst multiplier
The actual burst limit is modified by the remaining disk space. This
isn't mentioned anywhere in the available documentation and might be a
source of surprise for an end user expecting certain behaviors.
Lennart Poettering [Thu, 11 Jul 2019 12:50:26 +0000 (14:50 +0200)]
string-util: readd string_erase()
This was dropped in
8e27167cc9b8beda2bf49789b15f0b0301b95d17, but is
actually useful for some usecases still.
Lennart Poettering [Thu, 8 Aug 2019 17:53:17 +0000 (19:53 +0200)]
memory-util: introduce erase_and_free() helper
Lennart Poettering [Mon, 15 Jul 2019 11:32:03 +0000 (13:32 +0200)]
errno-util: add new ERRNO_IS_DISK_SPACE() helper
Lennart Poettering [Mon, 19 Aug 2019 16:06:03 +0000 (18:06 +0200)]
ordered-set: add ordered_set_first() helper
Lennart Poettering [Thu, 14 Nov 2019 13:49:40 +0000 (14:49 +0100)]
parse-util: sometimes it is useful to check if a string is a valid integer, but not actually parse it
Leonid Bloch [Sun, 1 Dec 2019 23:05:02 +0000 (01:05 +0200)]
sd-boot: Add a 0.1 second delay before key-probing for showing menu
If there is no boot menu timeout, pressing a key during boot should get
the boot menu displayed. However, on some systems the keyboard is not
initialized right away, which causes the menu to be inaccessible if no
timeout is specified.
To resolve this, if the error is "not ready" after the initial attempt of
detection, wait for 0.1 second and retry. This solves the problem
described above on all the tested systems.
The reason for just a single retry, and not retrying while "not ready",
is that some firmwares continue to return the "not ready" error on
every probe attempt if no key is pressed.
Signed-off-by: Leonid Bloch <lb.workbox@gmail.com>
Lennart Poettering [Wed, 30 Oct 2019 19:26:50 +0000 (20:26 +0100)]
sd-event: refuse running default event loops in any other thread than the one they are default for
Lennart Poettering [Wed, 30 Oct 2019 18:00:12 +0000 (19:00 +0100)]
man: document the new sd-event pidfd magic
Lennart Poettering [Wed, 30 Oct 2019 17:59:44 +0000 (18:59 +0100)]
man: mention that SIGCHLD has to be blocked before using sd_event_add_child()
Lennart Poettering [Wed, 30 Oct 2019 17:56:03 +0000 (18:56 +0100)]
man: don't claim we'd unblock the specified signal in sd_event_add_signal()
We don't, the signal remains blocked. We use signalfd() to be able to
read the signal events without unblocking the signal.
While we are at it, mention that pthread_sigmask() is fine too.
Lennart Poettering [Wed, 30 Oct 2019 16:42:31 +0000 (17:42 +0100)]
test: add test for pidfd support in sd-event
Lennart Poettering [Wed, 30 Oct 2019 16:41:15 +0000 (17:41 +0100)]
sd-event: refuse sd_event_add_child() if SIGCHLD is not blocked
We already refuse sd_event_add_signal() if the specified signal is not
blocked, let's do this also for sd_event_add_child(), since we might
need signalfd() to implement this, and this means the signal needs to be
blocked.
Lennart Poettering [Wed, 30 Oct 2019 16:37:12 +0000 (17:37 +0100)]
sd-event: make use of new signal_is_blocked() helper
Lennart Poettering [Wed, 30 Oct 2019 16:37:00 +0000 (17:37 +0100)]
signal-util: add new helper signal_is_blocked()
Lennart Poettering [Wed, 30 Oct 2019 16:22:49 +0000 (17:22 +0100)]
sd-event: add pidfd support
This adds support for watching for process exits via Linux new pidfd
concept. This makes watching processes and killing them race-free if
properly used, fixing a long-standing UNIX misdesign.
This patch adds implicit and explicit pidfd support to sd-event: if a
process shall be watched and is specified by PID we will now internally
create a pidfd for it and use that, if available. Alternatively a new
constructor for child process event sources is added that takes pidfds
as input.
Besides mere watching of child processes via pidfd two additional
features are added:
→ sd_event_source_send_child_signal() allows sending a signal to the
process being watched in the safest way possible (wrapping
the new pidfd_send_signal() syscall).
→ sd_event_source_set_child_process_own() allows marking a process
watched for destruction as soon as the event source is freed. This is
currently implemented in userspace, but hopefully will become a kernel
feature eventually.
Altogether this means an sd_event_source object is now a safe and stable
concept for referencing processes in race-free way, with automatic
fallback to pre-pidfd kernels.
Note that this patch adds support for this only to sd-event, not to PID
1. That's because PID 1 needs to use waitid(P_ALL) for reaping any
process that might get reparented to it. This currently semantically
conflicts with pidfd use for watching processes since we P_ALL is
undirected and thus might reap process earlier than the pidfd notifies
process end, which is hard to handle. The kernel will likely gain a
concept for excluding specific pidfds from P_ALL watching, as soon as
that is around we can start making use of this in PID 1 too.
Lennart Poettering [Wed, 30 Oct 2019 15:35:48 +0000 (16:35 +0100)]
process-util: add helper pidfd_get_pid()
It returns the pid_t a pidfd refers to.
Lennart Poettering [Wed, 30 Oct 2019 15:29:42 +0000 (16:29 +0100)]
missing: add rt_sigqueueinfo() syscall definition
This is not a new system call at all (since kernel 2.2), however it's
not exposed in glibc (a wrapper is exposed however in sigqueue(), but it
substantially simplifies the system call). Since we want a nice fallback
for sending signals on non-pidfd systems for pidfd_send_signal() let's
wrap rt_sigqueueinfo() since it takes the same siginfo_t parameter.
Lennart Poettering [Fri, 25 Oct 2019 14:06:06 +0000 (16:06 +0200)]
missing: define new pidfd syscalls
Lennart Poettering [Wed, 30 Oct 2019 11:03:13 +0000 (12:03 +0100)]
sd-event: (void)ify some epoll_ctl() syscall invocations
Lennart Poettering [Wed, 30 Oct 2019 11:00:49 +0000 (12:00 +0100)]
sd-event: drop unnecessary local variable
Paul Davey [Tue, 26 Nov 2019 23:51:59 +0000 (12:51 +1300)]
udev: Ensure udev_event_spawn reads stdout
When running the program with udev_event_spawn it is possible to miss
output in stdout when the program exits causing the result to be empty
which can cause rules using the result to not function correctly.
This is due to the on_spawn_sigchld callback being processed while IO is
still pending and causing the event loop to exit.
To correct this the sigchld event source is made a lower priority than
the other event sources to ensure it is processed after IO. This
requires changing the IO event source to oneshot and re-enabling it when
valid data is read but not for EOF, this prevents the empty pipes
constantly generating IO events.
Lennart Poettering [Wed, 4 Dec 2019 09:30:58 +0000 (10:30 +0100)]
Merge pull request #14133 from keur/clear_ambient_inherited
Clear ambient inherited
Lennart Poettering [Wed, 4 Dec 2019 09:30:32 +0000 (10:30 +0100)]
Merge pull request #14177 from keszybz/use-initrd.target
Use initrd.target in the initramfs
Christian Göttsche [Wed, 27 Nov 2019 18:43:47 +0000 (19:43 +0100)]
core: reload SELinux label cache on daemon-reload
Reloading the SELinux label cache here enables a light-wight follow-up of a SELinux policy change, e.g. adding a label for a RuntimeDirectory.
Closes: #13363
Lennart Poettering [Wed, 4 Dec 2019 09:29:22 +0000 (10:29 +0100)]
Merge pull request #14189 from cgzones/selinux_tmpfiles
Selinux tmpfiles
Lennart Poettering [Tue, 26 Nov 2019 08:46:00 +0000 (09:46 +0100)]
pid1: add new kernel cmdline arg systemd.cpu_affinity=
Let's allow configuration of the CPU affinity via the kernel cmdline,
overriding CPUAffinity= in /etc/systemd/system.conf
Prompted by:
https://lists.freedesktop.org/archives/systemd-devel/2019-November/043754.html
Raphael [Fri, 29 Nov 2019 17:34:54 +0000 (18:34 +0100)]
Fix DPI for MX Master 2s bluetooth mouse
Mouse behaviour is unusably slow disregardless of mouse speed settings.
Jérémy Rosen [Fri, 29 Nov 2019 19:28:35 +0000 (20:28 +0100)]
Create parent directories when creating systemd-private subdirs
This is needed when systemd is compiled without systemd-tmpfiles
Zbigniew Jędrzejewski-Szmek [Wed, 4 Dec 2019 08:15:23 +0000 (09:15 +0100)]
Merge pull request #14211 from yuwata/support-nlmsgerr_attr_msg
Support NLMSGERR_ATTR_MSG
Yu Watanabe [Mon, 2 Dec 2019 15:29:44 +0000 (00:29 +0900)]
network: do not return error but return UINT64_MAX if speed meter is disabled
Fixes #14222.
lothrond [Wed, 4 Dec 2019 04:29:01 +0000 (23:29 -0500)]
Alienware M17xR3 ejectcd button fix
Topi Miettinen [Tue, 3 Dec 2019 18:36:37 +0000 (20:36 +0200)]
core: swap priority can be negative
Negative priorities are useful for swap targets which should be only used as
last resort.
xduugu [Tue, 3 Dec 2019 23:32:50 +0000 (23:32 +0000)]
hwdb: Set trackball property for Logitech MX Ergo (#14231)
Yu Watanabe [Mon, 2 Dec 2019 15:39:28 +0000 (00:39 +0900)]
networkctl: fix to show BSSID
This fixes an issue caused by a typo in
78404d22cca9cbbc8adb9dd7248da2f2725b1dbc.
Zbigniew Jędrzejewski-Szmek [Tue, 3 Dec 2019 11:54:52 +0000 (11:54 +0000)]
systemctl: enhance message about kexec missing kernel
Fixes #7730.
Zbigniew Jędrzejewski-Szmek [Mon, 2 Dec 2019 20:37:48 +0000 (21:37 +0100)]
TODO: remove obsolete entries
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.
Slava Kardakov [Mon, 2 Dec 2019 20:39:59 +0000 (23:39 +0300)]
Fixup typo in NEWS
Lennart Poettering [Mon, 11 Nov 2019 16:57:45 +0000 (17:57 +0100)]
valgrind: temporarily handle that valgrind still doesn't know LOOP_GET_STATUS64
Should be removed once valgrind learns it.
Lennart Poettering [Thu, 4 Jul 2019 18:12:13 +0000 (20:12 +0200)]
loop-util: if we fail to fully set up a loop device, detach it again
Lennart Poettering [Thu, 4 Jul 2019 18:11:52 +0000 (20:11 +0200)]
loop-util: fill in the loopback number, even a posteriori
Lennart Poettering [Tue, 21 May 2019 16:05:29 +0000 (18:05 +0200)]
loop-util: optionally also resize partitions
Lennart Poettering [Tue, 21 May 2019 16:04:04 +0000 (18:04 +0200)]
loop-util: add api for locking the block device with flock()
Lennart Poettering [Mon, 20 May 2019 14:15:22 +0000 (16:15 +0200)]
loop-util: allow refreshing offset
Lennart Poettering [Thu, 4 Jul 2019 15:57:29 +0000 (17:57 +0200)]
loop-util: allow creating loopback block devices with offset/length
Lennart Poettering [Mon, 31 Dec 2018 15:56:14 +0000 (16:56 +0100)]
loop-util: add API to refresh loopback device size and opening existing loopback block devices
Lennart Poettering [Sun, 23 Dec 2018 18:23:58 +0000 (19:23 +0100)]
loop-util: accept loopback flags when creating loopback device
This way callers can choose if they want partition scanning or not.
Lennart Poettering [Mon, 2 Dec 2019 08:58:31 +0000 (09:58 +0100)]
Merge pull request #14216 from jwrdegoede/hwdb-teclast-sensors
hwdb: sort Teclast sensors entries and add a new quirk for the Teclast X89
Hans de Goede [Sun, 1 Dec 2019 14:55:00 +0000 (15:55 +0100)]
hwdb: Add accel orientation quirk for Teclast X89 tablet
Add a quirk to fix the accelerometer orientation on the Teclast X89 tablet.
Hans de Goede [Sun, 1 Dec 2019 14:46:32 +0000 (15:46 +0100)]
hwdb: Sort 60-sensor.hwdb Teclast entries alphabetically
Sort 60-sensor.hwdb Teclast entries alphabetically (by model name),
and add a comment with the model name to the few entries which were
missing this.
Michael Biebl [Sat, 30 Nov 2019 18:05:53 +0000 (19:05 +0100)]
semaphore: switch branch to debian/master
Yu Watanabe [Sat, 30 Nov 2019 06:54:07 +0000 (15:54 +0900)]
network: include NLMSGERR_ATTR_MSG attribute in error message
Yu Watanabe [Sat, 30 Nov 2019 06:01:06 +0000 (15:01 +0900)]
sd-netlink: support NLMSGERR_ATTR_MSG
From v4.12 the kernel appends some attributes to netlink acks
containing a textual description of the error and other fields.
This makes sd-netlink parse the attributes.
Lennart Poettering [Fri, 29 Nov 2019 16:31:03 +0000 (17:31 +0100)]
update TODO
Zbigniew Jędrzejewski-Szmek [Fri, 29 Nov 2019 16:32:36 +0000 (17:32 +0100)]
Merge pull request #14201 from poettering/v244-final
V244 final
afg [Fri, 29 Nov 2019 09:08:05 +0000 (17:08 +0800)]
nspawn: allow Capability=all in systemd.nspawn [EXEC] section
Just like --capability=all is allowed in the systemd-nspawn
command line.
Lennart Poettering [Fri, 29 Nov 2019 13:35:54 +0000 (14:35 +0100)]
hwdb: run another 'hwdb-update'
Lennart Poettering [Fri, 29 Nov 2019 13:29:03 +0000 (14:29 +0100)]
NEWS: update for final 244
Lennart Poettering [Fri, 29 Nov 2019 11:57:22 +0000 (12:57 +0100)]
README: move logo up, like on brand.systemd.io README
Lennart Poettering [Fri, 29 Nov 2019 10:50:59 +0000 (11:50 +0100)]
README: use more appropriate logo format for README
Lennart Poettering [Fri, 29 Nov 2019 10:51:04 +0000 (11:51 +0100)]
update TODO
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2019 09:01:27 +0000 (10:01 +0100)]
man: document initrd.target
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.
Yu Watanabe [Thu, 28 Nov 2019 15:37:44 +0000 (00:37 +0900)]
network: fix double free()
Yu Watanabe [Thu, 28 Nov 2019 18:26:57 +0000 (03:26 +0900)]
man: use literal tag at one more place
Lennart Poettering [Wed, 27 Nov 2019 16:11:44 +0000 (17:11 +0100)]
man: document sd_event_source_set_floating()
Let's make sure we get back to 100% man page documentation coverage of
our sd-event APIs. We are bad enough at the others, let's get these ones
right at least.
Jan Tojnar [Thu, 28 Nov 2019 11:42:01 +0000 (12:42 +0100)]
man: use mkswap@ instead of makeswap@
That is what is linked from systemd.swap(5) and also what the systemd.generator produces.
Lennart Poettering [Mon, 25 Nov 2019 13:08:53 +0000 (14:08 +0100)]
journald: don't ask for the machine ID if we don't need it