]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 years agotest-conf-parser: add valid and invalid utf8 test for config_parse_path 5961/head
Ronny Chevalier [Sun, 14 May 2017 11:19:11 +0000 (13:19 +0200)] 
test-conf-parser: add valid and invalid utf8 test for config_parse_path

7 years agoconf-parser: fix wrong argument given to log_syntax_invalid_utf8
Ronny Chevalier [Sun, 14 May 2017 11:19:11 +0000 (13:19 +0200)] 
conf-parser: fix wrong argument given to log_syntax_invalid_utf8

The condition is on "word", hence we give word instead of rvalue.

An assert would be triggered if !utf8_is_valid(word) is true and
rvalue == NULL, since log_syntax_invalid_utf8 calls utf8_escape_invalid
which calls assert(str).

A test case has been added to test with valid and invalid utf8.

7 years agoMerge pull request #5956 from eliasp/fix-typo-network-zones
Michael Biebl [Sat, 13 May 2017 19:07:04 +0000 (21:07 +0200)] 
Merge pull request #5956 from eliasp/fix-typo-network-zones

man: fix typo (`--network-zones` → `--network-zone`)

7 years agoman: fix typo (`--network-zones` → `--network-zone`) 5956/head
Elias Probst [Sat, 13 May 2017 18:55:03 +0000 (20:55 +0200)] 
man: fix typo (`--network-zones` → `--network-zone`)

7 years agonetwork: Implement DHCP Option 119 (Domain Search List) (#5932)
Daniel Wang [Sat, 13 May 2017 14:19:32 +0000 (07:19 -0700)] 
network: Implement DHCP Option 119 (Domain Search List) (#5932)

This adds a modified version of dhcp6_option_parse_domainname() that is
able to parse compressed domain names, borrowing the idea from
dns_packet_read_name(). It also adds pieces in networkd-link and
networkd-manager to properly save/load the added option field.

Resolves #2710.

7 years agoMerge pull request #5432 from keszybz/udev-logging
Lennart Poettering [Fri, 12 May 2017 13:22:46 +0000 (15:22 +0200)] 
Merge pull request #5432 from keszybz/udev-logging

udev logging separation

7 years agonss-resolve: drop the internal fallback to libnss_dns (#5945)
Zbigniew Jędrzejewski-Szmek [Fri, 12 May 2017 12:31:46 +0000 (08:31 -0400)] 
nss-resolve: drop the internal fallback to libnss_dns (#5945)

If we could not communicate with systemd-resolved, we would call into
libnss_dns. libnss_dns would return NOTFOUND for stuff like "localhost" and
other names resolved by nss-myhostname, which we would fall under the !UNAVAIL=
condition and cause resolution to fail. So the following recommended
configuration in nsswitch.conf would not work:

   hosts: resolve [!UNAVAIL=return] dns myhostname

Remove the internal fallback code completely so that the fallback logic
can be configured in nsswitch.conf.

Tested with
   hosts: resolve [!UNAVAIL=return] myhostname
and
   hosts: resolve [!UNAVAIL=return] dns myhostname

Fixes #5742.

7 years agoMerge pull request #5928 from keszybz/libidn2
Lennart Poettering [Fri, 12 May 2017 10:01:40 +0000 (12:01 +0200)] 
Merge pull request #5928 from keszybz/libidn2

Use idn2 instead of idn

7 years agoMerge pull request #5942 from keszybz/timestamp-writing
Lennart Poettering [Fri, 12 May 2017 10:00:24 +0000 (12:00 +0200)] 
Merge pull request #5942 from keszybz/timestamp-writing

Allow timestamp to be set by the file writing utility functions

7 years agoMerge pull request #5946 from evverx/test-sigbus-fixes
Lennart Poettering [Fri, 12 May 2017 09:58:13 +0000 (11:58 +0200)] 
Merge pull request #5946 from evverx/test-sigbus-fixes

test-sigbus: use posix_fallocate rather than fallocate

7 years agoREADME: update util-linux required compilation options (#5949)
Zbigniew Jędrzejewski-Szmek [Fri, 12 May 2017 08:49:48 +0000 (04:49 -0400)] 
README: update util-linux required compilation options (#5949)

Fixes #5563.

7 years agonetworkd: remove unused variables (#5948)
Zbigniew Jędrzejewski-Szmek [Fri, 12 May 2017 01:53:12 +0000 (21:53 -0400)] 
networkd: remove unused variables (#5948)

Fixup for 36423ff433.

7 years agotests: stop creating /TEST (#5943)
Evgeny Vereshchagin [Thu, 11 May 2017 22:56:39 +0000 (01:56 +0300)] 
tests: stop creating /TEST (#5943)

Closes #5856.

7 years agosd-bus: fix c++ compatibility (#5941)
Matthijs van Duin [Thu, 11 May 2017 22:55:26 +0000 (00:55 +0200)] 
sd-bus: fix c++ compatibility (#5941)

g++ annoyingly requires a non-empty struct-initializer to initialize all
struct members, in order of declaration.

Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
7 years agoMerge pull request #5936 from ssahani/net-route
Zbigniew Jędrzejewski-Szmek [Thu, 11 May 2017 22:53:35 +0000 (18:53 -0400)] 
Merge pull request #5936 from ssahani/net-route

networkd: route replace parse prefix with generic in_addr_prefix_from_string

7 years agomkosi: switch over to libidn2 5928/head
Zbigniew Jędrzejewski-Szmek [Thu, 11 May 2017 02:09:45 +0000 (22:09 -0400)] 
mkosi: switch over to libidn2

7 years agoresolved: support libidn2 in addition to libidn
Zbigniew Jędrzejewski-Szmek [Wed, 10 May 2017 01:56:34 +0000 (21:56 -0400)] 
resolved: support libidn2 in addition to libidn

libidn2 2.0.0 supports IDNA2008, in contrast to libidn which supports IDNA2003.

https://bugzilla.redhat.com/show_bug.cgi?id=1449145
From that bug report:

Internationalized domain names exist for quite some time (IDNA2003), although
the protocols describing them have evolved in an incompatible way (IDNA2008).
These incompatibilities will prevent applications written for IDNA2003 to
access certain problematic domain names defined with IDNA2008, e.g., faß.de is
translated to domain xn--fa-hia.de with IDNA2008, while in IDNA2003 it is
translated to fass.de domain. That not only causes incompatibility problems,
but may be used as an attack vector to redirect users to different web sites.

v2:
- keep libidn support
- require libidn2 >= 2.0.0
v3:
- keep dns_name_apply_idna caller dumb, and keep the #ifdefs inside of the
  function.
- use both ±IDN and ±IDN2 in the version string

7 years agonetworkd: pretiffy message about invalid prefix 5936/head
Zbigniew Jędrzejewski-Szmek [Thu, 11 May 2017 18:00:25 +0000 (14:00 -0400)] 
networkd: pretiffy message about invalid prefix

We know how the field we are parsing is called, let's put this information in
the error message:
"Route Source= prefix is invalid, ignoring assignment: ..."
"Route Destination= prefix is invalid, ignoring assignment: ..."

7 years agoupdate-done: use newly added library function to write the file 5942/head
Zbigniew Jędrzejewski-Szmek [Thu, 11 May 2017 14:29:34 +0000 (10:29 -0400)] 
update-done: use newly added library function to write the file

Fixes #5861.

7 years agoMerge pull request #5893 from keszybz/memorydenywriteexecute
Lennart Poettering [Thu, 11 May 2017 17:42:42 +0000 (19:42 +0200)] 
Merge pull request #5893 from keszybz/memorydenywriteexecute

Add support for more arches for MemoryDenyWriteExecute

7 years agopid1: improve logging when failing to remount / ro (#5940)
Zbigniew Jędrzejewski-Szmek [Thu, 11 May 2017 16:12:41 +0000 (12:12 -0400)] 
pid1: improve logging when failing to remount / ro (#5940)

https://bugzilla.redhat.com/show_bug.cgi?id=1227736#c49

We counted how many filesystems could not be unmounted, but only for those
filesystems which we tried to unmount. Since we only remount / ro, without
attempting to unmount, we would emit a confusing error message:

Remounting '/' read-only with options 'seclabel,space_cache,subvolid=5,subvol=/'.
Remounting '/' read-only with options 'seclabel,space_cache,subvolid=5,subvol=/'.
Remounting '/' read-only with options 'seclabel,space_cache,subvolid=5,subvol=/'.
All filesystems unmounted.

Warn when remount-ro fails, and for filesystems which we won't try to unmount,
include the failure to remount-ro in n_failed.

A few minor cleanups:
- remove unecessary goto which jumps to the next line anyway
- always calculate n_failed, even if log_error is false. This causes no change
  in behaviour, but I think the code is easier to follow, since the log setting
  cannot influence other logic.

7 years agobasic/fileio: extend atomic file writing with timestamp setting
Zbigniew Jędrzejewski-Szmek [Thu, 11 May 2017 14:23:36 +0000 (10:23 -0400)] 
basic/fileio: extend atomic file writing with timestamp setting

There should be no functional change.

7 years agobusctl: monitor - only start printing messages once we have become a monitor (#5931)
Tom Gundersen [Thu, 11 May 2017 13:56:55 +0000 (15:56 +0200)] 
busctl: monitor - only start printing messages once we have become a monitor (#5931)

A connection becomes a monitor the moment it loses its unique name, so any
messages received before that should not be dumped to the console.

Currently, we print NameAcquired and NameLost for the unique name of the
peer that becomes the monitor, simply discard all messages until we
receive our NameLost signal.

7 years agocore: fix warning about unsigned variable (#5935)
Zbigniew Jędrzejewski-Szmek [Thu, 11 May 2017 06:15:28 +0000 (02:15 -0400)] 
core: fix warning about unsigned variable (#5935)

Fixup for d8c92e8bc7351f553936b5235e1922c18ebd817a.

7 years agonetworkd: route replace parse prefix with generic in_addr_prefix_from_string
Susant Sahani [Thu, 11 May 2017 04:42:54 +0000 (10:12 +0530)] 
networkd: route replace parse prefix with generic in_addr_prefix_from_string

7 years agohwdb: add the X200/X201 to the existing X201s entry (#5934)
Peter Hutterer [Thu, 11 May 2017 02:29:15 +0000 (12:29 +1000)] 
hwdb: add the X200/X201 to the existing X201s entry (#5934)

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

7 years agoman: fix LD_LIBRARY_PATH example in environment.d (#5929)
Ray Strode [Thu, 11 May 2017 02:23:54 +0000 (22:23 -0400)] 
man: fix LD_LIBRARY_PATH example in environment.d (#5929)

The example for LD_LIBRARY_PATH in the environment.d man page is wrong.

When setting LD_LIBRARY_PATH, the new directory usually needs to be at
the front so it overrides old directories.

In the example, the colon delimiter is correctly prepended to the front, but
the actual new path is erroneously appended to the end.

This commit moves it to the front where it belongs.

7 years agoudev: don't allow pointing stick sensitivities greater than 255 (#5927)
Peter Hutterer [Wed, 10 May 2017 19:22:00 +0000 (05:22 +1000)] 
udev: don't allow pointing stick sensitivities greater than 255 (#5927)

It gets truncated, so the result is that people mess with the const accel
because the sensitivity isn't the expected 300 but the too-low 45.

One example: https://bugs.freedesktop.org/show_bug.cgi?id=100965

7 years agoMerge pull request #5920 from fbuihuu/sysusers-disable-gshadow
Lennart Poettering [Wed, 10 May 2017 17:46:13 +0000 (19:46 +0200)] 
Merge pull request #5920 from fbuihuu/sysusers-disable-gshadow

Sysusers disable group shadow support

7 years agoseccomp: enable RestrictAddressFamilies on ppc64, autodetect SECCOMP_RESTRICT_ADDRESS... 5893/head
Zbigniew Jędrzejewski-Szmek [Tue, 9 May 2017 22:57:10 +0000 (18:57 -0400)] 
seccomp: enable RestrictAddressFamilies on ppc64, autodetect SECCOMP_RESTRICT_ADDRESS_FAMILIES_BROKEN

We expect that if socket() syscall is available, seccomp works for that
architecture.  So instead of explicitly listing all architectures where we know
it is not available, just assume it is broken if the number is not defined.
This should have the same effect, except that other architectures where it is
also broken will pass tests without further changes. (Architectures where the
filter should work, but does not work because of missing entries in
seccomp-util.c, will still fail.)

i386, s390, s390x are the exception — setting the filter fails, even though
socket() is available, so it needs to be special-cased
(https://github.com/systemd/systemd/issues/5215#issuecomment-277241488).

This remove the last define in seccomp-util.h that was only used in test-seccomp.c. Porting
the seccomp filter to new architectures should be simpler because now only two places need
to be modified.

RestrictAddressFamilies seems to work on ppc64[bl]e, so enable it (the tests pass).

7 years agosysusers: make use of cleanup(unlink_and_freep) in write_files() and its auxiliary... 5920/head
Franck Bui [Wed, 10 May 2017 12:28:41 +0000 (14:28 +0200)] 
sysusers: make use of cleanup(unlink_and_freep) in write_files() and its auxiliary helpers

No functional changes.

7 years agoautomount: ack automount requests even when already mounted (#5916)
Anchor Cat [Wed, 10 May 2017 11:23:58 +0000 (21:23 +1000)] 
automount: ack automount requests even when already mounted (#5916)

If a process accesses an autofs filesystem while systemd is in the
middle of starting the mount unit on top of it, it is possible for the
autofs_ptype_missing_direct request from the kernel to be received after
the mount unit has been fully started:

  systemd forks and execs mount             ...
            ...                     access autofs, blocks
  mount exits                               ...
  systemd receives SIGCHLD                  ...
            ...                     kernel sends request
  systemd receives request                  ...

systemd needs to respond to this request, otherwise the kernel will
continue to block access to the mount point.

7 years agounits: make descriptions of api filesystems less generic (#5914)
Zbigniew Jędrzejewski-Szmek [Wed, 10 May 2017 11:09:52 +0000 (07:09 -0400)] 
units: make descriptions of api filesystems less generic (#5914)

All those names were very generic. Fixes #5911.

7 years agotest-sigbus: skip the test under valgrind 5946/head
Evgeny Vereshchagin [Wed, 10 May 2017 08:54:52 +0000 (08:54 +0000)] 
test-sigbus: skip the test under valgrind

7 years agotest-sigbus: use posix_fallocate rather than fallocate
Evgeny Vereshchagin [Wed, 10 May 2017 08:47:39 +0000 (08:47 +0000)] 
test-sigbus: use posix_fallocate rather than fallocate

Some filesystems do not support fallocate, so we need to fall back on
something like posix_fallocate.

Closes #5833

7 years agosysusers: make group shadow support configurable
Franck Bui [Tue, 9 May 2017 12:02:37 +0000 (14:02 +0200)] 
sysusers: make group shadow support configurable

Some distros (openSUSE) don't have group shadow support enabled. This can lead
to the following error:

  # systemd-sysusers
  Creating group foofoo with gid 478.
  # systemd-sysusers
  # groupdel foofoo
  # systemd-sysusers
  Creating group foofoo with gid 478.
  Failed to write files: File exists

This patch adds --disable-gshadow option to configure. If used,
systemd-sysvusers won't consider /etc/gshadow.

7 years agosysusers: split make_files()
Franck Bui [Tue, 9 May 2017 07:37:37 +0000 (09:37 +0200)] 
sysusers: split make_files()

This patch extracts the code which is in charge to write the new users or
groups into temporary files and move it into 4 dedicated functions.

This part was previously inlined in makes_files() making this function quite
big and hard to read and maintain.

There should be no functional change.

7 years ago50-udev-default.rules.in: set correct group for mediaX/cecX (#5921)
Lennart Poettering [Tue, 9 May 2017 19:10:55 +0000 (21:10 +0200)] 
50-udev-default.rules.in: set correct group for mediaX/cecX (#5921)

The /dev/mediaX and /dev/cecX devices belong to the video group.
Add two default rules for that.

The /dev/cecX devices were introduced in kernel 4.8 in staging and moved
out of staging in 4.10. These devices support the HDMI CEC bus.

The /dev/mediaX devices are much older, but because they are not used very
frequently nobody got around to adding this rule to systemd. They let the
user control complex media pipelines.

7 years agosd-boot: added shim signature/MOK validation (#5702)
Max Resch [Tue, 9 May 2017 18:57:40 +0000 (20:57 +0200)] 
sd-boot: added shim signature/MOK validation (#5702)

Adds support for booting in a SecureBoot environment with shim as a
preloader. Install an appropriate UEFI security policy to check PE
signature of a chained kernel or UEFI application (using LoadImage())
against the MOK database maintained by shim, using shim's installed
BootServices.

Implementation details for installing the security policy are based on
code from the LinuxFoundation's SecureBoot PreLoader, part of efitools
licensed under LGPL 2.1

Current signed (by Microsoft) versions of shim (Versions 0.8 & 0.9)
so not install a security policy by themselves, future Versions of
shim might (a compile time switch exists in rectent git versions),
so in the future this PR might become unnecessary.

7 years agoMerge pull request #5619 from fbuihuu/fully-restore-unit-cgroup-state
Lennart Poettering [Tue, 9 May 2017 18:49:17 +0000 (20:49 +0200)] 
Merge pull request #5619 from fbuihuu/fully-restore-unit-cgroup-state

core: when deserializing a unit, fully restore its cgroup state

7 years agoMerge pull request #5420 from OpenDZ/tixxdz/namespace-fixes-v2
Lennart Poettering [Tue, 9 May 2017 18:42:32 +0000 (20:42 +0200)] 
Merge pull request #5420 from OpenDZ/tixxdz/namespace-fixes-v2

Namespace: RootImage= RootDirectory= and MountAPIVFS fixes

7 years agonetwork: add support for vlan confs(MVRP, reorder header, loose binding) (#5834)
Susant Sahani [Tue, 9 May 2017 18:25:11 +0000 (18:25 +0000)] 
network: add support for vlan confs(MVRP, reorder header, loose binding) (#5834)

7 years agoman: Clarify Restart= exception for systemctl stop (#5891)
Ted W [Tue, 9 May 2017 18:22:04 +0000 (13:22 -0500)] 
man: Clarify Restart= exception for systemctl stop (#5891)

7 years agoMerge pull request #5906 from keszybz/man-links
Lennart Poettering [Tue, 9 May 2017 18:12:52 +0000 (20:12 +0200)] 
Merge pull request #5906 from keszybz/man-links

man page link fixes

7 years agonetworkd: add IPv6ProxyNDP (#5913)
Hristo Venev [Tue, 9 May 2017 18:04:55 +0000 (19:04 +0100)] 
networkd: add IPv6ProxyNDP (#5913)

This allows enabling proxy_ndp even if no addresses are configured in
networkd, as well as disabling proxy_ndp from a drop-in.

7 years agonetworkd: add support to configure route protocol. (#5890)
Susant Sahani [Tue, 9 May 2017 18:01:25 +0000 (18:01 +0000)] 
networkd: add support to configure route protocol. (#5890)

Closes: #5889
7 years agoMerge pull request #5919 from glaubitz/suse
Lennart Poettering [Tue, 9 May 2017 17:32:25 +0000 (19:32 +0200)] 
Merge pull request #5919 from glaubitz/suse

Fix meson build on openSUSE Tumbleweed

7 years agobuild: Add missing SECCOMP_CFLAGS to test-seccomp and test-execute targets (#5924)
John Paul Adrian Glaubitz [Tue, 9 May 2017 17:31:38 +0000 (19:31 +0200)] 
build: Add missing SECCOMP_CFLAGS to test-seccomp and test-execute targets (#5924)

7 years agomeson: Add missing dependency on libkmod for libudev_core 5919/head
John Paul Adrian Glaubitz [Tue, 9 May 2017 11:00:26 +0000 (13:00 +0200)] 
meson: Add missing dependency on libkmod for libudev_core

7 years agomeson: Add missing dependency on libseccomp for libcore
John Paul Adrian Glaubitz [Tue, 9 May 2017 10:58:32 +0000 (12:58 +0200)] 
meson: Add missing dependency on libseccomp for libcore

7 years agoexecute: Properly log errors considering socket fds (#5910)
Aggelos Avgerinos [Mon, 8 May 2017 23:09:22 +0000 (02:09 +0300)] 
execute: Properly log errors considering socket fds (#5910)

Till now if the params->n_fds was 0, systemd was logging that there were
more than one sockets.

Thanks @gregoryp and @VFXcode who did the most work debugging this.

7 years agoman: improve readability of time shorthands and their normalized forms. (#5912)
Mark Stosberg [Mon, 8 May 2017 23:05:34 +0000 (19:05 -0400)] 
man: improve readability of time shorthands and their normalized forms. (#5912)

7 years agoudev/collect: remove now-unused struct udev 5432/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2017 08:18:42 +0000 (03:18 -0500)] 
udev/collect: remove now-unused struct udev

7 years agoRip out setting of the log level from udev_new and put it in a new function
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2017 08:16:44 +0000 (03:16 -0500)] 
Rip out setting of the log level from udev_new and put it in a new function

This function is internal to systemd code, so external users of libudev
will not see those log messages. I think this is better. If we want to
allow that, the function could be put in libudev and exported.

v2: check that the string is more than one char before stripping quotes

7 years agoudev: use LOG_REALM_UDEV in all udev code
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2017 04:13:22 +0000 (23:13 -0500)] 
udev: use LOG_REALM_UDEV in all udev code

Any call to set/query/use the log level in the code with LOG_REALM=LOG_REALM_UDEV
refers to log_max_level[1]. In particular this means that systemd code using
the libudev library uses does not set the log level for log calls done in libudev.

Fixes #4525.

v2:
- also update meson's meson.build

7 years agobasic/log: split max log level into multiple "realms"
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2017 03:57:34 +0000 (22:57 -0500)] 
basic/log: split max log level into multiple "realms"

The single log level is split into an array of log levels. Which index in the
array is used can be determined for each compilation unit separately by setting
a macro before including log.h. All compilation units use the same index
(LOG_REALM_SYSTEMD), so there should be no functional change.

v2:
- the "realm" is squished into the level (upper bits that are not used by
  priority or facility), and unsquished later in functions in log.c.

v3:
- rename REALM_PLUS_LEVEL to LOG_REALM_PLUS_LEVEL and REALM to LOG_REALM_REMOVE_LEVEL.

7 years agohwdb: add axis range for Panasonic Toughbook CF-19, CF-30 and CF31 (#5908)
Pascal S. de Kloe [Mon, 8 May 2017 01:46:31 +0000 (03:46 +0200)] 
hwdb: add axis range for Panasonic Toughbook CF-19, CF-30 and CF31 (#5908)

7 years agoMerge pull request #5907 from keszybz/mark-python-scripts-+x
Michael Biebl [Mon, 8 May 2017 00:30:27 +0000 (02:30 +0200)] 
Merge pull request #5907 from keszybz/mark-python-scripts-+x

Mark python scripts executable

7 years agoAdd short-iso-precise for journalctl output (#5884)
Ian Wienand [Mon, 8 May 2017 00:23:49 +0000 (10:23 +1000)] 
Add short-iso-precise for journalctl output (#5884)

This adds a short-iso-precise option for journalctl output.  It is similar to
short-iso, but includes microseconds.

7 years agoMark python scripts executable 5907/head
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 15:35:32 +0000 (11:35 -0400)] 
Mark python scripts executable

Since all our python scripts have a proper python3 shebang, there is no benefit
to letting meson autodetect them. On linux, meson will just uses exec(), so the
shebang is used anyway. The only difference should be in how meson reports the
script and that the detection won't fail for (most likely misconfigured)
non-UTF8 locales.

Closes #5855.

7 years agotest-af-list: drop unnecessary backslash
Zbigniew Jędrzejewski-Szmek [Thu, 4 May 2017 20:47:26 +0000 (16:47 -0400)] 
test-af-list: drop unnecessary backslash

7 years agoseccomp: assume clone() arg order is known on all architectures
Zbigniew Jędrzejewski-Szmek [Fri, 5 May 2017 03:10:30 +0000 (23:10 -0400)] 
seccomp: assume clone() arg order is known on all architectures

While adding the defines for arm, I realized that we have pretty much all
known architectures covered, so SECCOMP_RESTRICT_NAMESPACES_BROKEN is not
necessary anymore. clone(2) is adamant that the order of the first two
arguments is only reversed on s390/s390x. So let's simplify things and remove
the #if.

7 years agoseccomp: add mmap/shmat defines for arm and arm64
Zbigniew Jędrzejewski-Szmek [Fri, 5 May 2017 03:10:31 +0000 (23:10 -0400)] 
seccomp: add mmap/shmat defines for arm and arm64

7 years agoseccomp: add mmap/shmat defines for ppc64
Zbigniew Jędrzejewski-Szmek [Fri, 5 May 2017 03:10:30 +0000 (23:10 -0400)] 
seccomp: add mmap/shmat defines for ppc64

7 years agoseccomp: factor out seccomp_rule_add_exact to a helper function
Zbigniew Jędrzejewski-Szmek [Fri, 5 May 2017 03:10:30 +0000 (23:10 -0400)] 
seccomp: factor out seccomp_rule_add_exact to a helper function

7 years agoseccomp: drop SECCOMP_MEMORY_DENY_WRITE_EXECUTE_BROKEN, add test for shmat
Zbigniew Jędrzejewski-Szmek [Thu, 4 May 2017 14:09:53 +0000 (14:09 +0000)] 
seccomp: drop SECCOMP_MEMORY_DENY_WRITE_EXECUTE_BROKEN, add test for shmat

SECCOMP_MEMORY_DENY_WRITE_EXECUTE_BROKEN was conflating two separate things:
1. whether shmat/shmdt/shmget can be filtered (if ipc multiplexer is used, they can not)
2. whether we know this for the current architecture

For i386, shmat is implemented as ipc, so seccomp filter is "broken" for shmat,
but not for mmap, and SECCOMP_MEMORY_DENY_WRITE_EXECUTE_BROKEN cannot be used
to cover both cases. The define was only used for tests — not in the implementation
in seccomp-util.c. So let's get rid of SECCOMP_MEMORY_DENY_WRITE_EXECUTE_BROKEN
and encode the right condition directly in tests.

7 years agoman: fix two references to our own binaries 5906/head
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 15:29:55 +0000 (11:29 -0400)] 
man: fix two references to our own binaries

7 years agoman: fix links to external man pages
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 15:29:40 +0000 (11:29 -0400)] 
man: fix links to external man pages

linkchecker ftw!

7 years agoMerge pull request #5901 from keszybz/mkosi-meson
Lennart Poettering [Sun, 7 May 2017 11:13:13 +0000 (07:13 -0400)] 
Merge pull request #5901 from keszybz/mkosi-meson

Convert mkosi instructions to meson

7 years agotree-wide: use SET_FLAG in more places (#5892)
Zbigniew Jędrzejewski-Szmek [Sun, 7 May 2017 11:03:28 +0000 (07:03 -0400)] 
tree-wide: use SET_FLAG in more places (#5892)

7 years agomkosi.build: set encoding 5901/head
Zbigniew Jędrzejewski-Szmek [Sat, 6 May 2017 01:19:04 +0000 (21:19 -0400)] 
mkosi.build: set encoding

Otherwise python3 (via meson) complains.

7 years agomkosi.fedora: we need lz4 for lz4cat
Zbigniew Jędrzejewski-Szmek [Sat, 6 May 2017 01:18:54 +0000 (21:18 -0400)] 
mkosi.fedora: we need lz4 for lz4cat

7 years agomkosi: switch build to meson
Zbigniew Jędrzejewski-Szmek [Sat, 6 May 2017 01:18:44 +0000 (21:18 -0400)] 
mkosi: switch build to meson

For Fedora, the version is bumped to 26. In F25, ninja is still called ninja-build
(while the package with the rename is going through QA).

7 years agosocket-util: add parse_ip_prefix (#5867)
Susant Sahani [Sat, 6 May 2017 00:04:07 +0000 (00:04 +0000)] 
socket-util: add parse_ip_prefix (#5867)

networkd: replace parse prefix with generic in_addr_prefix_from_string

7 years agoman: document that OnCalendar may be specified more than once. (#5885)
Mark Stosberg [Fri, 5 May 2017 23:00:45 +0000 (19:00 -0400)] 
man: document that OnCalendar may be specified more than once. (#5885)

It's helpful to know you can provide this more than once, rather than try
to make a more complicated / less clear single expression.

7 years agoman: fix URL for kernel-parameters doc
Zbigniew Jędrzejewski-Szmek [Fri, 5 May 2017 01:29:59 +0000 (21:29 -0400)] 
man: fix URL for kernel-parameters doc

With the move to sphinx-generated docs, the old URL seems to have stopped
working and returns 404.

7 years agocore: when deserializing a unit, fully restore its cgroup state 5619/head
Franck Bui [Mon, 27 Mar 2017 16:00:54 +0000 (18:00 +0200)] 
core: when deserializing a unit, fully restore its cgroup state

The state of a unit was not fully restored, especially the
"cgroup_realized_mask/cgroup_enabled_mask" fields were missing.

This could be seen with the following sequence:

 $ systemctl show -p TasksCurrent sshd
 TasksCurrent=1

 $ systemctl daemon-reload

 $ systemctl show -p TasksCurrent sshd
 TasksCurrent=18446744073709551615

This was also visible with the "status" command: "Tasks: " row wasn't
showed in status of a service after a "daemon-reload" command.

7 years agocore: introduce cg_mask_from_string()/cg_mask_to_string()
Franck Bui [Tue, 2 May 2017 07:59:17 +0000 (09:59 +0200)] 
core: introduce cg_mask_from_string()/cg_mask_to_string()

7 years agotest-seccomp: limit the code under #ifdef
Zbigniew Jędrzejewski-Szmek [Wed, 3 May 2017 19:50:19 +0000 (19:50 +0000)] 
test-seccomp: limit the code under #ifdef

Try to make the paths for supported and unsupported architectures as
similar as possible.

7 years agoseccomp: add clone syscall definitions for mips (#5880)
James Cowgill [Wed, 3 May 2017 16:35:45 +0000 (17:35 +0100)] 
seccomp: add clone syscall definitions for mips (#5880)

Also updates the documentation and adds a mention of ppc64 support
which was enabled by #5325.

Tested on Debian mipsel and mips64el. The other 4 mips architectures
should have an identical user <-> kernel ABI to one of the 2 tested
systems.

7 years agoMerge pull request #5842 from keszybz/meson-status-and-conditionals
Michael Biebl [Wed, 3 May 2017 14:45:31 +0000 (16:45 +0200)] 
Merge pull request #5842 from keszybz/meson-status-and-conditionals

Meson status and conditional simplification

7 years agomeson: use booleans for conf.set and drop unecessary conditionals 5842/head
Zbigniew Jędrzejewski-Szmek [Fri, 28 Apr 2017 01:13:08 +0000 (21:13 -0400)] 
meson: use booleans for conf.set and drop unecessary conditionals

Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.

Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.

7 years agomeson: add status report
Zbigniew Jędrzejewski-Szmek [Fri, 28 Apr 2017 00:54:52 +0000 (20:54 -0400)] 
meson: add status report

This is similar to what ./configure prints. Instead of a long list of yes/no lines,
I added two lines at the end with "enabled features" and "disabled features".
This is what the mplayer/mencoder ./configure script did back in the day.
The advantage is that it's easy to look at the list of disabled features
and check for any unexpected entries.

7 years agomeson: add forgotten debug options
Zbigniew Jędrzejewski-Szmek [Fri, 28 Apr 2017 00:51:34 +0000 (20:51 -0400)] 
meson: add forgotten debug options

v2:
-rename -Dextra-debug to -Ddebug to match ./configure --debug

7 years agosd-ndisc: Reset counter for sent Router Solicitations (#5874)
Patrik Flykt [Tue, 2 May 2017 19:36:24 +0000 (22:36 +0300)] 
sd-ndisc: Reset counter for sent Router Solicitations (#5874)

Reset also the counter for number of Router Solicitations sent when
the associated file descriptor is closed and the event source
unreferenced. With this change the router discovery can now be
stopped and restarted arbitrary many times.

7 years agonetwork: reject bridge port priorities above kernel's max value. (#5877)
Dimitri John Ledkov [Tue, 2 May 2017 19:32:42 +0000 (20:32 +0100)] 
network: reject bridge port priorities above kernel's max value. (#5877)

Bridge port priority in the kernel can only be between 0 and 63. Therefore
reject values above maximum.

Fixes: #5729
7 years agobuild-sys: re-add systemd.directives and systemd.index to MANPAGES (#5876)
Michael Biebl [Tue, 2 May 2017 19:30:14 +0000 (21:30 +0200)] 
build-sys: re-add systemd.directives and systemd.index to MANPAGES (#5876)

Those were dropped accidentally in commit
19fe49f62cc916f1237ea92a04fc80ee75285dde, most likely by running
make update-man-list. This is a known limitation of the autotools build:
the man pages must be built before update-man-list is called.

7 years agohwdb: update axis ranges for the Asus UX301LAA touchpad (#5872)
Peter Hutterer [Tue, 2 May 2017 06:53:08 +0000 (16:53 +1000)] 
hwdb: update axis ranges for the Asus UX301LAA touchpad (#5872)

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

7 years agoMerge pull request #5871 from keszybz/meson-html-2
Michael Biebl [Mon, 1 May 2017 17:18:02 +0000 (19:18 +0200)] 
Merge pull request #5871 from keszybz/meson-html-2

meson: make sure html symlinks are also created in build directory

7 years agomeson: make sure html symlinks are also created in build directory 5871/head
Zbigniew Jędrzejewski-Szmek [Mon, 1 May 2017 04:17:20 +0000 (00:17 -0400)] 
meson: make sure html symlinks are also created in build directory

The symlinks should be created in the build directory in two cases: when
configuration specifies -Dhtml=true, or when ninja html target is built.
Normally install : {true,false} is used to decide if a target should be built,
but in this case, we cannot use install : true, because, as described in
488477d101, that results in the target file being copied into the
installation directory instead of a symlink. So we need a work-around. To
achieve the first end, the commands to create the symlinks are added as
dependencies of the command to create the html page. To the second end, they
are added as dependencies of the html target.

Follow-up for 488477d101 and 064d9ef0d7.

7 years agomeson: create index.html symlink pointing at systemd.index.html (#5870)
Michael Biebl [Mon, 1 May 2017 15:02:17 +0000 (17:02 +0200)] 
meson: create index.html symlink pointing at systemd.index.html (#5870)

Re-use bits from 488477d1011559078dbebfea18e22dcc1c9ca7ea to create the
index.html symlink.

Fixes #5862

7 years agoMerge pull request #5869 from keszybz/meson-html
Michael Biebl [Mon, 1 May 2017 13:21:51 +0000 (15:21 +0200)] 
Merge pull request #5869 from keszybz/meson-html

meson: fix creation of html symlinks

7 years agomeson: fix creation of html symlinks 5869/head
Zbigniew Jędrzejewski-Szmek [Mon, 1 May 2017 04:17:20 +0000 (00:17 -0400)] 
meson: fix creation of html symlinks

This adds two somewhat independent rules:
1. to create symlinks to html pages in the build directory
2. to create symlinks in the installation directory

The second part needs to be coded separately, because telling meson to install
the symlinks created in step 1. results in a copy of the target, instead of a
symlink. So step 2. needs to ignore the result of 1. and create the symlink again.

Fixes #5863.

7 years agomore portable python shebangs (#5816)
Jörg Thalheim [Mon, 1 May 2017 00:26:56 +0000 (02:26 +0200)] 
more portable python shebangs (#5816)

This is useful on systems like NixOS, where python3 is not in
/usr/bin/python3 as well as for people using alternative ways to
install python such as virtualenv/pyenv.

7 years agobuild-sys: don't generate index.html with --disable-manpages (#5865)
Michael Biebl [Sun, 30 Apr 2017 16:21:59 +0000 (18:21 +0200)] 
build-sys: don't generate index.html with --disable-manpages (#5865)

Don't generate man/index.html and the dependent man/systemd.index.html
if man pages have been disabled.

Closes #5854

7 years agonetworkd: Add check to ensure link is down before attempting to enslave (#5853)
Roelf Wichertjes [Sun, 30 Apr 2017 11:12:32 +0000 (13:12 +0200)] 
networkd: Add check to ensure link is down before attempting to enslave (#5853)

netdev to bond.

There are situations where a link can be in an "UP" state when
 systemd-networkd attempts to add the link to a bond device.
This is a problem because the bonding driver will refuse to
 enslave a link if it is in the "UP" state.
This check ensures systemd-networkd sets the link to "DOWN"
 before attempting to add the link to the bond.

Fixes #5838.

7 years agoMerge pull request #5808 from ssahani/util
Lennart Poettering [Sun, 30 Apr 2017 09:36:12 +0000 (11:36 +0200)] 
Merge pull request #5808 from ssahani/util

conf parser: add config_parse_ip_port

7 years agosd-boot: remove compiler warning (#5860)
Max Resch [Sun, 30 Apr 2017 02:11:34 +0000 (04:11 +0200)] 
sd-boot: remove compiler warning (#5860)

This small fixup removes a compiler warning when passing tcg (a const
arg type) to the uefi call wapper, which does not define it as const.

All other source files in sd-boot do this cast except measure.c, so
let's fix that.

7 years agoMerge pull request #5809 from keszybz/glob-safe
Martin Pitt [Sat, 29 Apr 2017 19:19:24 +0000 (21:19 +0200)] 
Merge pull request #5809 from keszybz/glob-safe

Implement `safe_glob` that ignores "." and ".."

7 years agoconf parser: add config_parse_ip_port 5808/head
Susant Sahani [Sat, 29 Apr 2017 18:04:17 +0000 (23:34 +0530)] 
conf parser: add config_parse_ip_port