]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 years agoshared: check strdup != NULL 5054/head
Evgeny Vereshchagin [Mon, 9 Jan 2017 22:45:41 +0000 (22:45 +0000)] 
shared: check strdup != NULL

This is a follow-up for dc7dd61de610e9330

7 years agoshared: fix double free in link
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

7 years agohwdb: add axis range overrides for Lenovo B590 (#5031)
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

7 years agotests: fix failure of test-execute if /dev/mem is not available (#5028)
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.

7 years agohwdb: add axis range corrections for Dell Latitude E6320 (#5022)
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

7 years agohwdb: add MOUSE_WHEEL_TILT_VERTICAL/HORIZONTAL to the mouse db (#5023)
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.

7 years agoMerge pull request #5001 from tsmock/g502
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)

7 years agoshared: fix double free in unmask (#5005)
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.

7 years agodoc: MountFlags= don't reference container which may not exist (#5011)
Ian Kelling [Tue, 3 Jan 2017 20:32:31 +0000 (12:32 -0800)] 
doc: MountFlags= don't reference container which may not exist (#5011)

7 years agodoc: correct "or" to "and" in MountFlags= description (#5010)
Ian Kelling [Tue, 3 Jan 2017 20:31:20 +0000 (12:31 -0800)] 
doc: correct "or" to "and" in MountFlags= description (#5010)

7 years agopath-lookup: use correct cleanup function for strv (#5007)
Thomas H. P. Andersen [Tue, 3 Jan 2017 20:02:39 +0000 (21:02 +0100)] 
path-lookup: use correct cleanup function for strv (#5007)

7 years agol10n: update LINGUAS to add the Catalan language (#5008)
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

7 years agoUpdates to systemd.it.catalog.in (#5006)
Daniele Medri [Tue, 3 Jan 2017 11:08:35 +0000 (12:08 +0100)] 
Updates to systemd.it.catalog.in (#5006)

7 years agoCatalan translation (#5003)
Walter Garcia-Fontes [Mon, 2 Jan 2017 11:07:59 +0000 (12:07 +0100)] 
Catalan translation (#5003)

Contributing the translation into Catalan of systemd

7 years agohwdb/70-mouse.hwdb: Add Logitech Wired Mouse (G502) 5001/head
Taylor Smock [Sat, 31 Dec 2016 02:36:56 +0000 (19:36 -0700)] 
hwdb/70-mouse.hwdb: Add Logitech Wired Mouse (G502)

7 years agoNEWS: describe DBus policy move (#4999)
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.

7 years agomachinectl: make sure that inability to get OS version isn't consider fatal for machi...
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
7 years agocore: fix sockaddr length calculation for sockaddr_pretty() (#4966)
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.

7 years agoMerge pull request #4994 from poettering/private-tmp-tmpfiles
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

7 years agomachined: remove unused variable (#4993)
Thomas H. P. Andersen [Thu, 29 Dec 2016 10:15:08 +0000 (11:15 +0100)] 
machined: remove unused variable (#4993)

7 years agosystemctl: permit "enable" and "add-wants" without any instances (#4992)
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
7 years agonspawn: reword notice when /dev is pre-mounted and populated (#4971)
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
7 years agotmpfiles: improve error message for chown()/chmod() failures (#4969)
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
7 years agoman: add brief documentation for the (sd-pam) processes created due to PAMName= ...
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.

7 years agoMerge pull request #4989 from poettering/nss-einval
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

7 years agocore: improve log message about missing Listen setting (#4988)
Lennart Poettering [Thu, 29 Dec 2016 09:39:30 +0000 (10:39 +0100)] 
core: improve log message about missing Listen setting (#4988)

Fixes: #4987
7 years agounits: fix condition for systemd-journal-catalog-update.service (#4990)
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.

7 years agotmpfiles: automatically remove old private tmp dirs after reboot 4994/head
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
7 years agocore: implicitly order units with PrivateTmp= after systemd-tmpfiles-setup.service
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.

7 years agoMerge pull request #4975 from poettering/machinectl-shell-exit
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…

7 years agoman: document that "systemd-run -M" propagates exit codes, and "machinectl shell... 4975/head
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
7 years agonss: when we encounter an invalid user/group name or UID/GID, don't return EINVAL 4989/head
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
7 years agoutil-lib: add a comment explaining the user name rules we enforce
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

7 years agotests: more precise negative check for dnsmasq log (#4982)
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

7 years agotest-selinux: place %m after %[sf] (#4977)
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
```

7 years agomachinectl: handle EOPNOTSUPP from print_addresses (#4979)
Graeme Lawes [Sun, 25 Dec 2016 11:14:41 +0000 (06:14 -0500)] 
machinectl: handle EOPNOTSUPP from print_addresses (#4979)

Print addresses returns EOPNOTSUPP, not ENOSYS, when trying to print
addresses for non-container machines.

7 years agoman: minor improvements (#4981)
Lucas Werkmeister [Sun, 25 Dec 2016 11:14:00 +0000 (12:14 +0100)] 
man: minor improvements (#4981)

7 years agoman: Align ExecStop= documentation with actual kill behavior (#4974)
Felipe Sateler [Sat, 24 Dec 2016 10:34:26 +0000 (07:34 -0300)] 
man: Align ExecStop= documentation with actual kill behavior (#4974)

The manpage claimed that ExecStop would be followed immediately by
SIGKILL, whereas the actual behavior is to go through KillMode= and
KillSignal= first.

Fixes #4490

7 years agojournalctl: add remote log dir to search path when --merge is passed (#4970)
Marcin Bachry [Fri, 23 Dec 2016 23:42:13 +0000 (00:42 +0100)] 
journalctl: add remote log dir to search path when --merge is passed (#4970)

The journalctl man page says: "-m, --merge Show entries interleaved from all
available journals, including remote ones.", but current version of journalctl
doesn't live up to this promise. This patch simply adds
"/var/log/journal/remote" to search path if --merge flag is used.

Should fix issue #3618

7 years agoUpdated Debian config for mkosi (#4949)
AsciiWolf [Fri, 23 Dec 2016 20:56:01 +0000 (21:56 +0100)] 
Updated Debian config for mkosi (#4949)

7 years agonetworkd: Add example to create MACVTAP and attach it to a link (#4946)
Susant Sahani [Fri, 23 Dec 2016 17:09:29 +0000 (22:39 +0530)] 
networkd: Add example to create MACVTAP and attach it to a link (#4946)

Fixes: #4914
7 years agozsh-completion: fix typo and rephrase option hints (#4963)
Doug Christman [Fri, 23 Dec 2016 13:37:28 +0000 (08:37 -0500)] 
zsh-completion: fix typo and rephrase option hints (#4963)

7 years agoMerge pull request #4953 from esoleyman/master
Peter Hutterer [Thu, 22 Dec 2016 22:15:20 +0000 (08:15 +1000)] 
Merge pull request #4953 from esoleyman/master

Add Microsoft Surface Mouse DPI

7 years agonetworkd: Rename ProxyARP to IPv4ProxyARP (#4947)
Susant Sahani [Thu, 22 Dec 2016 09:23:29 +0000 (14:53 +0530)] 
networkd: Rename ProxyARP to IPv4ProxyARP (#4947)

Rename the arp proxy option to IPv4ProxyARP= in order to clarify
its relationship to IPv4, and map to the various IPv6 options we have.

Fixes: #4768
7 years agohwdb: clarify where to find the modalias and vid/pid information (#4952)
Peter Hutterer [Thu, 22 Dec 2016 09:20:02 +0000 (19:20 +1000)] 
hwdb: clarify where to find the modalias and vid/pid information (#4952)

Fixes #4938

7 years agoresolved: correctly handle non-address RR types with /etc/hosts lookups (#4808)
Martin Pitt [Thu, 22 Dec 2016 06:58:02 +0000 (07:58 +0100)] 
resolved: correctly handle non-address RR types with /etc/hosts lookups (#4808)

Fix wrong condition test in manager_etc_hosts_lookup(), which caused it to
return an IPv4 answer when an IPv6 question was asked, and vice versa.
Also only return success if we actually found any A or AAAA record.

In systemd-resolved.service(8), point out that /etc/hosts mappings only
affect address-type lookups, not other types.

The test case currently disables DNSSEC in resolved, as there is a bug
where "-t MX" fails due to "DNSSEC validation failed" even after
"downgrading to non-DNSSEC mode". This should be dropped once that bug
gets fixed.

Fixes #4801

7 years agoAdd Microsoft Surface Mouse DPI 4953/head
esoleyman [Thu, 22 Dec 2016 03:49:32 +0000 (21:49 -0600)] 
Add Microsoft Surface Mouse DPI

7 years agonetworkd: bond support primary slave and active slave (#4873)
Susant Sahani [Wed, 21 Dec 2016 18:10:36 +0000 (23:40 +0530)] 
networkd: bond support primary slave and active slave (#4873)

active_slave:

Specifies the new active slave for modes that support it
(active-backup, balance-alb and balance-tlb).

primary slave:
systemd-networks currently lacks the capability to set the primary slave
in an
active-backup bonding. This is necessary if you prefer one interface
over the
other. A common example is a eth0-wlan0 bonding on a laptop where you'd
want to
switch to the wired connection whenever it's available.

Fixes: #2837
7 years agonetworkd: vxlan rename ARPProxy to ReduceARPProxy (#4891)
Susant Sahani [Wed, 21 Dec 2016 17:59:15 +0000 (23:29 +0530)] 
networkd: vxlan rename ARPProxy to ReduceARPProxy (#4891)

Fixes: #4768
7 years agonspawn: unref the notify event source (#4941)
Evgeny Vereshchagin [Wed, 21 Dec 2016 17:36:15 +0000 (20:36 +0300)] 
nspawn: unref the notify event source (#4941)

Fixes:
```
sudo ./libtool --mode=execute valgrind --leak-check=full ./systemd-nspawn -D ./CONT/ -b
...
==21224== 2,444 (656 direct, 1,788 indirect) bytes in 1 blocks are definitely lost in loss record 13 of 15
==21224==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==21224==    by 0x4F6F565: sd_event_new (sd-event.c:431)
==21224==    by 0x1210BE: run (nspawn.c:3351)
==21224==    by 0x123908: main (nspawn.c:3826)
==21224==
==21224== LEAK SUMMARY:
==21224==    definitely lost: 656 bytes in 1 blocks
==21224==    indirectly lost: 1,788 bytes in 11 blocks
==21224==      possibly lost: 0 bytes in 0 blocks
==21224==    still reachable: 8,344 bytes in 3 blocks
==21224==         suppressed: 0 bytes in 0 blocks
```
Closes #4934

7 years agoMerge pull request #4935 from dobyrch/master
Lennart Poettering [Wed, 21 Dec 2016 10:18:02 +0000 (11:18 +0100)] 
Merge pull request #4935 from dobyrch/master

calendarspec: improve overflow handling

7 years agocalendarspec: minor refactoring and style fix 4935/head
Douglas Christman [Tue, 20 Dec 2016 21:44:01 +0000 (16:44 -0500)] 
calendarspec: minor refactoring and style fix

7 years agocalendarspec: improve overflow handling
Douglas Christman [Tue, 20 Dec 2016 21:42:12 +0000 (16:42 -0500)] 
calendarspec: improve overflow handling

Check if the parsed seconds value fits in an integer *after*
multiplying by USEC_PER_SEC, otherwise a large value can trigger
modulo by zero during normalization.

7 years agondisc: ignore invalid SLAAC prefix lengths (#4923)
Jörg Thalheim [Tue, 20 Dec 2016 19:27:06 +0000 (20:27 +0100)] 
ndisc: ignore invalid SLAAC prefix lengths (#4923)

- linux does not accept prefixes for SLAAC unequal to 64 bits: http://lxr.free-electrons.com/source/net/ipv6/addrconf.c#L2741
- when networkd tries export such a route to the kernel it will get -EINVAL and
  set the whole device into a failed state.
- this patch will make networkd ignore such prefixes for SLAAC,
  but process other informations which may contain other prefixes.
- Note that rfc4862 does not forbid prefix length != 64 bit

7 years agoman/journalctl: mention systemd-journal-remote(8) (#4929)
Baruch Siach [Tue, 20 Dec 2016 13:59:26 +0000 (15:59 +0200)] 
man/journalctl: mention systemd-journal-remote(8) (#4929)

Make it easier to figure out how to use the journalctl export format.

7 years agoMerge pull request #4904 from dobyrch/calendar-range-step
Lennart Poettering [Tue, 20 Dec 2016 10:14:59 +0000 (11:14 +0100)] 
Merge pull request #4904 from dobyrch/calendar-range-step

calendarspec: allow repetition values with ranges

7 years agosystemctl: do not segfault when we cannot find template unit (#4915)
Zbigniew Jędrzejewski-Szmek [Tue, 20 Dec 2016 10:09:59 +0000 (05:09 -0500)] 
systemctl: do not segfault when we cannot find template unit (#4915)

Core was generated by `systemctl cat test@.target test@.service'.
Program terminated with signal SIGSEGV, Segmentation fault.
32              movdqu  (%rdi), %xmm0
(gdb) bt
-0  strrchr () at ../sysdeps/x86_64/strrchr.S:32
-1  0x00007f57fdf837fe in __GI___basename (filename=0x0) at basename.c:24
-2  0x000055b8a77d0d91 in unit_find_paths (bus=0x55b8a9242f90, unit_name=0x55b8a92428f0 "test@.service", lp=0x7ffdc9070400, fragment_path=0x7ffdc90703e0, dropin_paths=0x7ffdc90703e8) at src/systemctl/systemctl.c:2584
-3  0x000055b8a77dbae5 in cat (argc=3, argv=0x7ffdc9070678, userdata=0x0) at src/systemctl/systemctl.c:5324
-4  0x00007f57fe55fc6b in dispatch_verb (argc=5, argv=0x7ffdc9070668, verbs=0x55b8a77f1c60 <verbs>, userdata=0x0) at src/basic/verbs.c:92
-5  0x000055b8a77e477f in systemctl_main (argc=5, argv=0x7ffdc9070668) at src/systemctl/systemctl.c:8141
-6  0x000055b8a77e5572 in main (argc=5, argv=0x7ffdc9070668) at src/systemctl/systemctl.c:8412

The right behaviour is not easy in this case. Implement some "sensible" logic.

Fixes #4912.

7 years agobuild-sys: revert dbus >= 1.9.18 requirement (#4924)
Mike Gilbert [Tue, 20 Dec 2016 09:53:53 +0000 (04:53 -0500)] 
build-sys: revert dbus >= 1.9.18 requirement (#4924)

Instead, document the necessary step to utilize older dbus versions.

7 years agoMerge pull request #4926 from whot/hwdb-updates
Martin Pitt [Tue, 20 Dec 2016 07:18:06 +0000 (08:18 +0100)] 
Merge pull request #4926 from whot/hwdb-updates

Hwdb updates

7 years agohwdb: axis override for HP Spectre 4926/head
Peter Hutterer [Thu, 8 Dec 2016 00:25:49 +0000 (10:25 +1000)] 
hwdb: axis override for HP Spectre

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

7 years agohwdb: add axis overrides for Asus Vivobook E402SA
Peter Hutterer [Fri, 2 Dec 2016 03:44:09 +0000 (13:44 +1000)] 
hwdb: add axis overrides for Asus Vivobook E402SA

7 years agohwdb: add axis override for Lenovo W530
Peter Hutterer [Thu, 1 Dec 2016 00:38:08 +0000 (10:38 +1000)] 
hwdb: add axis override for Lenovo W530

https://bugs.freedesktop.org/show_bug.cgi?id=98844

7 years agohwdb: add axis override for Toshiba Tecra M11
Peter Hutterer [Wed, 30 Nov 2016 00:25:15 +0000 (10:25 +1000)] 
hwdb: add axis override for Toshiba Tecra M11

7 years agonetworkd-ndisc: handle missing mtu gracefully (#4913)
Jörg Thalheim [Mon, 19 Dec 2016 14:34:07 +0000 (15:34 +0100)] 
networkd-ndisc: handle missing mtu gracefully (#4913)

At least bird's implementation of router advertisement does not
set MTU option by default (instead it supplies an option to the user).
In this case just leave MTU as it is.

7 years agobuild-sys: treat format errors as fatal (#4910)
Zbigniew Jędrzejewski-Szmek [Sun, 18 Dec 2016 20:47:41 +0000 (15:47 -0500)] 
build-sys: treat format errors as fatal (#4910)

We currently don't expect any warnings about format strings, on any
architecture (#4612 removed the last few warnings). Turn those warnings into
errors in the future.

As requested by Martin Pitt.

gcc documentation says that -Wformat=2 includes -Wformat-security and
-Wformat-nonliteral so don't include them explicitly.

7 years agoMerge pull request #4892 from poettering/buspolicymove
Zbigniew Jędrzejewski-Szmek [Sun, 18 Dec 2016 16:43:18 +0000 (11:43 -0500)] 
Merge pull request #4892 from poettering/buspolicymove

build-sys: stop placing D-Bus policy below /etc

7 years agocore: downgrade "Time has been changed" to debug (#4906)
Zbigniew Jędrzejewski-Szmek [Sun, 18 Dec 2016 12:21:19 +0000 (07:21 -0500)] 
core: downgrade "Time has been changed" to debug (#4906)

That message is emitted by every systemd instance on every resume:
Dec 06 08:03:38 laptop systemd[1]: Time has been changed
Dec 06 08:03:38 laptop systemd[823]: Time has been changed
Dec 06 08:03:38 laptop systemd[916]: Time has been changed
Dec 07 08:00:32 laptop systemd[1]: Time has been changed
Dec 07 08:00:32 laptop systemd[823]: Time has been changed
Dec 07 08:00:32 laptop systemd[916]: Time has been changed
-- Reboot --
Dec 07 08:02:46 laptop systemd[836]: Time has been changed
Dec 07 08:02:46 laptop systemd[1]: Time has been changed
Dec 07 08:02:46 laptop systemd[926]: Time has been changed
Dec 07 19:48:12 laptop systemd[1]: Time has been changed
Dec 07 19:48:12 laptop systemd[836]: Time has been changed
Dec 07 19:48:12 laptop systemd[926]: Time has been changed
...

Fixes #4896.

7 years agoMerge pull request #4911 from keszybz/fixlets
Martin Pitt [Sun, 18 Dec 2016 12:20:12 +0000 (13:20 +0100)] 
Merge pull request #4911 from keszybz/fixlets

A few simple fixes / improvements

7 years agobasic/log: use IN_SET 4911/head
Zbigniew Jędrzejewski-Szmek [Sun, 18 Dec 2016 00:55:43 +0000 (19:55 -0500)] 
basic/log: use IN_SET

7 years agotest-compress: fix warning about LZ4_compress_limitedOutput
Zbigniew Jędrzejewski-Szmek [Sat, 17 Dec 2016 23:27:01 +0000 (18:27 -0500)] 
test-compress: fix warning about LZ4_compress_limitedOutput

691b90d465 fixed one spot, but missed the other one.

7 years agocore: remove spurious newline
Zbigniew Jędrzejewski-Szmek [Fri, 16 Dec 2016 21:08:51 +0000 (16:08 -0500)] 
core: remove spurious newline

7 years agodebug-generator: simplify handling of arg_default_unit
Zbigniew Jędrzejewski-Szmek [Fri, 16 Dec 2016 21:03:31 +0000 (16:03 -0500)] 
debug-generator: simplify handling of arg_default_unit

Also free the allocated memory before exiting.

7 years agoUse SPECIAL_DEFAULT_TARGET consistently
Zbigniew Jędrzejewski-Szmek [Fri, 16 Dec 2016 20:55:27 +0000 (15:55 -0500)] 
Use SPECIAL_DEFAULT_TARGET consistently

7 years agoModify mount_propagation_flags_from_string to return a normal int code
Zbigniew Jędrzejewski-Szmek [Sat, 3 Dec 2016 18:57:42 +0000 (13:57 -0500)] 
Modify mount_propagation_flags_from_string to return a normal int code

This means that callers can distiguish an error from flags==0,
and don't have to special-case the empty string.

7 years agoMerge pull request #4845 from poettering/various-smaller-fixes
Zbigniew Jędrzejewski-Szmek [Sat, 17 Dec 2016 18:36:00 +0000 (13:36 -0500)] 
Merge pull request #4845 from poettering/various-smaller-fixes

Various smaller fixes

7 years agocoredumpctl: let gdb handle the SIGINT signal (#4901)
Franck Bui [Sat, 17 Dec 2016 14:49:17 +0000 (15:49 +0100)] 
coredumpctl: let gdb handle the SIGINT signal (#4901)

Even if pressing Ctrl-c after spawning gdb with "coredumpctl gdb" is not really
useful, we should let gdb handle the signal entirely otherwise the user can be
suprised to see a different behavior when gdb is started by coredumpctl vs when
it's started directly.

Indeed in the former case, gdb exits due to coredumpctl being killed by the
signal.

So this patch makes coredumpctl ignore SIGINT as long as gdb is running.

7 years agoREADME: bump dbus dep 4892/head
Zbigniew Jędrzejewski-Szmek [Sat, 17 Dec 2016 14:26:40 +0000 (09:26 -0500)] 
README: bump dbus dep

We should also mention this in NEWS before release. Suggested text:
> DBus policy files are now installed into /usr rather than /etc. Make sure
> your system has dbus = 1.9.18 running before upgrading to this version, or
> override the install path with --with-dbuspolicydir=

7 years agocalendarspec: remove superfluous variables 4904/head
Douglas Christman [Fri, 16 Dec 2016 17:36:15 +0000 (12:36 -0500)] 
calendarspec: remove superfluous variables

7 years agocalendarspec: rename fields of CalendarComponent
Douglas Christman [Fri, 16 Dec 2016 20:49:54 +0000 (15:49 -0500)] 
calendarspec: rename fields of CalendarComponent

value/range_end -> start/stop

7 years agocalendarspec: allow repetition values with ranges
Douglas Christman [Fri, 16 Dec 2016 01:02:10 +0000 (20:02 -0500)] 
calendarspec: allow repetition values with ranges

"Every other hour from 9 until 5" can be written as
`9..17/2:00` instead of `9,11,13,15,17:00`

7 years agocore: make mount units from /proc/self/mountinfo possibly bind to a device (#4515)
Franck Bui [Fri, 16 Dec 2016 16:13:58 +0000 (17:13 +0100)] 
core: make mount units from /proc/self/mountinfo possibly bind to a device (#4515)

Since commit 9d06297, mount units from mountinfo are not bound to their devices
anymore (they use the "Requires" dependency instead).

This has the following drawback: if a media is mounted and the eject button is
pressed then the media is unconditionally ejected leaving some inconsistent
states.

Since udev is the component that is reacting (no matter if the device is used
or not) to the eject button, users expect that udev at least try to unmount the
media properly.

This patch introduces a new property "SYSTEMD_MOUNT_DEVICE_BOUND". When set on
a block device, all units that requires this device will see their "Requires"
dependency upgraded to a "BindTo" one. This is currently only used by cdrom
devices.

This patch also gives the possibility to the user to restore the previous
behavior that is bind a mount unit to a device. This is achieved by passing the
"x-systemd.device-bound" option to mount(8). Please note that currently this is
not working because libmount treats the x-* options has comments therefore
they're not available in utab for later application retrievals.

7 years agobootctl: fix typo (#4897)
Lucas Werkmeister [Fri, 16 Dec 2016 14:41:31 +0000 (15:41 +0100)] 
bootctl: fix typo (#4897)

7 years agocore: prevent invalid socket symlink target dereference (#4895)
Stefan Hajnoczi [Fri, 16 Dec 2016 10:20:27 +0000 (10:20 +0000)] 
core: prevent invalid socket symlink target dereference (#4895)

socket_find_symlink_target() returns a pointer to
p->address.sockaddr.un.sun_path when the first byte is non-zero without
checking that this is AF_UNIX socket.  Since sockaddr is a union this
byte could be non-zero for AF_INET sockets.

Existing callers happen to be safe but is an accident waiting to happen.
Use socket_address_get_path() since it checks for AF_UNIX.

7 years agorules: identify internal sound cards on platform bus (#4893)
Daniel Drake [Thu, 15 Dec 2016 22:11:11 +0000 (16:11 -0600)] 
rules: identify internal sound cards on platform bus (#4893)

We have a system which has the HDMI audio capability internally,
but pulseaudio is not giving it a very high priority compared
to e.g. USB sound cards.

The sound device appears on the platform bus and it is not
currently tagged with any form factor information.

It seems safe to assume that any sound card that is directly on the
platform bus is of internal form factor, but we must be careful because
udev rules will match all parent devices, not just the immediate parent,
and you will frequently encounter setups such as:

 Platform bus -> USB host controller -> USB sound card

In that case, SUBSYSTEMS==platform would match even though we're
clearly working with an external USB sound card.

In order to detect true platform devices here, we rely on the observation
that if any parent devices of the sound card are PCI, USB or firewire
devices, then this sound card cannot directly connected to the platform
bus. Otherwise, if we find a parent device on the platform bus, we assume
this is an internal sound card connected directly to the platform bus.

7 years agobuild-sys: stop placing D-Bus policy below /etc
Lennart Poettering [Mon, 12 Dec 2016 18:16:33 +0000 (19:16 +0100)] 
build-sys: stop placing D-Bus policy below /etc

Let's start placing our D-Bus policy files in /usr rather than /etc. D-Bus
supports this since 1.9.18, and moving our files over means we continue to work
even if /etc is flushed out entirely (for example if systemd-nspawn's
--volatile= switch is used).

Since 1.9.18 was released summer 2015 it should be fine to require a newer
version like this for our builds.

https://lists.freedesktop.org/archives/dbus/2015-July/016746.html

7 years agocalendarspec: free memory when parsing fails (#4890)
Doug Christman [Wed, 14 Dec 2016 18:21:27 +0000 (13:21 -0500)] 
calendarspec: free memory when parsing fails (#4890)

This prevents memory leaks on strings like `*~*-*`.

Fixes #4887

7 years agoupdate TODO 4845/head
Lennart Poettering [Tue, 6 Dec 2016 18:26:48 +0000 (19:26 +0100)] 
update TODO

7 years agomkosi: change /etc/issue text a bit for mkosi images build from systemd tree
Lennart Poettering [Tue, 6 Dec 2016 22:17:57 +0000 (23:17 +0100)] 
mkosi: change /etc/issue text a bit for mkosi images build from systemd tree

7 years agomkosi: run tests when building mkosi images
Lennart Poettering [Tue, 6 Dec 2016 22:17:30 +0000 (23:17 +0100)] 
mkosi: run tests when building mkosi images

7 years agobuild-sys: include the builddir in $PATH while testing
Lennart Poettering [Tue, 6 Dec 2016 21:55:43 +0000 (22:55 +0100)] 
build-sys: include the builddir in $PATH while testing

udev-test.pl shells out systemd-detect-virt, and it really should invoke the
version from the build tree instead of one supplied by the installed system,
hence let's add the builddir to $PATH while building.

7 years agoutil-lib: rework rename_process() to be able to make use of PR_SET_MM_ARG_START
Lennart Poettering [Tue, 6 Dec 2016 19:29:07 +0000 (20:29 +0100)] 
util-lib: rework rename_process() to be able to make use of PR_SET_MM_ARG_START

PR_SET_MM_ARG_START allows us to relatively cleanly implement process renaming.
However, it's only available with privileges. Hence, let's try to make use of
it, and if we can't fall back to the traditional way of overriding argv[0].

This removes size restrictions on the process name shown in argv[] at least for
privileged processes.

7 years agosysv-generator: properly translate sysv facilities
Lennart Poettering [Tue, 6 Dec 2016 18:36:30 +0000 (19:36 +0100)] 
sysv-generator: properly translate sysv facilities

We used the wrong return value in one case, so that our translations were
thrown away.

While we are at it, make sure to always initialize *ret on successful function
exits.

Fixes: #4762
7 years agomachinectl: make "machinectl -E … shell" work
Lennart Poettering [Tue, 6 Dec 2016 18:35:31 +0000 (19:35 +0100)] 
machinectl: make "machinectl -E … shell" work

Fixes: #4823
7 years agojournalctl: improve wording in an errors message
Lennart Poettering [Tue, 6 Dec 2016 18:34:18 +0000 (19:34 +0100)] 
journalctl: improve wording in an errors message

Fixes: #4660
7 years agoman: document that "systemctl show" shows low-level properties
Lennart Poettering [Tue, 6 Dec 2016 18:33:36 +0000 (19:33 +0100)] 
man: document that "systemctl show" shows low-level properties

Fixes: #4654
7 years agoman: minor fixes for sd_journal_print(3)
Lennart Poettering [Tue, 6 Dec 2016 18:27:17 +0000 (19:27 +0100)] 
man: minor fixes for sd_journal_print(3)

When sd_journal_perror() was added some footers weren't updated accordingly.
Let's do so.

Fixes: #4755
7 years agomkosi: update mkosi.fedora so that we can run "make check" during build
Lennart Poettering [Tue, 6 Dec 2016 17:41:27 +0000 (18:41 +0100)] 
mkosi: update mkosi.fedora so that we can run "make check" during build

Our tests require "diff" and "tree", hence let's add them to the set of
development packages.

7 years agonspawn: flush out environment block of the -a stub init process
Lennart Poettering [Tue, 6 Dec 2016 17:19:23 +0000 (18:19 +0100)] 
nspawn: flush out environment block of the -a stub init process

The container detection code in virt.c we ship checks for /proc/1/environ,
looking for "container=" in it. Let's make sure our "-a" init stub exposes that
correctly.

Without this "systemd-detect-virt" run in a "-a" container won't detect that it
is being run in a container.

7 years agoutil-lib: improve container detection logic
Lennart Poettering [Tue, 6 Dec 2016 14:51:26 +0000 (15:51 +0100)] 
util-lib: improve container detection logic

Previously, systemd-detect-virt was unable to detect "systemd-nspawn -a"
container environments, i.e. where PID 1 is a stub process running in host
context, as in that case /proc/1/environ was inherited from the host. Let's
improve that, and add an additional check for container environments where
/proc/1/environ is not cleaned up and does not contain the $container
environment variable:

The /proc/1/sched file shows the host PID in the first line. if this is not
1, we know we are running in a PID namespace (but not which implementation).

With these changes we should be able to detect container environments that
don't set $container at all.

7 years agoAdd sd_is_socket_sockaddr (#4885)
Zbigniew Jędrzejewski-Szmek [Wed, 14 Dec 2016 10:51:26 +0000 (05:51 -0500)] 
Add sd_is_socket_sockaddr (#4885)

Fixes #1188.