platform/upstream/systemd.git
6 years agoanalyze: port verb dispatching to verbs.[ch] API
Lennart Poettering [Tue, 26 Dec 2017 14:58:06 +0000 (15:58 +0100)]
analyze: port verb dispatching to verbs.[ch] API

Let's unify the code for parsing command line verbs, and reuse the
common verbs.[ch] API in systemd-analyze too.

This adds a couple of error messages when people pass too many
arguments. Moreover thus pushes bus allocation into the verb functions,
which corrects a couple of cases where we previously allocated a bus but
really didn't need to.

Other than that behaviour shouldn't really change.

6 years agosd-daemon: use sockaddr_port() helper
Lennart Poettering [Tue, 26 Dec 2017 12:36:07 +0000 (13:36 +0100)]
sd-daemon: use sockaddr_port() helper

6 years agosocket-util: clarify why sockaddr_port returns unsigned rather than uint16_t
Lennart Poettering [Tue, 26 Dec 2017 12:35:52 +0000 (13:35 +0100)]
socket-util: clarify why sockaddr_port returns unsigned rather than uint16_t

6 years agobootspec: drop ".conf" from BootEntry.filename
Yu Watanabe [Tue, 26 Dec 2017 00:35:35 +0000 (09:35 +0900)]
bootspec: drop ".conf" from BootEntry.filename

The boot loader systemd-boot removes ".conf" from file name of entry
configs, and determine which entry is the default entry.
However, bootspec, which is used by systemctl and bootctl did not
remove ".conf", then sometimes bootctl marks wrong entry as default.
This fixes the logic to choose the default entry in bootspec, to
match the logic used in systemd-boot boot loader.

Fixes #7727.

6 years agoseparate flags from shebang
bleep_blop [Sun, 24 Dec 2017 06:53:20 +0000 (06:53 +0000)]
separate flags from shebang

6 years agosd-boot, udev: trivial condition simplifications
Yu Watanabe [Mon, 25 Dec 2017 04:38:49 +0000 (13:38 +0900)]
sd-boot, udev: trivial condition simplifications

Reported and proposed by @dcb314.

Fixes #7656 and #7657.

6 years agoMerge pull request #7742 from poettering/meson-syscall
Lennart Poettering [Mon, 25 Dec 2017 16:21:59 +0000 (17:21 +0100)]
Merge pull request #7742 from poettering/meson-syscall

Meson syscall

6 years agomeson: hopefully renameat2() will show up where renameat() is defined
Lennart Poettering [Mon, 25 Dec 2017 11:35:43 +0000 (12:35 +0100)]
meson: hopefully renameat2() will show up where renameat() is defined

Should glibc add this eventually, let's try to be smart where to look
for it.

6 years agomeson: look for gettid() definition where getpid() is defined
Lennart Poettering [Mon, 25 Dec 2017 11:35:28 +0000 (12:35 +0100)]
meson: look for gettid() definition where getpid() is defined

Hopefully, should gettid() show up one day in glibc it'll show up where
getpid() is defined too.

6 years agomeson: when pivot_root() is added one day, look for it in <unistd.h>
Lennart Poettering [Mon, 25 Dec 2017 11:07:40 +0000 (12:07 +0100)]
meson: when pivot_root() is added one day, look for it in <unistd.h>

We of course don't know in which header glibc will export pivot_root()
and if it ever will. But there's a good chance they'll place it where
chroot() is located, given the similarity in the operations, hence let's
try our luck and look for it at the same place.

If we are lucky this means we don't have to patch our code if glibc
decides to expose the call one day.

6 years agomeson: use "args" for setting _GNU_SOURCE when checking for functions
Lennart Poettering [Mon, 25 Dec 2017 11:01:14 +0000 (12:01 +0100)]
meson: use "args" for setting _GNU_SOURCE when checking for functions

This reworks how we set _GNU_SOURCE when checking for the availability
of functions:

1. We set it for most of the functions we look for. After all we set it
for our entire built anyway, and it's usually how Linux-specific
definitions in glibc are protected these days. Given that we usually
have checks for such modern stuff only anyway, let's just blanket enable
it.

2. Use "args" instead of "prefix" to set the macro. This is what is
suggested in the meson docs, hence let's do it.

6 years agomeson: define _GNU_SOURCE to detect copy_file_range() (#7734)
Yu Watanabe [Mon, 25 Dec 2017 10:42:42 +0000 (19:42 +0900)]
meson: define _GNU_SOURCE to detect copy_file_range() (#7734)

Follow-up for bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f of git
repository for glibc.

Recently glibc added `copy_file_range()`, but to use it,
`_GNU_SOURCE` needs to be defined. This adds the flag in
meson.build to detect the function by meson correctly.

6 years agoMerge pull request #7663 from keszybz/mkdir-return-value
Lennart Poettering [Sun, 24 Dec 2017 10:59:58 +0000 (11:59 +0100)]
Merge pull request #7663 from keszybz/mkdir-return-value

util-lib: fix return value in mkdir_parents()

6 years agosystemctl: don't show vendor preset state for generated/transient units (#7711)
Lennart Poettering [Sat, 23 Dec 2017 23:47:24 +0000 (00:47 +0100)]
systemctl: don't show vendor preset state for generated/transient units (#7711)

Showing the preset state for those suggests they could actually be
enabled/disabled, but that concept doesn't exist for generated/transient
units, hence hide this information.

This came up here:

https://lists.freedesktop.org/archives/systemd-devel/2017-December/040022.html

6 years agoMerge pull request #7695 from yuwata/transient-socket
Lennart Poettering [Sat, 23 Dec 2017 18:20:29 +0000 (19:20 +0100)]
Merge pull request #7695 from yuwata/transient-socket

DBus-API: implement transient socket unit

6 years agonetworkd: Add support for ipvlan L3s and flags (#7726)
Susant Sahani [Sat, 23 Dec 2017 17:55:03 +0000 (23:25 +0530)]
networkd: Add support for ipvlan L3s and flags (#7726)

This works supports to configure L3S mode and flags
such as bridge, private and vepa

6 years agoMerge pull request #7620 from keszybz/two-docs
Lennart Poettering [Sat, 23 Dec 2017 11:40:48 +0000 (12:40 +0100)]
Merge pull request #7620 from keszybz/two-docs

Two docs

6 years agoman: mention StateDirectory in file-hierarchy(7)
Lucas Werkmeister [Thu, 21 Dec 2017 22:25:00 +0000 (23:25 +0100)]
man: mention StateDirectory in file-hierarchy(7)

6 years agoload-fragment: simplify list insertion logic
Yu Watanabe [Sat, 23 Dec 2017 10:16:49 +0000 (19:16 +0900)]
load-fragment: simplify list insertion logic

LIST_FIND_TAIL and LIST_INSERT_AFTER can work for empty list.

6 years agocgroup: IODeviceWeight= or friends can take device node files in /run/systemd/inacces...
Yu Watanabe [Sat, 23 Dec 2017 10:10:24 +0000 (19:10 +0900)]
cgroup: IODeviceWeight= or friends can take device node files in /run/systemd/inaccessible/

systemd creates several device nodes in /run/systemd/inaccessible/.
This makes CGroup's settings related to IO can take device node
files in the directory.

6 years agocore/socket: shorten socket_fdname()
Yu Watanabe [Tue, 19 Dec 2017 11:12:01 +0000 (20:12 +0900)]
core/socket: shorten socket_fdname()

6 years agocore/socket: dump more settings
Yu Watanabe [Sat, 23 Dec 2017 09:53:36 +0000 (18:53 +0900)]
core/socket: dump more settings

6 years agodbus-cgroup: merge several blocks which operate almost same tasks
Yu Watanabe [Tue, 19 Dec 2017 09:14:39 +0000 (18:14 +0900)]
dbus-cgroup: merge several blocks which operate almost same tasks

6 years agodbus-execute: use empty_to_null() where it can be applicable
Yu Watanabe [Tue, 19 Dec 2017 07:49:37 +0000 (16:49 +0900)]
dbus-execute: use empty_to_null() where it can be applicable

6 years agodoc: add {Condition,Assert}ControlGroupController= to TRANSIENT-SETTINGS.md
Yu Watanabe [Tue, 19 Dec 2017 06:36:36 +0000 (15:36 +0900)]
doc: add {Condition,Assert}ControlGroupController= to TRANSIENT-SETTINGS.md

Follow-up for e16647c39d195804711a006667d5bce49c0ef73d.

6 years agocgroup: move path checking logic to dbus-cgroup.c
Yu Watanabe [Tue, 19 Dec 2017 06:34:04 +0000 (15:34 +0900)]
cgroup: move path checking logic to dbus-cgroup.c

6 years agobus-unit-util: simplify bus_append_cgroup_property()
Yu Watanabe [Tue, 19 Dec 2017 06:33:20 +0000 (15:33 +0900)]
bus-unit-util: simplify bus_append_cgroup_property()

6 years agobus-unit-util: make dependency settings can take multiple units
Yu Watanabe [Tue, 19 Dec 2017 06:32:11 +0000 (15:32 +0900)]
bus-unit-util: make dependency settings can take multiple units

This allows people to specify multiple units in dependency settings
e.g. `Requires=foo.service baz.service`.

6 years agodbus-socket: move truncation check to bus_socket_set_transient_property()
Yu Watanabe [Tue, 19 Dec 2017 06:30:59 +0000 (15:30 +0900)]
dbus-socket: move truncation check to bus_socket_set_transient_property()

6 years agobasic: introduce socket_protocol_{from,to}_name()
Yu Watanabe [Sat, 23 Dec 2017 10:32:04 +0000 (19:32 +0900)]
basic: introduce socket_protocol_{from,to}_name()

And use them where they can be applicable.

6 years agodoc: update TRANSIENT-SETTINGS.md
Yu Watanabe [Tue, 19 Dec 2017 01:53:38 +0000 (10:53 +0900)]
doc: update TRANSIENT-SETTINGS.md

6 years agoman: add explanation about transient path or socket units in systemd-run
Yu Watanabe [Mon, 18 Dec 2017 15:07:11 +0000 (00:07 +0900)]
man: add explanation about transient path or socket units in systemd-run

6 years agorun: add support to create transient path and socket unit
Yu Watanabe [Mon, 18 Dec 2017 14:46:45 +0000 (23:46 +0900)]
run: add support to create transient path and socket unit

6 years agobus-unit-util: add socket unit related options
Yu Watanabe [Sat, 23 Dec 2017 07:59:56 +0000 (16:59 +0900)]
bus-unit-util: add socket unit related options

Also, split bus_append_unit_property_assignment().

6 years agocore: implement transient socket unit
Yu Watanabe [Sat, 23 Dec 2017 09:47:33 +0000 (18:47 +0900)]
core: implement transient socket unit

6 years agosocket-util: add socket_address_type_{from,to}_string()
Yu Watanabe [Sat, 23 Dec 2017 07:55:36 +0000 (16:55 +0900)]
socket-util: add socket_address_type_{from,to}_string()

6 years agocore/socket: add socket_port_type_from_string()
Yu Watanabe [Sat, 23 Dec 2017 07:29:40 +0000 (16:29 +0900)]
core/socket: add socket_port_type_from_string()

6 years agocore:socket: fix string in socket_exec_command_table
Yu Watanabe [Tue, 19 Dec 2017 13:14:07 +0000 (22:14 +0900)]
core:socket: fix string in socket_exec_command_table

6 years agocore,seccomp: fix logic to parse RestrictAddressFamilies= in dbus-execute.c
Yu Watanabe [Tue, 19 Dec 2017 02:05:43 +0000 (11:05 +0900)]
core,seccomp: fix logic to parse RestrictAddressFamilies= in dbus-execute.c

If multiple RestrictAddressFamilies= settings, some of them are
whitelist and the others are blacklist, are sent to bus, then parsing
result was corrupted.
This fixes the parse logic, now it is the same as one used in
load-fragment.c

6 years agocore,seccomp: fix logic to parse syscall filter in dbus-execute.c
Yu Watanabe [Sat, 23 Dec 2017 09:45:32 +0000 (18:45 +0900)]
core,seccomp: fix logic to parse syscall filter in dbus-execute.c

If multiple SystemCallFilter= settings, some of them are whitelist
and the others are blacklist, are sent to bus, then the parse
result was corrupted.
This fixes the parse logic, now it is the same as one used in
load-fragment.c

6 years agococcinelle: beef up isempty() checks (#7729)
Lennart Poettering [Sat, 23 Dec 2017 07:47:55 +0000 (08:47 +0100)]
coccinelle: beef up isempty() checks (#7729)

With these additions, coccinelle finds everything fixed by the first
commit in PR #7695. In order not to needlessly conflict with that PR
this PR won't include those fixes, but only the coccinelle changes to
detect them automatically in the future.

6 years agoman: fix example config to conform the content of the man page
Dmitry Rozhkov [Thu, 21 Dec 2017 12:55:29 +0000 (14:55 +0200)]
man: fix example config to conform the content of the man page

The config example contains wrong specificator for hostname.
It should be %H instead of %h as documented in the man page.

Use correct specificator for hostname.

6 years agocatalog: update french translation
Sylvain Plantefève [Thu, 21 Dec 2017 22:11:25 +0000 (23:11 +0100)]
catalog: update french translation

6 years agoshared/seccomp: add mmap handling for powerpc
Mathieu Malaterre [Fri, 22 Dec 2017 09:06:29 +0000 (10:06 +0100)]
shared/seccomp: add mmap handling for powerpc

Also remove the warning:

./src/shared/seccomp-util.c:1414:2: warning: #warning "Consider adding the right mmap() syscall definitions here!" [-Wcpp]
 #warning "Consider adding the right mmap() syscall definitions here!"

6 years agonetworkd: show warning on error or cast to void when error is ignored (#7716)
Yu Watanabe [Thu, 21 Dec 2017 18:07:23 +0000 (03:07 +0900)]
networkd: show warning on error or cast to void when error is ignored (#7716)

6 years agohwdb: Add accelerometer orientation entry for Lenovo MIIX3-1030 tablet (#7713)
Michał [Thu, 21 Dec 2017 13:17:33 +0000 (14:17 +0100)]
hwdb: Add accelerometer orientation entry for Lenovo MIIX3-1030 tablet (#7713)

Full dmi/id/modalias:
dmi:bvnLENOVO:bvrB4CN29WW:bd12/04/2015:svnLENOVO:pn80HV:pvrLenovoMIIX3-1030:rvnLENOVO:rnMartini:rvrSDK0G98662WIN:cvnLENOVO:ct11:cvrLenovoMIIX3-1030:

Tested on Lenovo MIIX3 with Debian 9

6 years agoFix #7704 and #7708. (#7712)
Susant Sahani [Thu, 21 Dec 2017 12:27:45 +0000 (17:57 +0530)]
Fix  #7704 and #7708. (#7712)

Init rule variable iif oif and to, from

While foreign rules are added the network part is not attached.
attach manager to rules and use it in routing_policy_rule_free.

6 years agonetwork: fix memory leak when an netdev was skipped
Zbigniew Jędrzejewski-Szmek [Wed, 20 Dec 2017 09:17:37 +0000 (10:17 +0100)]
network: fix memory leak when an netdev was skipped

In general we'd leak anything that was allocated in the first parsing of
netdev, e.g. netdev name, host name, etc. Use normal netdev_unref to make sure
everything is freed.

--- command ---
/home/zbyszek/src/systemd/build2/test-network
--- stderr ---
/etc/systemd/network/wg0.netdev:3: Failed to parse netdev kind, ignoring: wireguard
/etc/systemd/network/wg0.netdev:5: Unknown section 'WireGuard'. Ignoring.
/etc/systemd/network/wg0.netdev:9: Unknown section 'WireGuardPeer'. Ignoring.
NetDev has no Kind configured in /etc/systemd/network/wg0.netdev. Ignoring
/etc/systemd/network/br0.network:13: Unknown lvalue 'NetDev' in section 'Network'
br0: netdev ready

=================================================================
==11666==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x7f3a314cf238 in __interceptor_strdup (/lib64/libasan.so.4+0x77238)
    #1 0x7f3a30e71ad1 in free_and_strdup ../src/basic/string-util.c:870
    #2 0x7f3a30d34fba in config_parse_ifname ../src/shared/conf-parser.c:981
    #3 0x7f3a30d2f5b0 in next_assignment ../src/shared/conf-parser.c:155
    #4 0x7f3a30d30303 in parse_line ../src/shared/conf-parser.c:273
    #5 0x7f3a30d30dee in config_parse ../src/shared/conf-parser.c:390
    #6 0x7f3a30d310a5 in config_parse_many_files ../src/shared/conf-parser.c:428
    #7 0x7f3a30d3181c in config_parse_many ../src/shared/conf-parser.c:487
    #8 0x55b4200f9b00 in netdev_load_one ../src/network/netdev/netdev.c:634
    #9 0x55b4200fb562 in netdev_load ../src/network/netdev/netdev.c:778
    #10 0x55b4200c607a in manager_load_config ../src/network/networkd-manager.c:1299
    #11 0x55b4200818e0 in test_load_config ../src/network/test-network.c:128
    #12 0x55b42008343b in main ../src/network/test-network.c:254
    #13 0x7f3a305f8889 in __libc_start_main (/lib64/libc.so.6+0x20889)

SUMMARY: AddressSanitizer: 4 byte(s) leaked in 1 allocation(s).
-------

6 years agoMerge pull request #7710 from jwrdegoede/hwdb-accel-chuwi-vi8-teclast-x80-pro
Zbigniew Jędrzejewski-Szmek [Wed, 20 Dec 2017 12:57:12 +0000 (13:57 +0100)]
Merge pull request #7710 from jwrdegoede/hwdb-accel-chuwi-vi8-teclast-x80-pro

hwdb/60-sensor.hwdb: Add entries for the Chuwi vi8 and Teclast x80 pro tablets

6 years agoMerge pull request #7702 from keszybz/reduce-linkage
Lennart Poettering [Wed, 20 Dec 2017 11:08:40 +0000 (12:08 +0100)]
Merge pull request #7702 from keszybz/reduce-linkage

Some small cleanups and another attempt to reduce linkage of nss modules

6 years agohwdb: Add accelerometer orientation entry for Teclast X80 Pro tablet
Hans de Goede [Wed, 20 Dec 2017 10:06:13 +0000 (11:06 +0100)]
hwdb: Add accelerometer orientation entry for Teclast X80 Pro tablet

Add an accelerometer orientation entry for the Teclast X80 Pro tablet.

6 years agohwdb: Add accelerometer orientation entry for Chuwi Vi8 (CWI506) tablet
Hans de Goede [Wed, 20 Dec 2017 09:57:38 +0000 (10:57 +0100)]
hwdb: Add accelerometer orientation entry for Chuwi Vi8 (CWI506) tablet

Add an accelerometer orientation entry for the Chuwi Vi8 (CWI506) tablet.

6 years agoman: User=, Group= *never* work for mount units (#7602)
Alan Jenkins [Tue, 19 Dec 2017 20:22:05 +0000 (20:22 +0000)]
man: User=, Group= *never* work for mount units (#7602)

Old text:

> Note that the User= and
> Group= options are not particularly useful for mount units specifying a
> "Type=" option or using configuration not specified in /etc/fstab;
> mount(8) will refuse options that are not listed in /etc/fstab if it is
> not run as UID 0.

However I recently learnt the following:

> The mount program does not read the /etc/fstab file if both device
> and dir are specified.

Therefore, if both device and dir are specified, the `user` or `users`
options in `fstab` will not have any effect.  Run as a normal user,
you will always see

    mount: only root can do that

Fix the explanation in the man page.

Also make sure to markup User= and Group= with <varname>.

6 years agoMerge pull request #7697 from yuwata/fix-man-exec-no-new-priv
Zbigniew Jędrzejewski-Szmek [Tue, 19 Dec 2017 18:31:55 +0000 (19:31 +0100)]
Merge pull request #7697 from yuwata/fix-man-exec-no-new-priv

man: LockPersonality= implies NoNewPrivileges=

6 years agosd-bus: drop check for selinux before calling getsockopt(SO_PEERSEC)
Zbigniew Jędrzejewski-Szmek [Tue, 19 Dec 2017 14:12:50 +0000 (15:12 +0100)]
sd-bus: drop check for selinux before calling getsockopt(SO_PEERSEC)

Quoting Lennart Poettering in
https://github.com/systemd/systemd/pull/6464#issuecomment-319029293:
> If the kernel allows us to query that data we should also be Ok with passing
> it on to our own caller, regardless if selinux is technically on or off...

The advantage is that this allows gcc to be smarter and reduce linkage:
(before)$ ldd build/libnss_systemd.so.2
linux-vdso.so.1 (0x00007ffeb46ff000)
librt.so.1 => /lib64/librt.so.1 (0x00007f2f60da6000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f2f60ba1000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f2f60978000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2f60759000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2f60374000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2f61294000)
libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f2f600f0000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2f5feec000)
(after )$ ldd build/libnss_systemd.so.2
linux-vdso.so.1 (0x00007ffe5f543000)
librt.so.1 => /lib64/librt.so.1 (0x00007f427dcaa000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f427daa5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f427d886000)
libc.so.6 => /lib64/libc.so.6 (0x00007f427d4a1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f427e196000)

Note that this only works in conjuction with the previous commit: either
of the two commits alone does not have the desired effect on linkage.

Replaces #6464.

6 years agoMove selinux-related stuff from btrfs-util.c to label.c
Zbigniew Jędrzejewski-Szmek [Tue, 19 Dec 2017 13:33:11 +0000 (14:33 +0100)]
Move selinux-related stuff from btrfs-util.c to label.c

In preparation for future changes.

6 years agomachine-id-setup: use return log_error… pattern
Zbigniew Jędrzejewski-Szmek [Tue, 19 Dec 2017 09:02:27 +0000 (10:02 +0100)]
machine-id-setup: use return log_error… pattern

No functional difference, but this way it's clearer that the original errno
value is returned.

6 years agobootctl: silence warning about signed/unsigned comparison
Zbigniew Jędrzejewski-Szmek [Tue, 19 Dec 2017 08:21:02 +0000 (09:21 +0100)]
bootctl: silence warning about signed/unsigned comparison

6 years agoAdd T430 series to list of supported trackpoint (#7699)
John Paul Herold [Tue, 19 Dec 2017 10:22:36 +0000 (04:22 -0600)]
Add T430 series to list of supported trackpoint (#7699)

Confirmed via `udevadm test /sys/class/input/eventX` that
POINTINGSTICK_* properties were not being set for my T430s trackpoint.
After adding a local entry file (as advised in this file), the same
`udevadm test` command showed properties.

More importantly, the movement of mouse using trackpoint felt much
better. Hard to describe its previous state, but following come to mind:
slippery, hard to control, awkward. Now it feels more consistent and predictable.
A little on the sensitive side with the defaults, but didn't think it warranted
dedicated properties just for this series though as the X230 is same generation
and uses the defaults.

Before local change:

$ udevadm info /dev/input/event5
P: /devices/platform/i8042/serio1/serio2/input/input6/event5
N: input/event5
E: DEVNAME=/dev/input/event5
E: DEVPATH=/devices/platform/i8042/serio1/serio2/input/input6/event5
E: ID_BUS=i8042
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_INPUT_POINTINGSTICK=1
E: LIBINPUT_DEVICE_GROUP=11/2/a:synaptics-pt/serio0
E: MAJOR=13
E: MINOR=69
E: SUBSYSTEM=input
E: USEC_INITIALIZED=38609915

After change:

$ udevadm info /dev/input/event5
P: /devices/platform/i8042/serio1/serio2/input/input6/event5
N: input/event5
E: DEVNAME=/dev/input/event5
E: DEVPATH=/devices/platform/i8042/serio1/serio2/input/input6/event5
E: ID_BUS=i8042
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_INPUT_POINTINGSTICK=1
E: LIBINPUT_DEVICE_GROUP=11/2/a:synaptics-pt/serio0
E: MAJOR=13
E: MINOR=69
E: POINTINGSTICK_CONST_ACCEL=1.0
E: POINTINGSTICK_SENSITIVITY=200
E: SUBSYSTEM=input
E: USEC_INITIALIZED=38609915

6 years agotimedatectl: fix status output (#7696)
Yu Watanabe [Tue, 19 Dec 2017 10:15:50 +0000 (19:15 +0900)]
timedatectl: fix status output (#7696)

Follow-up for 3ec530a1890925efe347f739917dd4078c1b1942.

Fixes #7693.

6 years agomore portable perl shebangs (#7701)
Jörg Thalheim [Tue, 19 Dec 2017 10:13:34 +0000 (10:13 +0000)]
more portable perl shebangs (#7701)

same motivation as in #5816:

- distributions have scripts to rewrite shebangs on installation and
  they know what locations to rely on.
- For tests/compilation we should rather rely on the user to have setup
  there PATH correctly.

6 years agocryptsetup: use uint64_t for keyfile-offset= (#7689)
Zbigniew Jędrzejewski-Szmek [Tue, 19 Dec 2017 07:51:12 +0000 (08:51 +0100)]
cryptsetup: use uint64_t for keyfile-offset= (#7689)

On 32bit, refuse large offsets. Once https://gitlab.com/cryptsetup/cryptsetup/issues/359
is resolved, we should switch to the new api, whatever it is.

Fixes #7677.

6 years agoman: note that `systemctl show` does not overridden value
Yu Watanabe [Tue, 19 Dec 2017 07:07:04 +0000 (16:07 +0900)]
man: note that `systemctl show` does not overridden value

Fixes #7694.

6 years agoman: LockPersonality= implies NoNewPrivileges=
Yu Watanabe [Tue, 19 Dec 2017 03:48:54 +0000 (12:48 +0900)]
man: LockPersonality= implies NoNewPrivileges=

6 years agocore: move path_kill_slashes() to manager
Yu Watanabe [Fri, 15 Dec 2017 12:25:00 +0000 (21:25 +0900)]
core: move path_kill_slashes() to manager

6 years agocore: fix wrong validity check
Yu Watanabe [Fri, 15 Dec 2017 12:22:01 +0000 (21:22 +0900)]
core: fix wrong validity check

6 years agotree-wide: use !strv_isempty() instead of strv_length() > 0
Yu Watanabe [Fri, 15 Dec 2017 07:36:35 +0000 (16:36 +0900)]
tree-wide: use !strv_isempty() instead of strv_length() > 0

6 years agoanalyze: use normal bus connection for "plot" verb (#7685)
Zbigniew Jędrzejewski-Szmek [Mon, 18 Dec 2017 18:35:03 +0000 (19:35 +0100)]
analyze: use normal bus connection for "plot" verb (#7685)

We need to connect to hostnamed, so a private bus connection is no good.
It'd be simpler to use the normal bus connection unconditionally, but
that'd mean that e.g. systemd-analyze set-log-level might not work in
emergency mode. So let's keep trying to use the private connection except
for "plot".

Fixes #7667.

6 years agoMerge pull request #7687 from hbakken/work/add-missing-features2
Lennart Poettering [Mon, 18 Dec 2017 18:29:00 +0000 (19:29 +0100)]
Merge pull request #7687 from hbakken/work/add-missing-features2

Kernel 3.10 compat

6 years agobuild-sys: install TRANSIENT-SETTINGS.md and UIDS-GIDS.md (#7690)
Felipe Sateler [Mon, 18 Dec 2017 13:58:13 +0000 (10:58 -0300)]
build-sys: install TRANSIENT-SETTINGS.md and UIDS-GIDS.md (#7690)

6 years agocryptsetup-generator: Don't mistake NULL input as OOM (#7688)
Jan Alexander Steffens [Mon, 18 Dec 2017 13:47:18 +0000 (14:47 +0100)]
cryptsetup-generator: Don't mistake NULL input as OOM (#7688)

Since systemd v236, several Arch users complained that
systemd-cryptsetup-generator exits with an OOM error and that it
prevents the boot from continuing.

Investigating the diff of cryptsetup-generator between v235 and v236 I
noticed that create_disk allowed for the `password` and `filtered`
variables to be NULL (they're handled with `strempty()`) but not their
`*_escaped` versions, and returned OOM errors in those cases.

Fix this by checking that the input string is non-NULL before deciding
that `specifier_escape` had an OOM error.

I could not test this fix myself, but some users have reported success.

Downstream bug: https://bugs.archlinux.org/task/56733

6 years agomissing: Add DM_DEFERRED_REMOVE
Henrik Grindal Bakken [Thu, 23 Mar 2017 15:19:15 +0000 (16:19 +0100)]
missing: Add DM_DEFERRED_REMOVE

Also include missing.h in dissect-image.c to pick it up.

6 years agomissing: Define SMACK_MAGIC if it's missing
Henrik Grindal Bakken [Thu, 23 Mar 2017 15:09:10 +0000 (16:09 +0100)]
missing: Define SMACK_MAGIC if it's missing

6 years agonspawn: Include missing.h
Henrik Grindal Bakken [Thu, 23 Mar 2017 15:02:43 +0000 (16:02 +0100)]
nspawn: Include missing.h

6 years agomissing: Define EFIVARFS_MAGIC if missing
Henrik Grindal Bakken [Thu, 23 Mar 2017 15:02:20 +0000 (16:02 +0100)]
missing: Define EFIVARFS_MAGIC if missing

6 years agomissing: Add MAX_HANDLE_SZ
Henrik Grindal Bakken [Thu, 23 Mar 2017 15:07:33 +0000 (16:07 +0100)]
missing: Add MAX_HANDLE_SZ

6 years agocatalog: update Russian translation (#7678)
Sergey Ptashnick [Mon, 18 Dec 2017 12:41:43 +0000 (15:41 +0300)]
catalog: update Russian translation (#7678)

Translated taint message.

Also added a blank line before "Current system is tagged" for better
visual separation between current system state and tags description.

6 years agomissing: Add PR_SET_MM_{ARG,ENV}_{START,END}
Henrik Grindal Bakken [Thu, 23 Mar 2017 14:42:15 +0000 (15:42 +0100)]
missing: Add PR_SET_MM_{ARG,ENV}_{START,END}

6 years agomissing: Add some more btrfs structs and constants
Henrik Grindal Bakken [Thu, 23 Mar 2017 14:33:06 +0000 (15:33 +0100)]
missing: Add some more btrfs structs and constants

6 years agobtrfs: Include missing.h in btrfs-ctree.h
Henrik Grindal Bakken [Thu, 23 Mar 2017 14:30:57 +0000 (15:30 +0100)]
btrfs: Include missing.h in btrfs-ctree.h

6 years agocondition: Create AssertControlGroupController (#7630)
Chris Down [Mon, 18 Dec 2017 07:53:29 +0000 (07:53 +0000)]
condition: Create AssertControlGroupController (#7630)

Up until now, the behaviour in systemd has (mostly) been to silently
ignore failures to action unit directives that refer to an unavailble
controller. The addition of AssertControlGroupController and its
conditional counterpart allow explicit specification of the desired
behaviour when such a situation occurs.

As for how this can happen, it is possible that a particular controller
is not available in the cgroup hierarchy. One possible reason for this
is that, in the running kernel, the controller simply doesn't exist --
for example, the CPU controller in cgroup v2 has only recently been
merged and was out of tree until then. Another possibility is that the
controller exists, but has been forcibly disabled by `cgroup_disable=`
on the kernel command line.

In future this will also support whatever comes out of issue #7624,
`DefaultXAccounting=never`, or similar.

6 years agoMerge pull request #7665 from poettering/main-cleanup
Zbigniew Jędrzejewski-Szmek [Mon, 18 Dec 2017 07:26:36 +0000 (08:26 +0100)]
Merge pull request #7665 from poettering/main-cleanup

let's split up main() into more functions, to make it digestable

6 years agocatalog: update Polish translation (#7660)
Piotr Drąg [Sat, 16 Dec 2017 14:20:34 +0000 (15:20 +0100)]
catalog: update Polish translation (#7660)

6 years agoMerge pull request #7664 from poettering/fix-integration-tests
Zbigniew Jędrzejewski-Szmek [Sat, 16 Dec 2017 14:01:04 +0000 (15:01 +0100)]
Merge pull request #7664 from poettering/fix-integration-tests

Fix integration tests

6 years agoMove mkdir_label() to mkdir-label.c
Zbigniew Jędrzejewski-Szmek [Sat, 16 Dec 2017 12:32:42 +0000 (13:32 +0100)]
Move mkdir_label() to mkdir-label.c

It just seems strange to have it in a different file if mkdir-label.c exists.

6 years agosmack-util: remove unneeded initalization
Zbigniew Jędrzejewski-Szmek [Sat, 16 Dec 2017 12:22:57 +0000 (13:22 +0100)]
smack-util: remove unneeded initalization

6 years agoAdd mkdir_errno_wrapper() and use instead of mkdir() in various places
Zbigniew Jędrzejewski-Szmek [Fri, 15 Dec 2017 16:08:13 +0000 (17:08 +0100)]
Add mkdir_errno_wrapper() and use instead of mkdir() in various places

We'd pass pointers to mkdir and mkdir_label to call in various places. mkdir
returns the error in errno while mkdir_label returns the error directly.

6 years agoman: generalize "binary" to "program" (#7668)
Alan Jenkins [Sat, 16 Dec 2017 10:48:12 +0000 (10:48 +0000)]
man: generalize "binary" to "program" (#7668)

Systemd services are permitted to be scripts, as well as binary
executables.

The same also applies to the underlying /sbin/mount and /sbin/swapon.
It is not necessary for the user to consider what type of program file
these are.  Nor is it necessary with systemd-nspawn, to distinguish between
init as a "binary" v.s. a user-specified "program".

Also fix a couple of grammar nits in the modified sentences.

6 years agomeson: libudev_core and udevadm should have LOG_REALM=LOG_REALM_UDEV (#7666)
Franck Bui [Sat, 16 Dec 2017 08:36:36 +0000 (09:36 +0100)]
meson: libudev_core and udevadm should have LOG_REALM=LOG_REALM_UDEV (#7666)

Otherwise, setting udev_log=debug in /etc/udev/udev.conf has no effects since
systemd-udevd is built with LOG_REALM=LOG_REALM_UDEV.

However using LOG_REALM_UDEV (for libudev_core) reveals another similar bug for
udevadm which should also define LOG_REALM_UDEV.

6 years agoMerge pull request #7661 from keszybz/slice-cleanups
Lennart Poettering [Fri, 15 Dec 2017 19:55:39 +0000 (20:55 +0100)]
Merge pull request #7661 from keszybz/slice-cleanups

Slice cleanups and systemd-mount --owner

6 years agomain: add some more comments for the early initialization phase
Lennart Poettering [Fri, 15 Dec 2017 18:03:17 +0000 (19:03 +0100)]
main: add some more comments for the early initialization phase

6 years agomain: reorder variable declarations a bit
Lennart Poettering [Fri, 15 Dec 2017 18:02:35 +0000 (19:02 +0100)]
main: reorder variable declarations a bit

Let's remove a bit redundancy, and list variables of the same
type/category in one declaration line.

6 years agomain: split out 'skip_setup' check into its own functions
Lennart Poettering [Fri, 15 Dec 2017 17:53:03 +0000 (18:53 +0100)]
main: split out 'skip_setup' check into its own functions

And let's optimize it a tiny bit, by only iterating through the argument
list once, instead of twice.

6 years agomain: do bother with uid_to_name() unless we do debug logging
Lennart Poettering [Fri, 15 Dec 2017 17:51:54 +0000 (18:51 +0100)]
main: do bother with uid_to_name() unless we do debug logging

6 years agomain: conditionalize fixup_environment() internally
Lennart Poettering [Fri, 15 Dec 2017 16:54:20 +0000 (17:54 +0100)]
main: conditionalize fixup_environment() internally

This code is executed before we parse command line/configuration
parameters, hence let's not use arg_system to figure our how to clean up
things, but instead PID == 1. Let's move that check inside of the
function, to make things a bit more robust abstract from the outside.

Also, let's add a log message about this, that was so far missing.

6 years agomain: let's move ACTION_RUN test into initialize_runtime()
Lennart Poettering [Fri, 15 Dec 2017 16:52:33 +0000 (17:52 +0100)]
main: let's move ACTION_RUN test into initialize_runtime()

Let's hide this check inside the function and make it easier to follow
the general control flow of main().

6 years agomount-setup: fix MNT_CHECK_WRITABLE error handling, and log about the issue
Lennart Poettering [Fri, 15 Dec 2017 16:37:16 +0000 (17:37 +0100)]
mount-setup: fix MNT_CHECK_WRITABLE error handling, and log about the issue

Let's correct the error handling (the error is in errno, not r), and
let's add logging like the rest of the function has it.

6 years agomain: tweak timerslack message a bit
Lennart Poettering [Fri, 15 Dec 2017 16:36:19 +0000 (17:36 +0100)]
main: tweak timerslack message a bit

Let's clarify that this is a non-issue, by downgrading it to LOG_WARN
and saying "ignoring" in the message.

6 years agomain: move install_crash_handler() and mount_cgroup_controllers() invocations
Lennart Poettering [Fri, 15 Dec 2017 16:34:12 +0000 (17:34 +0100)]
main: move install_crash_handler() and mount_cgroup_controllers() invocations

Let's place them in initialize_runtime(), where they appear to fit best.
Effectively this is just a move a little bit down, swapping places with
log_execution_mode(), which should require neither call to be done
first.

Note that changes the conditionalization a bit for these calls, from
(PID == 1) to (arg_system && arg_action == ACTION_RUN). At this point this is pretty much the same
however, as we don't allow PID 1 without ACTION_RUN and without
arg_system set, safety_checks() ensures that.

6 years agocore: move arg_show_status fix-up into load_configuration()
Lennart Poettering [Fri, 15 Dec 2017 16:16:24 +0000 (17:16 +0100)]
core: move arg_show_status fix-up into load_configuration()

It's part of finalizing our runtime parameters, hence let's move this
into load_configuration() after we loaded everything else. This is safe,
since we don't use it between the location where it was and where we
place it now yet.