Yu Watanabe [Fri, 20 Jan 2017 00:45:58 +0000 (09:45 +0900)]
core: minor error handling fix in mount_setup_new_unit()
The function mount_setup_new_unit() should return -ENOMEM
if at least one of `strdup` calls are failed.
Rike-Benjamin Schuppner [Fri, 20 Jan 2017 00:10:30 +0000 (01:10 +0100)]
man: fix flag in systemd-run (#5107)
Jakub Wilk [Thu, 19 Jan 2017 15:54:22 +0000 (16:54 +0100)]
man: fix typos (#5109)
Djalal Harouni [Wed, 18 Jan 2017 13:36:07 +0000 (14:36 +0100)]
Merge pull request #5098 from evverx/fix-nspawn-notifications
nspawn: change owner/group of /run/systemd/nspawn/notify to userns-root
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jan 2017 04:10:46 +0000 (23:10 -0500)]
Merge pull request #4991 from poettering/seccomp-fix
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jan 2017 03:38:55 +0000 (22:38 -0500)]
pid1: provide a more detailed error message when execution fails (#5074)
Fixes #5000.
Lennart Poettering [Tue, 27 Dec 2016 15:50:02 +0000 (16:50 +0100)]
seccomp: minor simplifications for is_seccomp_available()
Lennart Poettering [Tue, 27 Dec 2016 14:28:25 +0000 (15:28 +0100)]
seccomp: rework seccomp code, to improve compat with some archs
This substantially reworks the seccomp code, to ensure better
compatibility with some architectures, including i386.
So far we relied on libseccomp's internal handling of the multiple
syscall ABIs supported on Linux. This is problematic however, as it does
not define clear semantics if an ABI is not able to support specific
seccomp rules we install.
This rework hence changes a couple of things:
- We no longer use seccomp_rule_add(), but only
seccomp_rule_add_exact(), and fail the installation of a filter if the
architecture doesn't support it.
- We no longer rely on adding multiple syscall architectures to a single filter,
but instead install a separate filter for each syscall architecture
supported. This way, we can install a strict filter for x86-64, while
permitting a less strict filter for i386.
- All high-level filter additions are now moved from execute.c to
seccomp-util.c, so that we can test them independently of the service
execution logic.
- Tests have been added for all types of our seccomp filters.
- SystemCallFilters= and SystemCallArchitectures= are now implemented in
independent filters and installation logic, as they semantically are
very much independent of each other.
Fixes: #4575
AsciiWolf [Tue, 17 Jan 2017 11:09:38 +0000 (12:09 +0100)]
man: fix typo (#5093)
Evgeny Vereshchagin [Tue, 17 Jan 2017 01:37:05 +0000 (01:37 +0000)]
tests: check that we can write to /run/systemd/nspawn/notify
See https://github.com/systemd/systemd/issues/4944
Evgeny Vereshchagin [Tue, 17 Jan 2017 01:19:34 +0000 (01:19 +0000)]
nspawn: change owner/group of /run/systemd/nspawn/notify to userns-root
Fixes #4944
Franck Bui [Mon, 16 Jan 2017 20:19:13 +0000 (21:19 +0100)]
core: make sure to init mount params before calling mount_is_extrinsic() (#5087)
When a new entry appears in /proc/self/mountinfo, mount_setup_unit()
allocated a new mount unit for it and starts initializing it.
mount_setup_unit() is also used to update a mount unit when a change happens in
/proc/self/mountinfo, for example a mountpoint can be remounted with additional
mount options.
This patch introduces 2 separate functions to deal with those 2 cases instead
of mount_setup_unit() dealing with both of them. The common code is small and
doing the split makes the code easier to read and less error prone if extended
later.
It also makes sure to initialize in both functions the mount parameters of the
mount unit before calling mount_is_extrinsic() since this function relies on
them.
Fixes: #4902
Cédric Schieli [Mon, 16 Jan 2017 17:23:26 +0000 (18:23 +0100)]
ndisc: honor IPv6AcceptRA.UseDNS when parsing RA options (#5071)
RDNSS and DNSLL options received in RA are always used, possibly breaking the resolution of private domains hosted on a local DNS server. When setting UseDNS=no in a [IPv6AcceptRA] section of a .network file, both RDNSS and DNSLL options in received RA should be ignored.
Fixes: #5040
Björn [Mon, 16 Jan 2017 17:19:04 +0000 (18:19 +0100)]
hwdb: add axis range corrections for Lenovo X1 Carbon 4th gen. / X1 Yoga (#5089)
The parameters were calculated on my X1 Yoga using touchpad-edge-detector; As as the device name indicates, the Touchpad is exactly the same as the X1 Carbon 4th gen.
Martin Pitt [Mon, 16 Jan 2017 06:56:53 +0000 (07:56 +0100)]
Merge pull request #5085 from keszybz/variables
Fixes for gcc and coverity warnings
Earnestly [Mon, 16 Jan 2017 01:41:59 +0000 (01:41 +0000)]
hwdb: Include X220 for pointingstick sensitivity (#5083)
Without this the trackpoint is very difficult to manoeuvre until
manually correcting the sysfs serio1/sensitivity entry.
kilian-k [Sun, 15 Jan 2017 22:21:33 +0000 (23:21 +0100)]
hwdb: add Logitech TrackMan Wheel (#5084)
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 21:57:57 +0000 (16:57 -0500)]
nspawn: fix memleak
CID #1368262: fn is allocated with new, so it should be freed.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 18:42:53 +0000 (13:42 -0500)]
shared/install-printf: fix memleak
instance might be "", and that string would be leaked.
CID #1368264.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 18:38:43 +0000 (13:38 -0500)]
systemctl: fix alignment with units in not-found state
A fixed value (6 and later 5) was added back in
4deb3b93911, and
not updated when load_len was added later on.
Also the other 5 with 1 + 1 + 1 + 1 + 1 to make it easier to see
that this is about the column separators.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 18:27:37 +0000 (13:27 -0500)]
systemctl: uninitalized variable
CID #1368270.
Easily reproduced with COLUMNS=50 ./systemctl --no-pager.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 17:41:34 +0000 (12:41 -0500)]
process-util: rename char *r to ans and add comment
Add a comment about the return value and rename r to ans. r is
nowadays reserved for the integer return value, and char *r is confusing.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 16:55:46 +0000 (11:55 -0500)]
journalctl: fix memleak
This is harmless, it would only happen if --verify-key is used multiple times.
But let's fix it for correctness.
CID ##1368415.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 16:51:48 +0000 (11:51 -0500)]
cryptsetup: fix unitialized variable
CID #1368416.
Coverity web interface is back, yay!
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 03:00:48 +0000 (22:00 -0500)]
udev: fix variable assignment
gcc doesn't like &, even though &sbuf and buf are the same things afaiu.
Follow-up for
e20a917105b.
Lucas Werkmeister [Sun, 15 Jan 2017 04:03:00 +0000 (05:03 +0100)]
journalctl: expunge verification key from argv (#5081)
After parsing the --verify-key argument, overwrite it with null bytes.
This minimizes (but does not completely eliminate) the time frame within
which another process on the system can extract the verification key
from the journalctl command line.
Zbigniew Jędrzejewski-Szmek [Sun, 15 Jan 2017 00:48:04 +0000 (19:48 -0500)]
Merge pull request #4879 from poettering/systemd
Mark Stosberg [Wed, 21 Dec 2016 19:55:04 +0000 (14:55 -0500)]
man: provide a basic guide to the `systemctl status` output (#4950)
- Show example of all `systemctl status` output and documents what possible
"Loaded:", "Active" and "Enabled" values mean.
- Documents what different colors of the dot mean.
- Documents "gotcha" with load-on-demand behavior which will report units as
"loaded" even if they are only loaded to show their status.
(From @poettering: https://github.com/systemd/systemd/issues/5063#issuecomment-
272115024 )
Lennart Poettering [Thu, 12 Jan 2017 09:19:30 +0000 (10:19 +0100)]
Merge pull request #5069 from keszybz/fixlets
Small fixes and enhancements to docs and code
Harald Hoyer [Thu, 12 Jan 2017 09:19:07 +0000 (10:19 +0100)]
Merge pull request #5068 from keszybz/kernel-install-process-sub
kernel-install: avoid process substitution
Zbigniew Jędrzejewski-Szmek [Thu, 12 Jan 2017 09:16:20 +0000 (04:16 -0500)]
rpm triggers: do nothing if systemd is not running (#5065)
If we are running in a chroot/container/..., we would print a useless warning about
not being able to communicate with systemd. Trying to do daemon-reload is pointless
in those cases, so let's just skip all actions in that case.
The check uses /run/system/system, as recommended by sd_booted(3).
https://bugzilla.redhat.com/show_bug.cgi?id=1411299
Franck Bui [Thu, 12 Jan 2017 02:37:15 +0000 (03:37 +0100)]
systemctl: remove duplicate entries showed by list-dependencies (#5049)
When a unit is part of several dependency constraints of another
unit, list-dependencies repeats the name of the dependency for each
dep constraint the unit is encountered.
For example:
$ systemctl cat test-main.target
# /etc/systemd/system/test-main.target
[Unit]
Description=Main Target
$ systemctl cat test.target
[Unit]
Description=Sub target
PartOf=test-main.target
[Install]
WantedBy=test-main.target
$ systemctl enable test.target
Created symlink from /etc/systemd/system/test-main.target.wants/test.target to /etc/systemd/system/test.target.
$ systemctl show test-main.target | grep test.target
Wants=test.target
ConsistsOf=test.target
[...]
$ systemctl list-dependencies test-main.target
test-main.target
● ├─test.target
● └─test.target
With this patch applied, dependencies are shown only once.
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2017 21:40:04 +0000 (16:40 -0500)]
Merge pull request #4837 from ddstreet/master
Replace spaces in expanded fields in SYMLINK properties by default.
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2017 20:48:15 +0000 (15:48 -0500)]
man: link to sd-j-{remote,upload} from journalctl(1)
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2017 19:45:19 +0000 (14:45 -0500)]
shell-completion: redirect all errors from systemctl to /dev/null
Completion scripts should not generate errors, ever.
https://bugzilla.redhat.com/show_bug.cgi?id=1409649
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2017 19:09:47 +0000 (14:09 -0500)]
socket-util: drop _pure_ from a function with an output parameter
If it writes to memory, it's not pure, by definition.
Fixup for
882ac6e769c5c.
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2017 18:48:16 +0000 (13:48 -0500)]
core: add missing "=" in message
For consistency. Also drop "e.g." because it's somewhat redundant with the
ellipsis and the message is pretty long already.
Follow-up for
4d1fe20a585ca.
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2017 18:40:10 +0000 (13:40 -0500)]
networkd: reorder gperf fields
In
eb64b435ebb2a7cb1274d5 ActiveSlave/PrimarySlave were inserted in between
IPv6AcceptRA and IPv6AcceptRouterAdvertisements and the comment then didn't
make sense. It turns out that gperf does not understand C-style comments, and
that there's no comment syntax in the keywords section. The following was
generated:
{"/* legacy alias for the above */"},
{"Network.IPv6AcceptRA", config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)},
In practice this wouldn't lead to problems because this fake pattern would be
hard to match, but it seems better to remove the comments altogether.
Readers of the .gperf file will have to look for the repeated output field to
notice legacy options. To make this easier, let's always keep the legacy option
second.
Michal Schmidt [Fri, 16 Dec 2016 17:14:47 +0000 (18:14 +0100)]
kernel-install: avoid process substitution
bash implements process substitution using /dev/fd/N (this is documented
in man bash). We'd like kernel-install to work in chrooted RPM
scriptlets without /dev.
We can use here-strings instead. bash uses temporary files to implement
those.
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2017 20:23:00 +0000 (15:23 -0500)]
Merge pull request #5009 from ian-kelling/ian-mnt-namespace-doc
micah [Wed, 11 Jan 2017 20:07:35 +0000 (15:07 -0500)]
Document how restart actions work (#5052)
When a user is trying to understand what is going on with a restart action, it is useful to explicitly describe how the action is run. It may seem obvious, but it is helpful to be explicit so one knows there isn't a special ExecRestart= or similar option that they could be looking at.
sammynx [Wed, 11 Jan 2017 20:01:55 +0000 (21:01 +0100)]
hwdb: add correct metrics for Lenovo Thinkpad T430 (#5050)
Zbigniew Jędrzejewski-Szmek [Mon, 9 Jan 2017 18:51:06 +0000 (13:51 -0500)]
man: add more links to systemd-ask-password and systemd-tty-ask-password-agent
Loosely inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1411134.
nikolaof [Wed, 11 Jan 2017 13:35:20 +0000 (15:35 +0200)]
hwdb: update micmute YCODE on device node at DELL LATITUDE laptops for mic mute button. (#5012)
Lennart Poettering [Wed, 11 Jan 2017 09:53:59 +0000 (10:53 +0100)]
Merge pull request #5046 from stefanha/vsock
Add AF_VSOCK socket activation support
Robert Kreuzer [Wed, 11 Jan 2017 09:50:58 +0000 (10:50 +0100)]
journal-gatewayd: align closing braces (#5060)
Lubomir Rintel [Wed, 11 Jan 2017 09:50:25 +0000 (10:50 +0100)]
sparse: avoid clash with __bitwise and __force from 4.10 linux/types.h (#5061)
It also used __bitwise and __force. It seems easier to rename
our versions since they are local to this one single header.
Also, undefine them afteerwards, so that we don't pollute the
preprocessor macro namespace.
Stefan Hajnoczi [Wed, 21 Dec 2016 17:02:08 +0000 (17:02 +0000)]
core: add AF_VSOCK support to socket units
Accept AF_VSOCK listen addresses in socket unit files. Both guest and
host can now take advantage of socket activation.
The QEMU guest agent has recently been modified to support socket
activation and can run over AF_VSOCK with this patch.
Stefan Hajnoczi [Tue, 20 Dec 2016 14:24:27 +0000 (14:24 +0000)]
socket-util: add AF_VSOCK address family
The AF_VSOCK address family facilitates guest<->host communication on
VMware and KVM (virtio-vsock). Adding support to systemd allows guest
agents to be launched through .socket unit files. Today guest agents
are stand-alone daemons running inside guests that do not take advantage
of systemd socket activation.
Stefan Hajnoczi [Tue, 20 Dec 2016 14:10:54 +0000 (14:10 +0000)]
socket-util: introduce port argument in sockaddr_port()
sockaddr_port() either returns a >= 0 port number or a negative errno.
This works for AF_INET and AF_INET6 because port ranges are only 16-bit.
In AF_VSOCK ports are 32-bit so an int cannot represent all port number
and negative errnos. Separate the port and the return code.
Stefan Hajnoczi [Tue, 10 Jan 2017 13:35:18 +0000 (13:35 +0000)]
missing.h: add AF_VSOCK bits
Ubuntu 14.04 (Trusty) kernel header packages ship without
<linux/vm_sockets.h>. Only struct sockaddr_vm and VMADDR_CID_ANY will
be needed by systemd and they are simple enough to go in missing.h.
CentOS 7 <sys/socket.h> does not define AF_VSOCK. Define it so the code
can compile although actual socket(2) calls may fail at runtime if the
address family isn't available.
Franck Bui [Tue, 10 Jan 2017 08:11:34 +0000 (09:11 +0100)]
core: make sure to not call device_is_bound_by_mounts() when dev is null (#5033)
device_setup_unit() might be called (when an event happened in
/proc/self/mountinfo for example) with a null 'dev' parameter. This
indicates that the device has been unplugged but the corresponding
mountpoint is still visible in /proc/self/mountinfo.
This patch makes sure we don't call device_is_bound_by_mounts() in
this case.
Fixes: #5025
Susant Sahani [Tue, 10 Jan 2017 07:58:04 +0000 (13:28 +0530)]
networkd: RouteMetric for IPv6 Stateless Autoconfiguration (#5045)
Add support to set route metric for IPv6
Fixes: #5002
(GalaxyMaster) [Tue, 10 Jan 2017 07:55:50 +0000 (18:55 +1100)]
socket-proxyd: fix --connections-max help message and docs (#5044)
Peter Hutterer [Tue, 10 Jan 2017 07:41:50 +0000 (17:41 +1000)]
hwdb: add hwdb override for Asus S550CB (#5053)
Widen the match for the current X550CC rule, they probably all have the same
touchpad.
https://bugs.freedesktop.org/show_bug.cgi?id=99306
Martin Pitt [Tue, 10 Jan 2017 07:41:14 +0000 (08:41 +0100)]
Merge pull request #5054 from evverx/fix-double-free-in-link
shared: fix double free in link
Mike Gilbert [Tue, 10 Jan 2017 07:39:05 +0000 (02:39 -0500)]
build-sys: add check for gperf lookup function signature (#5055)
gperf-3.1 generates lookup functions that take a size_t length
parameter instead of unsigned int. Test for this at configure time.
Fixes: https://github.com/systemd/systemd/issues/5039
Peter Hutterer [Tue, 10 Jan 2017 07:36:46 +0000 (17:36 +1000)]
udev: add ID_INPUT_SWITCH for devices with switch capability (#5057)
Evgeny Vereshchagin [Mon, 9 Jan 2017 22:45:41 +0000 (22:45 +0000)]
shared: check strdup != NULL
This is a follow-up for
dc7dd61de610e9330
Evgeny Vereshchagin [Mon, 9 Jan 2017 04:46:11 +0000 (04:46 +0000)]
shared: fix double free in link
Fixes:
```
touch hola.service
systemctl link $(pwd)/hola.service $(pwd)/hola.service
```
```
==1==ERROR: AddressSanitizer: attempting double-free on 0x60300002c560 in thread T0 (systemd):
#0 0x7fc8c961cb00 in free (/lib64/libasan.so.3+0xc6b00)
#1 0x7fc8c90ebd3b in strv_clear src/basic/strv.c:83
#2 0x7fc8c90ebdb6 in strv_free src/basic/strv.c:89
#3 0x55637c758c77 in strv_freep src/basic/strv.h:37
#4 0x55637c763ba9 in method_enable_unit_files_generic src/core/dbus-manager.c:1960
#5 0x55637c763d16 in method_link_unit_files src/core/dbus-manager.c:2001
#6 0x7fc8c92537ec in method_callbacks_run src/libsystemd/sd-bus/bus-objects.c:418
#7 0x7fc8c9258830 in object_find_and_run src/libsystemd/sd-bus/bus-objects.c:1255
#8 0x7fc8c92594d7 in bus_process_object src/libsystemd/sd-bus/bus-objects.c:1371
#9 0x7fc8c91e7553 in process_message src/libsystemd/sd-bus/sd-bus.c:2563
#10 0x7fc8c91e78ce in process_running src/libsystemd/sd-bus/sd-bus.c:2605
#11 0x7fc8c91e8f61 in bus_process_internal src/libsystemd/sd-bus/sd-bus.c:2837
#12 0x7fc8c91e90d2 in sd_bus_process src/libsystemd/sd-bus/sd-bus.c:2856
#13 0x7fc8c91ea8f9 in io_callback src/libsystemd/sd-bus/sd-bus.c:3126
#14 0x7fc8c928333b in source_dispatch src/libsystemd/sd-event/sd-event.c:2268
#15 0x7fc8c9285cf7 in sd_event_dispatch src/libsystemd/sd-event/sd-event.c:2627
#16 0x7fc8c92865fa in sd_event_run src/libsystemd/sd-event/sd-event.c:2686
#17 0x55637c6b5257 in manager_loop src/core/manager.c:2274
#18 0x55637c6a2194 in main src/core/main.c:1920
#19 0x7fc8c7ac7400 in __libc_start_main (/lib64/libc.so.6+0x20400)
#20 0x55637c697339 in _start (/usr/lib/systemd/systemd+0xcd339)
0x60300002c560 is located 0 bytes inside of 19-byte region [0x60300002c560,0x60300002c573)
freed by thread T0 (systemd) here:
#0 0x7fc8c961cb00 in free (/lib64/libasan.so.3+0xc6b00)
#1 0x7fc8c90ee320 in strv_remove src/basic/strv.c:630
#2 0x7fc8c90ee190 in strv_uniq src/basic/strv.c:602
#3 0x7fc8c9180533 in unit_file_link src/shared/install.c:1996
#4 0x55637c763b25 in method_enable_unit_files_generic src/core/dbus-manager.c:1985
#5 0x55637c763d16 in method_link_unit_files src/core/dbus-manager.c:2001
#6 0x7fc8c92537ec in method_callbacks_run src/libsystemd/sd-bus/bus-objects.c:418
#7 0x7fc8c9258830 in object_find_and_run src/libsystemd/sd-bus/bus-objects.c:1255
#8 0x7fc8c92594d7 in bus_process_object src/libsystemd/sd-bus/bus-objects.c:1371
#9 0x7fc8c91e7553 in process_message src/libsystemd/sd-bus/sd-bus.c:2563
#10 0x7fc8c91e78ce in process_running src/libsystemd/sd-bus/sd-bus.c:2605
#11 0x7fc8c91e8f61 in bus_process_internal src/libsystemd/sd-bus/sd-bus.c:2837
#12 0x7fc8c91e90d2 in sd_bus_process src/libsystemd/sd-bus/sd-bus.c:2856
#13 0x7fc8c91ea8f9 in io_callback src/libsystemd/sd-bus/sd-bus.c:3126
#14 0x7fc8c928333b in source_dispatch src/libsystemd/sd-event/sd-event.c:2268
#15 0x7fc8c9285cf7 in sd_event_dispatch src/libsystemd/sd-event/sd-event.c:2627
#16 0x7fc8c92865fa in sd_event_run src/libsystemd/sd-event/sd-event.c:2686
#17 0x55637c6b5257 in manager_loop src/core/manager.c:2274
#18 0x55637c6a2194 in main src/core/main.c:1920
#19 0x7fc8c7ac7400 in __libc_start_main (/lib64/libc.so.6+0x20400)
previously allocated by thread T0 (systemd) here:
#0 0x7fc8c95b0160 in strdup (/lib64/libasan.so.3+0x5a160)
#1 0x7fc8c90edf32 in strv_extend src/basic/strv.c:552
#2 0x7fc8c923ae41 in bus_message_read_strv_extend src/libsystemd/sd-bus/bus-message.c:5578
#3 0x7fc8c923b0de in sd_bus_message_read_strv src/libsystemd/sd-bus/bus-message.c:5600
#4 0x55637c7639d1 in method_enable_unit_files_generic src/core/dbus-manager.c:1969
#5 0x55637c763d16 in method_link_unit_files src/core/dbus-manager.c:2001
#6 0x7fc8c92537ec in method_callbacks_run src/libsystemd/sd-bus/bus-objects.c:418
#7 0x7fc8c9258830 in object_find_and_run src/libsystemd/sd-bus/bus-objects.c:1255
#8 0x7fc8c92594d7 in bus_process_object src/libsystemd/sd-bus/bus-objects.c:1371
#9 0x7fc8c91e7553 in process_message src/libsystemd/sd-bus/sd-bus.c:2563
#10 0x7fc8c91e78ce in process_running src/libsystemd/sd-bus/sd-bus.c:2605
#11 0x7fc8c91e8f61 in bus_process_internal src/libsystemd/sd-bus/sd-bus.c:2837
#12 0x7fc8c91e90d2 in sd_bus_process src/libsystemd/sd-bus/sd-bus.c:2856
#13 0x7fc8c91ea8f9 in io_callback src/libsystemd/sd-bus/sd-bus.c:3126
#14 0x7fc8c928333b in source_dispatch src/libsystemd/sd-event/sd-event.c:2268
#15 0x7fc8c9285cf7 in sd_event_dispatch src/libsystemd/sd-event/sd-event.c:2627
#16 0x7fc8c92865fa in sd_event_run src/libsystemd/sd-event/sd-event.c:2686
#17 0x55637c6b5257 in manager_loop src/core/manager.c:2274
#18 0x55637c6a2194 in main src/core/main.c:1920
#19 0x7fc8c7ac7400 in __libc_start_main (/lib64/libc.so.6+0x20400)
SUMMARY: AddressSanitizer: double-free (/lib64/libasan.so.3+0xc6b00) in free
==1==ABORTING
```
Closes #5015
Peter Hutterer [Fri, 6 Jan 2017 09:29:17 +0000 (19:29 +1000)]
hwdb: add axis range overrides for Lenovo B590 (#5031)
https://bugs.freedesktop.org/show_bug.cgi?id=96315
Michal Sekletar [Fri, 6 Jan 2017 09:27:35 +0000 (10:27 +0100)]
tests: fix failure of test-execute if /dev/mem is not available (#5028)
/dev/mem isn't necessarily available. Recently, I've encountered arm64
systems that didn't provide raw memory access via /dev/mem. Instead,
let's use /dev/kmsg since we don't support systems w/o it anyway.
Peter Hutterer [Thu, 5 Jan 2017 09:32:14 +0000 (19:32 +1000)]
hwdb: add axis range corrections for Dell Latitude E6320 (#5022)
From https://bugs.freedesktop.org/show_bug.cgi?id=99239
Peter Hutterer [Thu, 5 Jan 2017 09:31:51 +0000 (19:31 +1000)]
hwdb: add MOUSE_WHEEL_TILT_VERTICAL/HORIZONTAL to the mouse db (#5023)
Plenty of single scroll-wheel mice have the ability to tilt the wheel to
generate horizontal wheel events. They use the same evdev axis as a real
horizontal wheel (REL_HWHEEL) and are indistinguishable to userspace from the
real thing. libinput promises physical degrees for wheel events but that's not
accurate for those tilting wheels, hence mark them as tilting wheels so we can
treat them like the special snowflakes they think they are.
Peter Hutterer [Wed, 4 Jan 2017 03:41:13 +0000 (13:41 +1000)]
Merge pull request #5001 from tsmock/g502
hwdb/70-mouse.hwdb: Add Logitech Wired Mouse (G502)
Dan Streetman [Tue, 3 Jan 2017 19:39:50 +0000 (14:39 -0500)]
udev-rules: perform whitespace replacement for symlink subst values
If the string_escape option is either unset or 'replace' (i.e. if it is
not 'none'), then enable whitespace replacement in SYMLINK variable
substitution values, as added in the last patch.
This will keep any whitespace that is directly contained in a SYMLINK
value, but will replace any whitespace that is added to the SYMLINK
value as a result of variable substitution (except $result/%c).
This fixes bug 4833.
Dan Streetman [Tue, 3 Jan 2017 19:37:59 +0000 (14:37 -0500)]
udev-event: add replace_whitespace param to udev_event_apply_format
If replace_whitespace is true, each substitution value has all its
whitespace removed/replaced by util_replace_whitespace (except the
SUBST_RESULT substitution - $result{} or %c{} - which handles spaces
itself as field separators). All existing callers are updated to
pass false, so no functional change is made by this patch.
This is needed so the SYMLINK assignment can replace any spaces
introduced through variable substitution, becuase the SYMLINK value is
a space-separated list of symlinks to create. Any variables that
contain spaces will thus unexpectedly change the symlink value from
a single symlink to multiple incorrectly-named symlinks.
This is used in the next patch, which enables the whitespace
replacement for SYMLINK variable substitution.
Dan Streetman [Tue, 3 Jan 2017 19:31:45 +0000 (14:31 -0500)]
libudev-util: change util_replace_whitespace to return number of chars in dest
Instead of returning 0, which is unhelpful, return the number of chars
copied into the dest string. This allows callers that care about that
to easily use it, instead of having to calculate the strlen.
No current users of the function check the return value, so this does not
break any existing code; it is used in the following patch.
Jan Synacek [Tue, 3 Jan 2017 20:34:36 +0000 (21:34 +0100)]
shared: fix double free in unmask (#5005)
Easily reproducible:
1) systemctl mask foo
2) systemctl unmask foo foo
The problem here is that the *i that is put into todo[] is later freed
in strv_uniq(), which is not directly visible from this patch. Somewhere
further in the code, the string that *i pointed to is freed again. That
happens only when multiple services with the same name/path are specified.
Ian Kelling [Tue, 3 Jan 2017 20:32:31 +0000 (12:32 -0800)]
doc: MountFlags= don't reference container which may not exist (#5011)
Ian Kelling [Tue, 3 Jan 2017 20:31:20 +0000 (12:31 -0800)]
doc: correct "or" to "and" in MountFlags= description (#5010)
Thomas H. P. Andersen [Tue, 3 Jan 2017 20:02:39 +0000 (21:02 +0100)]
path-lookup: use correct cleanup function for strv (#5007)
Walter Garcia-Fontes [Tue, 3 Jan 2017 20:02:12 +0000 (21:02 +0100)]
l10n: update LINGUAS to add the Catalan language (#5008)
Added "ca" to LINGUAS
Daniele Medri [Tue, 3 Jan 2017 11:08:35 +0000 (12:08 +0100)]
Updates to systemd.it.catalog.in (#5006)
Ian Kelling [Tue, 3 Jan 2017 10:17:50 +0000 (02:17 -0800)]
man: document mount deletion between commands
Walter Garcia-Fontes [Mon, 2 Jan 2017 11:07:59 +0000 (12:07 +0100)]
Catalan translation (#5003)
Contributing the translation into Catalan of systemd
Taylor Smock [Sat, 31 Dec 2016 02:36:56 +0000 (19:36 -0700)]
hwdb/70-mouse.hwdb: Add Logitech Wired Mouse (G502)
Mike Gilbert [Fri, 30 Dec 2016 13:52:36 +0000 (08:52 -0500)]
NEWS: describe DBus policy move (#4999)
Text as provided by zbyszek in
52b2f6b3.
Lennart Poettering [Thu, 29 Dec 2016 11:09:54 +0000 (12:09 +0100)]
machinectl: make sure that inability to get OS version isn't consider fatal for machine list (#4972)
Fixes: #4918
Lennart Poettering [Thu, 29 Dec 2016 10:21:37 +0000 (11:21 +0100)]
core: fix sockaddr length calculation for sockaddr_pretty() (#4966)
Let's simply store the socket address length in the SocketPeer object so
that we can use it when invoking sockaddr_pretty():
This fixes the issue described in #4943, but avoids calling
getpeername() twice.
Martin Pitt [Thu, 29 Dec 2016 10:18:38 +0000 (11:18 +0100)]
Merge pull request #4994 from poettering/private-tmp-tmpfiles
automatically clean up PrivateTmp= left-overs in /var/tmp on next boot
Thomas H. P. Andersen [Thu, 29 Dec 2016 10:15:08 +0000 (11:15 +0100)]
machined: remove unused variable (#4993)
Lennart Poettering [Thu, 29 Dec 2016 10:14:49 +0000 (11:14 +0100)]
systemctl: permit "enable" and "add-wants" without any instances (#4992)
This permits "systemctl enable" and "systemctl add-wants" on template
units without any specifications of an instance name, neither specified
on the command line, nor specified in DefaultInstance= field of the
[install] section.
Fixes: #3473
Lennart Poettering [Thu, 29 Dec 2016 10:02:39 +0000 (11:02 +0100)]
nspawn: reword notice when /dev is pre-mounted and populated (#4971)
Fixes: #4676
Lennart Poettering [Thu, 29 Dec 2016 10:00:55 +0000 (11:00 +0100)]
tmpfiles: improve error message for chown()/chmod() failures (#4969)
Let's make the error message less confusing here.
Fixes: #4954
Lennart Poettering [Thu, 29 Dec 2016 09:55:27 +0000 (10:55 +0100)]
man: add brief documentation for the (sd-pam) processes created due to PAMName= (#4967)
A follow-up for #4942, adding a brief but more correct explanation of
the processes.
Martin Pitt [Thu, 29 Dec 2016 09:42:22 +0000 (10:42 +0100)]
Merge pull request #4989 from poettering/nss-einval
nss user/group name validation fixes
Lennart Poettering [Thu, 29 Dec 2016 09:39:30 +0000 (10:39 +0100)]
core: improve log message about missing Listen setting (#4988)
Fixes: #4987
Lennart Poettering [Thu, 29 Dec 2016 09:38:52 +0000 (10:38 +0100)]
units: fix condition for systemd-journal-catalog-update.service (#4990)
The service is supposed to regenerate the catalog index whenever /usr is
updated, but /var is not. Hence the ConditionNeedsUpdate= line should
actually reference /var, as that's where the index file is located.
Lennart Poettering [Tue, 27 Dec 2016 22:42:53 +0000 (23:42 +0100)]
tmpfiles: automatically remove old private tmp dirs after reboot
Let's automatically destory per-unit private temporary directories, as
they are created by PrivateTmp=yes on each boot, if we notice them to be
around, in case they are left-overs from the last boot.
Fixes: #4401
Lennart Poettering [Tue, 27 Dec 2016 22:25:24 +0000 (23:25 +0100)]
core: implicitly order units with PrivateTmp= after systemd-tmpfiles-setup.service
Preparation for fixing #4401.
Felipe Sateler [Tue, 27 Dec 2016 21:19:45 +0000 (18:19 -0300)]
Merge pull request #4975 from poettering/machinectl-shell-exit
man: document that "systemd-run -M" propagates exit codes, and "machi…
Lennart Poettering [Sat, 24 Dec 2016 00:08:15 +0000 (01:08 +0100)]
man: document that "systemd-run -M" propagates exit codes, and "machinectl shell" does not
This adds a brief explanation, suggesting the use of "systemd-run -M" to
acquire exit status/code information for the invoked process.
My original plan was to propagate the exit code/status in "machinectl
shell" too, but this would mean we'd have to actively watch the shell's
runtime status, and thus would need full, highly privileged and
continious access to the container's system manager, the way
"systemd-run" does it. This would be quite a departure from the
simplistic, low-priviliged OpenShell() bus call implementation of the
current code, that really just acquires a PTY device with a shell
connected.
Moreover it would blur the lines between the two commands even further,
which I think is not desirable. Hence, from now on:
"machinectl shell" is the full-session, interactive shell for human
users
"systemd-run -M …" is the low-level tool, that supports
on-interactive mode, and is more configurable and suitable for
streaming.
Fixes: #4215
Lennart Poettering [Tue, 27 Dec 2016 16:59:38 +0000 (17:59 +0100)]
nss: when we encounter an invalid user/group name or UID/GID, don't return EINVAL
It's not our business to validate invalid user/group names or UID/GID.
Ideally, libc would filter these out, but they don't, hence we have to
filter, but let's not propagate this as error, but simply as "not found"
to the caller.
User name rules are pretty vaguely defined, and the rules defined by
POSIX clash with reality quite heavily (for example, utmp doesn't offer
enough room for user name length, and /usr/bin/chown permits separating
user/group names by a single dot, even though POSIX allows dots being
used in user/group names themselves.) We enforce stricter rules than
POSIX for good reason, and hence in doing so we should not categorically
return EINVAL on stuff we don't consider valid, but other components
might.
Fixes: #4983
Lennart Poettering [Tue, 27 Dec 2016 16:59:21 +0000 (17:59 +0100)]
util-lib: add a comment explaining the user name rules we enforce
Lennart Poettering [Tue, 27 Dec 2016 13:28:19 +0000 (14:28 +0100)]
seccomp: move bdflush() system call to @obsolete filter group
The system call is obsolete after all.
Lennart Poettering [Tue, 27 Dec 2016 13:27:39 +0000 (14:27 +0100)]
seccomp: add proper help string for @resources seccomp filter set
Lennart Poettering [Tue, 27 Dec 2016 13:26:55 +0000 (14:26 +0100)]
seccomp: add two new filter sets: @reboot and @swap
These groupe reboot()/kexec() and swapon()/swapoff() respectively
Martin Pitt [Mon, 26 Dec 2016 11:19:25 +0000 (12:19 +0100)]
tests: more precise negative check for dnsmasq log (#4982)
In test_resolved_domain_restricted_dns(), add dot domain separator to
negative .lab/.company tests, so that we don't catch these as part of
the host name (like "lxc-labjfr").
Caught in PR #4962
Evgeny Vereshchagin [Sun, 25 Dec 2016 11:17:22 +0000 (14:17 +0300)]
test-selinux: place %m after %[sf] (#4977)
"%d (%m) %s\n" crashes asan: https://github.com/google/sanitizers/issues/759
So, let's place %m after %s
Fixes:
```
$ ./libtool --mode=execute ./test-selinux
...
============ test_misc ==========
ASAN:DEADLYSIGNAL
=================================================================
==2981==ERROR: AddressSanitizer: SEGV on unknown address 0x000041b58ab3 (pc 0x7fd9c55a0eb2 bp 0x7fffdc2f9640 sp 0x7fffdc2f8d68 T0)
#0 0x7fd9c55a0eb1 (/lib64/libasan.so.3+0xdeeb1)
#1 0x7fd9c5550bbf (/lib64/libasan.so.3+0x8ebbf)
#2 0x7fd9c5552cdd in __interceptor_vsnprintf (/lib64/libasan.so.3+0x90cdd)
#3 0x7fd9c5063715 in log_internalv src/basic/log.c:680
#4 0x7fd9c506390a in log_internal src/basic/log.c:697
#5 0x561d398181a2 in test_misc src/test/test-selinux.c:81
#6 0x561d398185e8 in main src/test/test-selinux.c:117
#7 0x7fd9c493a400 in __libc_start_main (/lib64/libc.so.6+0x20400)
#8 0x561d39817859 in _start (/home/vagrant/systemd-asan/.libs/lt-test-selinux+0x1859)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib64/libasan.so.3+0xdeeb1)
==2981==ABORTING
```