Commit graph

27896 commits

Author SHA1 Message Date
Lucas Werkmeister 2dcf2a1724 man: minor improvements (#4981) 2016-12-25 12:14:00 +01:00
Felipe Sateler 99479986ea 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
2016-12-24 11:34:26 +01:00
Marcin Bachry 574b77efad 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
2016-12-24 00:42:13 +01:00
AsciiWolf 357cd5563a Updated Debian config for mkosi (#4949) 2016-12-23 21:56:01 +01:00
Susant Sahani 42125eda21 networkd: Add example to create MACVTAP and attach it to a link (#4946)
Fixes: #4914
2016-12-23 18:09:29 +01:00
Doug Christman 07d6181589 zsh-completion: fix typo and rephrase option hints (#4963) 2016-12-23 14:37:28 +01:00
Peter Hutterer cbf01f9a07 Merge pull request #4953 from esoleyman/master
Add Microsoft Surface Mouse DPI
2016-12-23 08:15:20 +10:00
Susant Sahani 8f9a206b6c 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
2016-12-22 10:23:29 +01:00
Peter Hutterer 250f600ebb hwdb: clarify where to find the modalias and vid/pid information (#4952)
Fixes #4938
2016-12-22 10:20:02 +01:00
Martin Pitt 4050e04b2c 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
2016-12-22 07:58:02 +01:00
esoleyman a020d2dfd9 Add Microsoft Surface Mouse DPI 2016-12-21 21:49:32 -06:00
Susant Sahani eb64b435eb 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
2016-12-21 19:10:36 +01:00
Susant Sahani 7dd6974c46 networkd: vxlan rename ARPProxy to ReduceARPProxy (#4891)
Fixes: #4768
2016-12-21 18:59:15 +01:00
Evgeny Vereshchagin 5773024d7f 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
2016-12-21 18:36:15 +01:00
Lennart Poettering fee89634ee Merge pull request #4935 from dobyrch/master
calendarspec: improve overflow handling
2016-12-21 11:18:02 +01:00
Douglas Christman 60bf5836a0 calendarspec: minor refactoring and style fix 2016-12-20 17:52:55 -05:00
Douglas Christman c0aebb4b3b 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.
2016-12-20 17:52:55 -05:00
Jörg Thalheim 9f702d00d6 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
2016-12-20 20:27:06 +01:00
Baruch Siach 72d17ce680 man/journalctl: mention systemd-journal-remote(8) (#4929)
Make it easier to figure out how to use the journalctl export format.
2016-12-20 14:59:26 +01:00
Lennart Poettering ce5cbd8679 Merge pull request #4904 from dobyrch/calendar-range-step
calendarspec: allow repetition values with ranges
2016-12-20 11:14:59 +01:00
Zbigniew Jędrzejewski-Szmek 6483ad89f5 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.
2016-12-20 11:09:59 +01:00
Mike Gilbert ecf4f0a8de build-sys: revert dbus >= 1.9.18 requirement (#4924)
Instead, document the necessary step to utilize older dbus versions.
2016-12-20 10:53:53 +01:00
Martin Pitt 1bb67eb21a Merge pull request #4926 from whot/hwdb-updates
Hwdb updates
2016-12-20 08:18:06 +01:00
Peter Hutterer f8de7c1875 hwdb: axis override for HP Spectre
https://bugzilla.redhat.com/show_bug.cgi?id=1402596
2016-12-20 14:39:59 +10:00
Peter Hutterer 3b4d94b66b hwdb: add axis overrides for Asus Vivobook E402SA 2016-12-20 14:39:59 +10:00
Peter Hutterer d28c633676 hwdb: add axis override for Lenovo W530
https://bugs.freedesktop.org/show_bug.cgi?id=98844
2016-12-20 14:39:59 +10:00
Peter Hutterer 24a797f4c7 hwdb: add axis override for Toshiba Tecra M11 2016-12-20 14:39:59 +10:00
Jörg Thalheim 29b5ad083a 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.
2016-12-19 15:34:07 +01:00
Zbigniew Jędrzejewski-Szmek 12d6389c14 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.
2016-12-18 21:47:41 +01:00
Zbigniew Jędrzejewski-Szmek 3f4a69629d Merge pull request #4892 from poettering/buspolicymove
build-sys: stop placing D-Bus policy below /etc
2016-12-18 11:43:18 -05:00
Zbigniew Jędrzejewski-Szmek a80c157506 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.
2016-12-18 13:21:19 +01:00
Martin Pitt 8b35656c33 Merge pull request #4911 from keszybz/fixlets
A few simple fixes / improvements
2016-12-18 13:20:12 +01:00
Zbigniew Jędrzejewski-Szmek 5b5688afbe basic/log: use IN_SET 2016-12-17 22:45:31 -05:00
Zbigniew Jędrzejewski-Szmek 777fe71fdf test-compress: fix warning about LZ4_compress_limitedOutput
691b90d465 fixed one spot, but missed the other one.
2016-12-17 18:27:01 -05:00
Zbigniew Jędrzejewski-Szmek eb56bec413 core: remove spurious newline 2016-12-17 17:26:59 -05:00
Zbigniew Jędrzejewski-Szmek 3a8a0ace2c debug-generator: simplify handling of arg_default_unit
Also free the allocated memory before exiting.
2016-12-17 17:26:59 -05:00
Zbigniew Jędrzejewski-Szmek 075dafd204 Use SPECIAL_DEFAULT_TARGET consistently 2016-12-17 17:26:59 -05:00
Zbigniew Jędrzejewski-Szmek c73838280c 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.
2016-12-17 13:57:04 -05:00
Zbigniew Jędrzejewski-Szmek 117d5a27a3 Merge pull request #4845 from poettering/various-smaller-fixes
Various smaller fixes
2016-12-17 13:36:00 -05:00
Franck Bui 3e7bc89b8f 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.
2016-12-17 09:49:17 -05:00
Zbigniew Jędrzejewski-Szmek 52b2f6b35d 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=
2016-12-17 09:26:44 -05:00
Douglas Christman 482f3b5441 calendarspec: remove superfluous variables 2016-12-16 19:47:04 -05:00
Douglas Christman e78fce48c4 calendarspec: rename fields of CalendarComponent
value/range_end -> start/stop
2016-12-16 19:45:06 -05:00
Douglas Christman a2eb5ea79c 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`
2016-12-16 19:27:33 -05:00
Franck Bui ebc8968bc0 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.
2016-12-16 17:13:58 +01:00
Lucas Werkmeister d6ccb4f942 bootctl: fix typo (#4897) 2016-12-16 15:41:31 +01:00
Stefan Hajnoczi b9495e8d58 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.
2016-12-16 11:20:27 +01:00
Daniel Drake d84071d569 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.
2016-12-15 23:11:11 +01:00
Lennart Poettering 0298f55bb0 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
2016-12-15 16:06:46 +01:00
Doug Christman fc2371c7b1 calendarspec: free memory when parsing fails (#4890)
This prevents memory leaks on strings like `*~*-*`.

Fixes #4887
2016-12-14 19:21:27 +01:00