platform/upstream/systemd.git
7 years agolibshared: fix compilation without libblkid
Zbigniew Jędrzejewski-Szmek [Tue, 18 Apr 2017 23:05:05 +0000 (19:05 -0400)]
libshared: fix compilation without libblkid

This reverts a75e27eba75e27eb fixed the case of libcryptsetup=no, libblkid=yes,
but broke the case of libcryptsetup=no, libblkid=yes. Instead of trying to define
the function only when used, which would result in too much ifdeffery, just silence
the warning.

7 years agobasic/missing.h: drop inclusion of macro.h
Zbigniew Jędrzejewski-Szmek [Tue, 18 Apr 2017 23:04:15 +0000 (19:04 -0400)]
basic/missing.h: drop inclusion of macro.h

It's not necessary for anything.

7 years agoMakefile.am: remove duplicated rules for efi
Zbigniew Jędrzejewski-Szmek [Tue, 11 Apr 2017 03:27:55 +0000 (23:27 -0400)]
Makefile.am: remove duplicated rules for efi

Specifying the same rule with a slightly different dep list was not useful,
since make cannot distinguish rules with the same input / output. (It possibly
could have two rules with different dependency list, but here all dependencies
that are different between the two rules are always present, so the two rules
are effectively the same.)

7 years agoMakefile.am: link dbus-org.freedesktop.network1 alias in /etc
Zbigniew Jędrzejewski-Szmek [Mon, 10 Apr 2017 15:59:58 +0000 (11:59 -0400)]
Makefile.am: link dbus-org.freedesktop.network1 alias in /etc

This makes dbus-org.freedesktop.network1.service like dbus-org.freedesktop.resolve1.service.
When systemd-networkd.service is disabled, the alias is also removed.

7 years agotest-compress*: silence warning about unused definitions when w/o both xz and lz4
Zbigniew Jędrzejewski-Szmek [Fri, 7 Apr 2017 13:28:50 +0000 (09:28 -0400)]
test-compress*: silence warning about unused definitions when w/o both xz and lz4

I think it's nice to mark the test as skipped instead of omitting
it entirely, hence #ifdefs in the code instead of excluding the test
in Makefile.am/meson.build.

7 years agoconfigure: restore check for glib libraries
Zbigniew Jędrzejewski-Szmek [Thu, 6 Apr 2017 15:03:00 +0000 (11:03 -0400)]
configure: restore check for glib libraries

This is a partial revert of 2375607039517c88df. We still have code
guarded by HAVE_GLIB in tests.

v2:
- do not define the automake conditional, it wasn't used anywhere
- rename --disable-gudev to --disable-glib

v3:
- do not cause an error if the libs are not found, this is supposed
  to be an "auto" dep by default.

7 years agorc-local-generator: drop duplicate definitions for rc.local
Zbigniew Jędrzejewski-Szmek [Wed, 12 Apr 2017 23:30:58 +0000 (19:30 -0400)]
rc-local-generator: drop duplicate definitions for rc.local

We always define those paths in the configure scripts.

7 years agobasic/def.h: drop TTY_GID definition
Zbigniew Jędrzejewski-Szmek [Thu, 6 Apr 2017 04:12:40 +0000 (00:12 -0400)]
basic/def.h: drop TTY_GID definition

We already provide a definition through the configuration system, this
one is duplicate.

7 years agoMerge pull request #5708 from vcatechnology/arm-cross-compile
Lennart Poettering [Mon, 17 Apr 2017 13:49:06 +0000 (15:49 +0200)]
Merge pull request #5708 from vcatechnology/arm-cross-compile

ARM32 cross-compile fixes

7 years agoMerge pull request #5731 from jprvita/hwdb-acer
Martin Pitt [Thu, 13 Apr 2017 10:48:39 +0000 (12:48 +0200)]
Merge pull request #5731 from jprvita/hwdb-acer

Acer hwdb keymap updates

7 years agologinctl: fix typo causing ignoring multiple session IDs (#5732)
slodki [Thu, 13 Apr 2017 10:34:59 +0000 (12:34 +0200)]
loginctl: fix typo causing ignoring multiple session IDs (#5732)

Fixes #5733

7 years agoMerge pull request #5690 from yuwata/fix-5621
Djalal Harouni [Wed, 12 Apr 2017 18:22:03 +0000 (20:22 +0200)]
Merge pull request #5690 from yuwata/fix-5621

core: downgrade error message if command is prefixed with `-` and the…

7 years agohwdb: Add power button mapping for Acer models
Chris Chiu [Wed, 12 Apr 2017 13:03:47 +0000 (09:03 -0400)]
hwdb: Add power button mapping for Acer models

The power key keycode e076 is emitted on several different Acer laptop
models, and it is expected that it will also be used on upcoming models.
Verified on the following models:

Aspire ES1-421
Aspire ES1-432
Aspire A515-51
Aspire A515-51G
Aspire A517-51
Aspire A517-51G
Nitro AN515-31

7 years agohwdb: Fix airplane mode key for all Acer series
Chris Chiu [Wed, 12 Apr 2017 13:03:35 +0000 (09:03 -0400)]
hwdb: Fix airplane mode key for all Acer series

According to the key code v2.02 from Acer, scancode E0 86 will be
generated for airplane mode hotkey. Verified on Aspire, TravelMate,
Easynote and Predator.

7 years agohwdb: Map 0x8a to F20 on the Acer Travelmate P648-G2-MG
João Paulo Rechi Vita [Tue, 4 Apr 2017 14:48:06 +0000 (10:48 -0400)]
hwdb: Map 0x8a to F20 on the Acer Travelmate P648-G2-MG

This model emits 0x9a for the microphone mute button above the keyboard,
so let's map it to correct keycode.

7 years agoman: document how to include an equals sign in a value provided to Environment= ...
Mark Stosberg [Tue, 11 Apr 2017 21:19:06 +0000 (17:19 -0400)]
man: document how to include an equals sign in a value provided to Environment= (#5710)

It wasn't clear before how an equals sign in an "Environment=" value might be
handled. Ref:
http://stackoverflow.com/questions/43278883/how-to-write-systemd-environment-variables-value-which-contains/43280157

7 years agonetworkd: Add bridge port priority setting (#5545)
Dimitri John Ledkov [Tue, 11 Apr 2017 21:17:31 +0000 (22:17 +0100)]
networkd: Add bridge port priority setting (#5545)

Allow setting bridge port priority in the Bridge section of the network file,
similar to e.g. port path cost setting.

Set the default to an invalid value of 128, and only set the port priority when
it's not 128. Unlike e.g. path cost, zero is a valid priority value.

Add a networkd-test.py to check that bridge port priority is correctly set.

Incidently, fix bridge port cost type and document valid ranges.

7 years agotest/TEST-12-ISSUE-3171: specify -w1 option to netcat due to default change. (#5722)
Dimitri John Ledkov [Tue, 11 Apr 2017 19:34:29 +0000 (20:34 +0100)]
test/TEST-12-ISSUE-3171: specify -w1 option to netcat due to default change. (#5722)

On Ubuntu 17.04 (zesty zapus) netcat-openbsd was upgraded from 1.105-7ubuntu1
to 1.130-3, at the same time the defaults got changed from -q0 to -q-1
(infinity) the net result is that `echo A | nc -U' call now hangs, preventing
the testcase to complete. One could use the old default of -q0, but that option
is not available in some netcat implementations. Thus settle to specify -w1
instead to mitigate the testcase hang.

7 years agotmpfiles: downgrade error message when operation is not supported (#5692)
Yu Watanabe [Mon, 10 Apr 2017 11:22:18 +0000 (20:22 +0900)]
tmpfiles: downgrade error message when operation is not supported (#5692)

Fixes #5607

7 years agocore: fix values of BindPaths and BindReadOnlyPaths properties on 32-bit platforms...
Evgeny Vereshchagin [Mon, 10 Apr 2017 11:20:17 +0000 (14:20 +0300)]
core: fix values of BindPaths and BindReadOnlyPaths properties on 32-bit platforms (#5713)

$ busctl get-property \
    org.freedesktop.systemd1 \
    /org/freedesktop/systemd1/unit/run_2dr471de87550554a6dbb165501c33c5dab_2eservice \
    org.freedesktop.systemd1.Service BindReadOnlyPaths

a(ssbt) 1 "/etc" "/etc" false 9228635523571007488

The correct values are 0 and 16384

7 years agocore: downgrade legit error logs (#5705)
umuttl [Mon, 10 Apr 2017 11:12:25 +0000 (13:12 +0200)]
core: downgrade legit error logs (#5705)

manager_sync_bus_names() function retrieves the dbus names
and compares it with unit bus names. It could be right
after the list is retrieved, the dbus peer is disconnected.
In this case it is really not an ERROR print if
sd_bus_get_name_creds() or sd_bus_creds_get_unique_name()
fail.

7 years agoRemove BTN_DPAD_* keys from ID_INPUT_KEY test (#5701)
Nathaniel R. Lewis [Thu, 6 Apr 2017 19:13:14 +0000 (12:13 -0700)]
Remove BTN_DPAD_* keys from ID_INPUT_KEY test (#5701)

At present, devices implementing the BTN_DPAD_UP/DOWN/LEFT/RIGHT
codes will be incorrectly classified as key devices.  This causes
devices respecting the Linux gamepad spec (such as the DS3 as of
kernel 4.12) to be classified as keyboards by X11.

This is caused by the test_key function checking all codes on
[KEY_OK, BTN_TRIGGER_HAPPY).  Unfortunately the BTN_DPAD_* codes
are placed between KEY_LIGHTS_TOGGLE and KEY_ALS_TOGGLE.  This
patch splits the upper key block check into the block before and
after the BTN_DPAD_* codes.  An array is used to avoid dedicated,
per block loops in the event that more event codes are added in
the future.

7 years agobuild-sys: correct blkid.h includes
Matt Clarkson [Thu, 6 Apr 2017 13:12:17 +0000 (14:12 +0100)]
build-sys: correct blkid.h includes

When using pkg-config to determine the include flags for blkid the
flags are returned as:

    $ pkg-config blkid --cflags
    -I/usr/include/blkid -I/usr/include/uuid

We use the <blkid/blkid.h> include which would be correct when using
the default compiler /usr/include header search path. However, when
cross-compiling the blkid.h will not be installed at /usr/include and
highly likely in a temporary system root. It is futher compounded if
the cross-compile packages are split up and the blkid package is not
available in the same sysroot as the compiler.

Regardless of the compilation setup, the correct include path should be
<blkid.h> if using the pkg-config returned CFLAGS.

7 years agobuild-sys: correct ARM32 GNU EFI boot binary build
Matt Clarkson [Thu, 6 Apr 2017 13:12:15 +0000 (14:12 +0100)]
build-sys: correct ARM32 GNU EFI boot binary build

Due to ARM not having an EFI capable objcopy we need to use the binary
output argument. This is correctly set up for AArch64 but is missed
when building for ARM32. This patch adds the ARCH_ARM automake define
which can then be used in the makefile to determine if to use the
correct linker flags.

The addition of the ARM32 flags is a copy and paste from the AArch64 to
create a logical OR for the ARCH_AARCH64 and ARCH_ARM variables. I
couldn't figure out a better way to create the conditional with basic
Make language constructs.

7 years agobuild-sys: correctly search for gnu-efi header
Matt Clarkson [Thu, 6 Apr 2017 13:12:11 +0000 (14:12 +0100)]
build-sys: correctly search for gnu-efi header

When the user provides the --with-efi-includedir we incorrectly search
for the header at /usr/include not the provided location. This patch
changes the check to use the provided value so that non-standard header
locations are supported.

This situation occurs commonly when cross-compiling systemd because the
GNU EFI headers and library will not be installed into the root
locations but highly likely a temporary system root.

7 years agoMerge pull request #5706 from keszybz/make-cleanups
Lennart Poettering [Wed, 5 Apr 2017 10:10:11 +0000 (12:10 +0200)]
Merge pull request #5706 from keszybz/make-cleanups

Move busctl to its own dir and other cleanups

7 years agologind: Stopped inhibitions should be considered inactive (#5698)
afrantzis [Wed, 5 Apr 2017 08:32:55 +0000 (11:32 +0300)]
logind: Stopped inhibitions should be considered inactive (#5698)

7 years agobuild-sys: drop obsolete hook from Makefile.am
Zbigniew Jędrzejewski-Szmek [Wed, 5 Apr 2017 02:39:30 +0000 (22:39 -0400)]
build-sys: drop obsolete hook from Makefile.am

7 years agoudev: rename gperf struct name to match other headers
Zbigniew Jędrzejewski-Szmek [Tue, 4 Apr 2017 00:02:58 +0000 (20:02 -0400)]
udev: rename gperf struct name to match other headers

This makes it easier to use the same generator script as for other
gperf scripts. With automake each gperf file had it's own rule, but
with meson I'm trying to use one script, and this inconsistency made
that harder.

7 years agotree-wide: standardize on $(PACKAGE_VERSION) for the version string
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 16:15:33 +0000 (12:15 -0400)]
tree-wide: standardize on $(PACKAGE_VERSION) for the version string

We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents.
$(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and
drop the other define.

7 years agobuild-sys: drop undefined target ref from Makefile.am
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 00:52:47 +0000 (20:52 -0400)]
build-sys: drop undefined target ref from Makefile.am

7 years agobuild-sys: drop undefined var ref from Makefile.am
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 00:52:03 +0000 (20:52 -0400)]
build-sys: drop undefined var ref from Makefile.am

7 years agobuild-sys: use a single ENABLE_LOGIND conditional
Zbigniew Jędrzejewski-Szmek [Mon, 3 Apr 2017 00:12:36 +0000 (20:12 -0400)]
build-sys: use a single ENABLE_LOGIND conditional

We used ENABLE_LOGIND for the automake conditional, and HAVE_LOGIND
for the ifdef. That wasn't wrong, but it certainly was confusing.

Also, move the ifdeffery to avoid warning about unused static function
logind_set_wall_message() when logind is disabled.

7 years agoshared/dissect-image: fix warning about unused function when !HAVE_BLKID
Zbigniew Jędrzejewski-Szmek [Sat, 1 Apr 2017 03:21:20 +0000 (23:21 -0400)]
shared/dissect-image: fix warning about unused function when !HAVE_BLKID

7 years agoMove busctl sources to src/busctl
Zbigniew Jędrzejewski-Szmek [Sat, 1 Apr 2017 02:49:02 +0000 (22:49 -0400)]
Move busctl sources to src/busctl

busctl is not part of libsystemd, and should not be stored under libsystemd.
In particular this is confusing because busctl is linked with libshared, but
stuff in libsystemd is not supposed to depend on libshared.

7 years agopo: fix typo in pt_BR
Martin Pitt [Tue, 4 Apr 2017 10:08:46 +0000 (12:08 +0200)]
po: fix typo in pt_BR

See https://github.com/systemd/systemd/pull/5694#issuecomment-291446842

7 years agoman: fix <function> tag (#5686)
Lucas Werkmeister [Tue, 4 Apr 2017 06:47:30 +0000 (08:47 +0200)]
man: fix <function> tag (#5686)

7 years agoUpdate Brazilian Portuguese translation (#5694)
Rafael Fontenelle [Mon, 3 Apr 2017 21:29:09 +0000 (18:29 -0300)]
Update Brazilian Portuguese translation (#5694)

7 years agohwdb: Asus TP300LJ accelerometer quirks (#5681)
wiertel [Mon, 3 Apr 2017 07:53:10 +0000 (09:53 +0200)]
hwdb: Asus TP300LJ accelerometer quirks (#5681)

iio-sensor-proxy expects the accelerometer oriented as follows:
positive x - to the right, positive y - up (opposite to gravity).
The hardware in the Asus TP300LJ-DW049H is however oriented
differently:
positive x - down, positive y - to the left
This commit adds a ACCEL_MOUNT_MATRIX quirk for this
particular laptop model.

7 years agocore: downgrade error message if command is prefixed with `-` and the command is...
Yu Watanabe [Mon, 3 Apr 2017 06:38:33 +0000 (15:38 +0900)]
core: downgrade error message if command is prefixed with `-` and the command is not found

Fixes #5621

7 years agoMerge pull request #5589 from jasonreeder/claimed_address_fix
Lennart Poettering [Sat, 1 Apr 2017 09:41:58 +0000 (11:41 +0200)]
Merge pull request #5589 from jasonreeder/claimed_address_fix

libsystemd-network: sd-ipv4ll: acquire new address after claimed addr…

7 years agoMerge pull request #5558 from dm0-/nspawn-resolved
Lennart Poettering [Sat, 1 Apr 2017 09:39:08 +0000 (11:39 +0200)]
Merge pull request #5558 from dm0-/nspawn-resolved

nspawn: fix DNS when the stub listener is disabled

7 years agolibsystemd-network: sd-ipv4ll: acquire new address after claimed address conflict
Jason Reeder [Fri, 31 Mar 2017 20:40:18 +0000 (15:40 -0500)]
libsystemd-network: sd-ipv4ll: acquire new address after claimed address conflict

If a conflict occurs on a claimed ipv4ll address, the device releases
the address and then does not attempt to acquire a new ipv4ll
address. According to RFC3927, releasing the address in this
situation is correct. However, this should be followed by an attempt
to configure a new ipv4ll address.

This commit restarts the ipv4ll address acquisition state machine
after releasing the conflicting address.

From RFC3927 Section 2.5 conflict defense method (b):
...
However, if this is not the first conflicting ARP packet the host has
seen, and the time recorded for the previous conflicting ARP packet is
recent, within DEFEND_INTERVAL seconds, then the host MUST immediately
cease using this address and configure a new IPv4 Link-Local address
as described above.
...

Signed-off-by: Jason Reeder <jasonreeder@gmail.com>
7 years agolibsystemd-network: sd-ipv4ll: Wrapper to restart address aquisition after conflict
Jason Reeder [Fri, 31 Mar 2017 19:23:10 +0000 (14:23 -0500)]
libsystemd-network: sd-ipv4ll: Wrapper to restart address aquisition after conflict

After an ipv4ll claimed address conflict occurs a new address needs
to be chosen and then the acquisition state machine needs to be
restarted.

This commit adds a function (sd_ipv4ll_restart) that clears the
previously acquired address (ll->address) and then calls the existing
sd_ipv4ll_start function to choose the new address and start the
acquisition.

Signed-off-by: Jason Reeder <jasonreeder@gmail.com>
7 years agonspawn: check if the DNS stub is listening for requests
David Michael [Wed, 8 Mar 2017 20:45:03 +0000 (12:45 -0800)]
nspawn: check if the DNS stub is listening for requests

7 years agoresolved: add a DNSStubListener property to Manager
David Michael [Wed, 8 Mar 2017 20:43:17 +0000 (12:43 -0800)]
resolved: add a DNSStubListener property to Manager

7 years agoudev: net_id - support predictable ifnames on vio buses (#5675)
Franck Bui [Fri, 31 Mar 2017 14:32:09 +0000 (16:32 +0200)]
udev: net_id - support predictable ifnames on vio buses (#5675)

For IBM PowerVM Virtual I/O network devices, we can build predictable names
based on the slot number passed as part of the OF "reg" property.  Valid slot
numbers range between 2-32767, so we only need the bottom half of the unit
address passed.

For example:

  /proc/device-tree/vdevice/l-lan@30000002
  /proc/device-tree/vdevice/vnic@30000005

would initially map to something like:

  /sys/devices/vio/30000002/net/eth0
  /sys/devices/vio/30000005/net/eth1

and would then translate to env2 and env5

This patch ignores the bus number, as there should only ever be one bus, and
then remove leading zeros.

7 years agonetworkd: RFC compliant autonomous prefix handling (#5636)
hendrikw01 [Fri, 31 Mar 2017 13:10:59 +0000 (15:10 +0200)]
networkd: RFC compliant autonomous prefix handling (#5636)

Previously, `lifetime_valid` of a Router Advertisement was not handled
the way RFC4862 has specified.

In particular: Sections 5.5.3.d and  5.5.3.e

7 years agoMerge pull request #5534 from ssahani/vxlan-label
Lennart Poettering [Fri, 31 Mar 2017 09:30:33 +0000 (11:30 +0200)]
Merge pull request #5534 from ssahani/vxlan-label

networkd: vxlan support setting IPv6 flow label

7 years agonetworkd: fix route_new_static assert when IPv4LLRoute=true (#5676)
Susant Sahani [Fri, 31 Mar 2017 06:29:20 +0000 (11:59 +0530)]
networkd: fix route_new_static assert when IPv4LLRoute=true (#5676)

fixes: #5664

7 years agodoc: spell out handle-* options, use <literal> syntax (#5673)
Michael Biebl [Fri, 31 Mar 2017 06:01:41 +0000 (08:01 +0200)]
doc: spell out handle-* options, use <literal> syntax (#5673)

7 years agojournal-upload: add state file directory to ReadWritePaths (#5578)
Yu Watanabe [Thu, 30 Mar 2017 16:01:03 +0000 (01:01 +0900)]
journal-upload: add state file directory to ReadWritePaths (#5578)

The commit c7fb922d6250543ba5462fa7a6ff03cc8f628e94 prohibits
journal-upload to save its state in /var/lib/systemd/journal-upload/state,
thus the daemon fails and outputs the following error message even if
the directory is not read-only file system
```Cannot save state to /var/lib/systemd/journal-upload/state: Read-only file system```
This commit adds the permission the daemon to write the state file.

7 years agoMerge pull request #5670 from poettering/trivialities
Martin Pitt [Thu, 30 Mar 2017 13:09:28 +0000 (15:09 +0200)]
Merge pull request #5670 from poettering/trivialities

trivial doc fixes

7 years agojournal: fix up syslog facility when forwarding native messages (#5667)
Michael Biebl [Thu, 30 Mar 2017 09:56:25 +0000 (11:56 +0200)]
journal: fix up syslog facility when forwarding native messages (#5667)

Native journal messages (_TRANSPORT=journal) typically don't have a
syslog facility attached to it. As a result when forwarding the messages
to syslog they ended up with facility 0 (LOG_KERN).
Apply syslog_fixup_facility() so we use LOG_USER instead.

Fixes: #5640

7 years agoman: use <varlistentry> for all unit entries
Lennart Poettering [Thu, 30 Mar 2017 09:54:45 +0000 (11:54 +0200)]
man: use <varlistentry> for all unit entries

So far, all sections of the systemd.special(7) man page used
<varlistentry> for listing the targets, with one exception: the
"Special Passive User Units" one. Let's clean this up and use the same
formatting everywhere.

7 years agoREADME: document that gperf 3.1 is required for building now
Lennart Poettering [Thu, 30 Mar 2017 09:54:23 +0000 (11:54 +0200)]
README: document that gperf 3.1 is required for building now

7 years agounits: move Before deps for quota services to remote-fs.target (#5627)
tblume [Thu, 30 Mar 2017 09:21:18 +0000 (11:21 +0200)]
units: move Before deps for quota services to remote-fs.target (#5627)

Creating quota on an iscsi device is causing dependency loops at next reboot.
Reason is that systemd-quotacheck and quotaon.service are ordered before
local-fs.target and quota enabled mounts have a before dependency to them.
This cannot work for _netdev mounts, because network activation is ordered
after local-fs.target.
Moving the Before dependency for systemd-quotacheck and quotaon.service
to remote-fs.target fixes this.

7 years agosysv-generator: Provides: $network should also pull network.target to transaction...
Lukáš Nykrýn [Thu, 30 Mar 2017 09:12:50 +0000 (11:12 +0200)]
sysv-generator: Provides: $network should also pull network.target to transaction (#5652)

network.target should be pulled in to the transaction
by the unit that provides network services, but currently
for initscripts it only pulls in network-online.target.

7 years agoserial-getty@.service.m4: add Conflicts=/Before= against rescue.service (#5632)
Franck Bui [Thu, 30 Mar 2017 08:39:16 +0000 (10:39 +0200)]
serial-getty@.service.m4: add Conflicts=/Before= against rescue.service (#5632)

Commit 5ed020d8d10fc100c68edddb519f085b7397a45c already fixed this issue for
getty@.service but forgot serial console.

Note that this is not needed for emergency target as the sysinit target
conflicts against this target already.

7 years agoman: clarify that handle-lid-switch is a low level inhibitor lock (#5662)
Michael Biebl [Thu, 30 Mar 2017 08:12:54 +0000 (10:12 +0200)]
man: clarify that handle-lid-switch is a low level inhibitor lock (#5662)

… like the other handle-*-key inhibitor locks.

Follow-up for 05b2a8fd7a0533758d2f532df798cabc3c442683

Fixes: #5647

7 years agoMerge pull request #5663 from keszybz/test-sizeof-more
Lennart Poettering [Thu, 30 Mar 2017 07:58:05 +0000 (09:58 +0200)]
Merge pull request #5663 from keszybz/test-sizeof-more

Add a few `struct timespec`-related types to `test-sizeof`

7 years agotest-sizeof: add some struct-timespec related fields
Zbigniew Jędrzejewski-Szmek [Thu, 30 Mar 2017 01:31:58 +0000 (21:31 -0400)]
test-sizeof: add some struct-timespec related fields

Might help with #5264.

7 years agotest-sizeof: do not link with libsystemd-shared
Zbigniew Jędrzejewski-Szmek [Thu, 30 Mar 2017 01:31:21 +0000 (21:31 -0400)]
test-sizeof: do not link with libsystemd-shared

This makes it much quicker to compile.

7 years agobasic: forbid rm_rf() to remove paths ending with ".." (#5653)
Jan Synacek [Wed, 29 Mar 2017 06:25:52 +0000 (08:25 +0200)]
basic: forbid rm_rf() to remove paths ending with ".." (#5653)

Fixes: #5644

7 years agounits: make enablement of s-n-wait-online.service follow systemd-networkd.service...
Zbigniew Jędrzejewski-Szmek [Mon, 27 Mar 2017 10:55:55 +0000 (06:55 -0400)]
units: make enablement of s-n-wait-online.service follow systemd-networkd.service (#5635)

In 58a6dd15582c038a25bd7059435833943e2e4617 s-n-wait-online.service was added
to presets to synchronize the presets with the state after installation. But it
is harmful to have s-n-wait-online.service enabled when s-n.service is
disabled, because s-n-wait-online.service has Requsite=s-n.service and cannot
be activated. Thus remove s-n-wait-online.service from presets again, and let
it be enabled whenever s-n.service is enabled.

During installation we create enablement symlinks by hand, and since s-n.service
is enabled, s-n-w-o.service should be enabled too, so the symlink should still
be created during installation.

https://bugzilla.redhat.com/show_bug.cgi?id=1433459#c15

7 years agorules: add a rule to set /dev/kvm access mode and ownership (#5597)
Zbigniew Jędrzejewski-Szmek [Mon, 27 Mar 2017 10:34:24 +0000 (06:34 -0400)]
rules: add a rule to set /dev/kvm access mode and ownership (#5597)

Kernel default mode is 0600, but distributions change it to group kvm, mode
either 0660 (e.g. Debian) or 0666 (e.g. Fedora). Both approaches have valid
reasons (a stricter mode limits exposure to bugs in the kvm subsystem, a looser
mode makes libvirt and other virtualization mechanisms work out of the box for
unprivileged users over ssh).

In Fedora the qemu package carries the relevant rule, but it's nicer to have it
in systemd, so that the permissions are not dependent on the qemu package being
installed. Use of packaged qemu binaries is not required to make use of
/dev/kvm, e.g. it's possible to use a self-compiled qemu or some alternative.

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

To accomodate both approaches, add a rule to set the mode in 50-udev-default.rules,
but allow the mode to be overridden with a --with-dev-kvm-mode configure rule.
The default is 0660, as the (slightly) more secure option.

7 years agohwdb: add resolution values for Waltop USB tablet (#5634)
flussence [Mon, 27 Mar 2017 00:00:40 +0000 (00:00 +0000)]
hwdb: add resolution values for Waltop USB tablet (#5634)

Newer versions of libinput need this to recognise it as an input device.

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

7 years agobasic: don't link "libm.so" into "libbasic.so" (#5628)
Thomas Haller [Fri, 24 Mar 2017 14:36:06 +0000 (15:36 +0100)]
basic: don't link "libm.so" into "libbasic.so" (#5628)

Very few parts of the systemd source require <math.h> or "libm.so".
Linking libbasic with -lm drags the mathematical library in for all
systemd components, and in turn for all users of systemd libraries.

It's just unneeded.

7 years agounits: simplify rescue.service and emergency.service (#5623)
Michael Biebl [Thu, 23 Mar 2017 03:37:06 +0000 (04:37 +0100)]
units: simplify rescue.service and emergency.service (#5623)

The emergency.service and rescue.service units have become rather
convoluted. We spawn multiple shells and the help text spans multiple lines
which makes the units hard to read.

Move the logic into a single shell script and call that via ExecStart.

7 years agobuild-sys: minor indentation fix
Michael Biebl [Wed, 22 Mar 2017 16:55:36 +0000 (17:55 +0100)]
build-sys: minor indentation fix

7 years agobasic/journal-importer: Fix unaligned access in get_data_size() (#5622)
John Paul Adrian Glaubitz [Wed, 22 Mar 2017 02:36:50 +0000 (03:36 +0100)]
basic/journal-importer: Fix unaligned access in get_data_size() (#5622)

7 years agoMerge pull request #5531 from yuwata/mdns
Zbigniew Jędrzejewski-Szmek [Wed, 22 Mar 2017 02:30:32 +0000 (22:30 -0400)]
Merge pull request #5531 from yuwata/mdns

resolved: do not start LLMNR or mDNS stack when no network enables them

7 years agoresolved: detect and warn other running LLMNR stack
Yu Watanabe [Tue, 21 Mar 2017 04:30:48 +0000 (13:30 +0900)]
resolved: detect and warn other running LLMNR stack

Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
even if another LLMNR stack is running, `bind` always success and
we cannot detect the other stack. By this commit, we first try to
`bind` without `SO_REUSEADDR`, and if it fails, show warning and
retry with `SO_REUSEADDR`.

7 years agoresolved: add global config option to control mDNS stack
Yu Watanabe [Thu, 16 Mar 2017 05:30:16 +0000 (14:30 +0900)]
resolved: add global config option to control mDNS stack

7 years agoresolved: detect and warn other running mDNS stack
Yu Watanabe [Tue, 21 Mar 2017 04:34:52 +0000 (13:34 +0900)]
resolved: detect and warn other running mDNS stack

Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
even if another mDNS stack (e.g. avahi) is running, `bind` always
success and we cannot detect the other stack.
By this commit, we first try to `bind` without `SO_REUSEADDR`,
and if it fails, show warning and retry with `SO_REUSEADDR`.

7 years agoresolved: do not start LLMNR or mDNS stack when no network enables them
Yu Watanabe [Thu, 16 Mar 2017 06:52:34 +0000 (15:52 +0900)]
resolved: do not start LLMNR or mDNS stack when no network enables them

When no network enables LLMNR or mDNS, it is not necessary to create
LLMNR or mDNS related sockets. So, let's create them only when
LLMNR- or mDNS-enabled network becomes active or at least one network
enables `LLMNR=` or `MulticastDNS=` options.

7 years agounits: apply plymouth warning fix to in rescue mode as well (#5615)
Daniel Molkentin [Tue, 21 Mar 2017 02:26:05 +0000 (03:26 +0100)]
units: apply plymouth warning fix to in rescue mode as well (#5615)

Follow up for #5528.

7 years agoman: change /lib to /usr/lib (#5618)
Lucas Werkmeister [Tue, 21 Mar 2017 00:32:23 +0000 (01:32 +0100)]
man: change /lib to /usr/lib (#5618)

Per man:file-hierarchy(7), /lib is just a compatibility symlink; the
other manpages also refer to /usr/lib.

Found with:

    git grep -P '(?<!/usr|/var|local)/lib' man/

7 years agosystemctl: fix broken vertical lines in list-dependencies --all (#5608)
Felix Zhang [Mon, 20 Mar 2017 10:27:39 +0000 (18:27 +0800)]
systemctl: fix broken vertical lines in list-dependencies --all (#5608)

7 years agorules: allow SPARC vdisk devices when identifying CD drives (#5599)
John Paul Adrian Glaubitz [Mon, 20 Mar 2017 10:22:54 +0000 (11:22 +0100)]
rules: allow SPARC vdisk devices when identifying CD drives (#5599)

7 years agoUpdated Swedish translation (#5614)
hanklank [Mon, 20 Mar 2017 03:56:34 +0000 (04:56 +0100)]
Updated Swedish translation (#5614)

7 years agounits: do not throw a warning in emergency mode if plymouth is not installed (#5528)
Daniel Molkentin [Fri, 17 Mar 2017 11:13:19 +0000 (12:13 +0100)]
units: do not throw a warning in emergency mode if plymouth is not installed (#5528)

Ideally, plymouth should only be referenced via dependencies,
not ExecStartPre's. This at least avoids the confusing error message
on minimal installations that do not carry plymouth.

7 years agoMerge (¾ of) pull request #5596 from matijaskala/master
Zbigniew Jędrzejewski-Szmek [Thu, 16 Mar 2017 12:42:22 +0000 (08:42 -0400)]
Merge (¾ of) pull request #5596 from matijaskala/master

7 years agobase-filesystem: skip fchownat() if the previous mkdirat() on same path failed (...
Djalal Harouni [Thu, 16 Mar 2017 02:30:15 +0000 (03:30 +0100)]
base-filesystem: skip fchownat() if the previous mkdirat() on same path failed (#5548)

If we are working on a path that was marked to be ignored on errors, and
the mkdirat() fails then add a continue statement and skip fchownat() call.
This avoids the case where UID/GID are valid and we run fchownat() on
non existent path which will fail hard even on paths that we want to
ignore in case of errors.

7 years agocheck for _POSIX_C_SOURCE instead of __USE_POSIX*
Matija Skala [Wed, 15 Mar 2017 13:16:40 +0000 (14:16 +0100)]
check for _POSIX_C_SOURCE instead of __USE_POSIX*

check for _GNU_SOURCE as well as sd_event_child_handler_t needs to be
defined correctly while compiling systemd

7 years agoassigning stdout and stderr is not allowed
Matija Skala [Wed, 15 Mar 2017 12:49:05 +0000 (13:49 +0100)]
assigning stdout and stderr is not allowed

7 years agoman: Fix a simple grammar error in systemd.service.xml (#5594)
AlexanderKurtz [Thu, 16 Mar 2017 00:33:56 +0000 (01:33 +0100)]
man: Fix a simple grammar error in systemd.service.xml (#5594)

7 years agofix includes
Matija Skala [Wed, 15 Mar 2017 12:21:10 +0000 (13:21 +0100)]
fix includes

linux/sockios.h is needed for the SIOCGSTAMPNS macro

xlocale.h is included indirectly in glibc and doesn't even exist in
other libcs

7 years agobuild-sys: make RPM macros installation path configurable (#5564)
steelman [Tue, 14 Mar 2017 23:16:47 +0000 (00:16 +0100)]
build-sys: make RPM macros installation path configurable (#5564)

--with-rpmmacrosdir=no disables installation of the macros.

7 years agoman: Document when pam_systemd sets XDG_RUNTIME_DIR (#5570)
Adrian Heine né Lang [Tue, 14 Mar 2017 21:42:18 +0000 (22:42 +0100)]
man: Document when pam_systemd sets XDG_RUNTIME_DIR (#5570)

https://github.com/systemd/systemd/blob/f97b34a6/src/login/pam_systemd.c#L439

7 years agomachinectl: don't return 1 in case we couldn't figure out container IP addresses...
Michal Sekletar [Tue, 14 Mar 2017 21:38:19 +0000 (22:38 +0100)]
machinectl: don't return 1 in case we couldn't figure out container IP addresses (#5587)

This is in spirit very similar to commit
4b2419165ce409ee55ce96a926302f89685f2293.

Fixes: #5581

7 years agoNever call unmap with MAP_FAILED. (#5590)
Tobias Stoeckmann [Tue, 14 Mar 2017 21:33:22 +0000 (22:33 +0100)]
Never call unmap with MAP_FAILED. (#5590)

When mmap is called, the code in correctly checks for p == MAP_FAILED.

But the resource cleanup at the end of busname_peek_message checks for
p == NULL, and if that's not true, munmap is called.

Therefore in error case, munmap is called with a MAP_FAILED argument
which can result in unexpected behaviour depending on sz's value.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 years agonetworkd: vxlan support setting IPv6 flow labe
Susant Sahani [Wed, 8 Mar 2017 13:11:03 +0000 (18:41 +0530)]
networkd: vxlan support setting IPv6 flow labe

This work adds support for setting the IPv6 flow label for vxlan.

vxlan.netdev

NetDev]
Description=vxlan-test
Name=vxlan1
Kind=vxlan

[VXLAN]
Id=33
Local=2405:204:920b:29ac:7e7a:91ff:fe6d:ffe2
Remote=FF02:0:0:0:0:0:1:9
FlowLabel=104
ip -d link show vxlan1

8: vxlan1: <BROADCAST,MULTICAST> mtu 1430 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether be:83:aa:db:6b:cb brd ff:ff:ff:ff:ff:ff promiscuity 0
    vxlan id 33 group ff02::1:9 local 2405:204:920b:29ac:7e7a:91ff:fe6d:ffe2 dev enp0s25 srcport 0 0 dstport 8472 flowlabel 0x68 ageing 300 noudpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1

7 years agosd-netlink: add vxlan netlink properties.
Susant Sahani [Wed, 8 Mar 2017 13:10:15 +0000 (18:40 +0530)]
sd-netlink: add vxlan netlink properties.

7 years agomissing.h: add vxlan netlink properties
Susant Sahani [Wed, 8 Mar 2017 13:09:43 +0000 (18:39 +0530)]
missing.h: add vxlan netlink properties

7 years agojournal: prevent integer overflow while validating header (#5569)
Tobias Stoeckmann [Mon, 13 Mar 2017 07:14:42 +0000 (08:14 +0100)]
journal: prevent integer overflow while validating header (#5569)

It is possible to overflow uint64_t while validating the header of
a journal file. To prevent this, the addition itself is checked to
be within the limits of UINT64_MAX first.

To keep this readable, I have introduced two stack variables which
hold the converted values during validation.

7 years agoMerge pull request #5571 from keszybz/tarball-generation-tweaks
Martin Pitt [Mon, 13 Mar 2017 07:12:45 +0000 (08:12 +0100)]
Merge pull request #5571 from keszybz/tarball-generation-tweaks

Tarball generation tweaks

7 years agoheaders: check that __INCLUDE_LEVEL__ is defined before using it (#5575)
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2017 07:11:24 +0000 (03:11 -0400)]
headers: check that __INCLUDE_LEVEL__ is defined before using it (#5575)

That macro is a gcc extension, and while widely supported, not ubiquitous.
In particular the coverity scanner is having trouble with it.

7 years agoREADME: include small graphs of open issues and pull requests (#5576)
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2017 07:10:04 +0000 (03:10 -0400)]
README: include small graphs of open issues and pull requests (#5576)

7 years agoresolve: add missing space in output message (#5574)
Yu Watanabe [Mon, 13 Mar 2017 00:12:03 +0000 (09:12 +0900)]
resolve: add missing space in output message (#5574)