Yu Watanabe [Fri, 18 May 2018 08:34:59 +0000 (17:34 +0900)]
core: fix coding style
Yu Watanabe [Fri, 18 May 2018 04:29:26 +0000 (13:29 +0900)]
core: refuse StateDirectory=private
Follow-up for
e8865688735ba3bd34297fa89cca6bde7ba33997 (#9021).
Lennart Poettering [Thu, 17 May 2018 17:52:37 +0000 (19:52 +0200)]
tmpfiles: create /var/{lib,log,cache}/private during early boot
This directory is used by the DynamicUer= stuff when used in combination
with StateDirectory=/LogDirectory=/CacheDirectory=. Let's make sure the
dir exists early on with the right perms. This is not strictly necessary
as we'll also create the dir on demand if it is missing, but in the
interest of grabbing the name early on, and making things more explicit
let's also list this in a tmpfiles.d/ snippet.
Lennart Poettering [Thu, 17 May 2018 02:25:12 +0000 (22:25 -0400)]
core: refuse StateDirectory=private, as our internal DynamicUser=1 symlink is called that way
Let's better be safe than sorry.
Lennart Poettering [Thu, 17 May 2018 17:45:22 +0000 (10:45 -0700)]
Merge pull request #9017 from keszybz/man-coredump
coredump documention enhancement
Lennart Poettering [Thu, 17 May 2018 17:38:37 +0000 (10:38 -0700)]
Merge pull request #9002 from yuwata/fix-timedate
Fixes timedated and cleanups hostnamed
Lennart Poettering [Thu, 17 May 2018 17:07:56 +0000 (10:07 -0700)]
Merge pull request #9016 from yuwata/fix-policy
polkit policy related fixes
Zbigniew Jędrzejewski-Szmek [Sun, 13 May 2018 20:28:24 +0000 (22:28 +0200)]
Turn VALGRIND variable into a meson configuration switch
Configuration through environment variable is inconvenient with meson, because
they cannot be convieniently changed and/or are not preserved during
reconfiguration (https://github.com/mesonbuild/meson/issues/1503).
This adds -Dvalgrind=true/false, which has the advantage that it can be set
at any time with meson configure -Dvalgrind=... and ninja will rebuild targets
as necessary. Additional minor advantages are better consistency with the
options for hashmap debugging, and typo avoidance with '#if' instead of '#ifdef'.
Zbigniew Jędrzejewski-Szmek [Thu, 17 May 2018 15:08:31 +0000 (17:08 +0200)]
man: fix ProcessSizeMax= description, describe how to disable coredumps
What the man page said was different than what the code did.
save_external_coredump() will store the core temporarily for backtrace
generation, and will delete if afterwards if it is too large. So to disable
processing, it's necessary to both set
Storage=none/Storage=journal+JournalSizeMax=0/Storage=external+ExternalSizeMax=0
and ProcessSizeMax=0. This updates the man page to reflect the code.
The man pages are extended to describe that Storage=none + ProcessSizeMax=0 is
the simplest way to disable coredump processing. All the storage and processing
options make this quite complicated, so let's add a copy-and-pasteable example
of how to disable coredump. Doing it through coredump.conf has the advantage
that we still log, and the effect is immediate, unlike masking the sysconf
file.
Fixes #8788.
Yu Watanabe [Thu, 17 May 2018 14:56:40 +0000 (23:56 +0900)]
timedatectl: do not wrap polkit policy message
If messages are wrapped, then only the last line is shown in the
dialog, at least polkit gui for Xfce. It may be a bug of polkit or
Xfce. But it is not necessary to wrap the message in the policy
file. So, let's fix them.
Yu Watanabe [Thu, 17 May 2018 14:47:09 +0000 (23:47 +0900)]
core: systemd1.manage-unit-files policy implies systemd1.manage-units
This makes e.g. `systemctl enable --now` ask password only once.
Follow-up for
b07abe63d3abf03df559f7cb2c9863943df22274.
Zbigniew Jędrzejewski-Szmek [Thu, 17 May 2018 14:59:21 +0000 (16:59 +0200)]
coredump: properly treat Storage=none as disabled storage
Also don't attempt to create /var/lib/systemd/coredump if storage
limit is set to 0 and coredump processing is disabled.
Yu Watanabe [Tue, 15 May 2018 15:48:26 +0000 (00:48 +0900)]
core: systemd1.manage-unit-files policy implies systemd1.reload-daemon
Closes #5013.
Zbigniew Jędrzejewski-Szmek [Tue, 15 May 2018 19:56:50 +0000 (21:56 +0200)]
Merge pull request #9005 from fsateler/circular-deps
core: Fix some header dependencies
Felipe Sateler [Tue, 15 May 2018 18:17:34 +0000 (14:17 -0400)]
core: undo the dependency inversion between unit.h and all unit types
Felipe Sateler [Tue, 15 May 2018 18:12:22 +0000 (14:12 -0400)]
core: Break circular dependency between unit.h and cgroup.h
Milan Broz [Tue, 15 May 2018 14:51:07 +0000 (16:51 +0200)]
udev: create /dev/disk/by-label symlink for LUKS2 (#8998)
LUKS2 header supports to device label and blkid since 2.32 version
already supports this option.
Persistent udev storage rules should create symlink for this label.
For older devices this value is not set so changed rule should be compatible.
Yu Watanabe [Tue, 15 May 2018 13:53:19 +0000 (22:53 +0900)]
timedate: do not copy input string before bus_verify_polkit_async()
This fixes the commit
2c3def62144c9d689ddda88a866b1e623074eaae which
breaks `timedatectl set-timezone` called by non-privileged user.
Yu Watanabe [Tue, 15 May 2018 13:48:58 +0000 (22:48 +0900)]
hostname: use free_and_strdup()
Also, this makes hostnamed check the input strings before
bus_verify_polkit_async().
Yu Watanabe [Tue, 15 May 2018 11:44:15 +0000 (20:44 +0900)]
sysusers: drop an unused variable
Follow-up for
ec0327d69c260d9a3770e9d722dbdcde996651cc.
Alan Jenkins [Mon, 14 May 2018 14:45:09 +0000 (15:45 +0100)]
service: FileDescriptorStoreMax should also imply NotifyAccess
Commenting out "WatchdogTimeout=3min" in systemd-logind.service causes
NotifyAccess to go from "main" to "none", breaking support for logind
restart. Let's fix that.
Yu Watanabe [Tue, 15 May 2018 08:31:32 +0000 (17:31 +0900)]
bash-completion: add missing options and commands of timedatectl
Follow-up for
6129ec852ee470a3682d55f87852ee7ccabb5520.
Zbigniew Jędrzejewski-Szmek [Tue, 15 May 2018 06:58:33 +0000 (08:58 +0200)]
Merge pull request #8947 from yuwata/meson-0.44
meson: bump minimum required version to 0.44
Lucas Werkmeister [Fri, 11 May 2018 22:00:50 +0000 (00:00 +0200)]
man: fix reference in StandardOutput=
Since StandardOutput=file:path is more similar to StandardInput= than
StandardInputText=, and only StandardInput= is actually documented above
StandardOutput= whereas StandardInputText= is documented below it, I
assume the intention was to refer to the former.
Zbigniew Jędrzejewski-Szmek [Mon, 14 May 2018 06:10:46 +0000 (08:10 +0200)]
Merge pull request #8986 from yuwata/sd-bus-free-and-strdup
several cleanups
Yu Watanabe [Mon, 14 May 2018 05:14:17 +0000 (14:14 +0900)]
test: use _cleanup_hashmap_free_ instread of _cleanup_(hashmap_freep)
Yu Watanabe [Mon, 14 May 2018 05:13:57 +0000 (14:13 +0900)]
core: use _cleanup_set_free_ instread of _cleanup_(set_freep)
Yu Watanabe [Mon, 14 May 2018 05:09:03 +0000 (14:09 +0900)]
sd-bus: use free_and_strdup()
Zbigniew Jędrzejewski-Szmek [Sun, 13 May 2018 17:12:27 +0000 (19:12 +0200)]
Merge pull request #8968 from yuwata/bus-macro-2
bus-util: add several macros for defining functions of getting dbus properties
Yu Watanabe [Sun, 13 May 2018 13:10:48 +0000 (22:10 +0900)]
man: drop a trailing space
Yu Watanabe [Sun, 13 May 2018 13:09:18 +0000 (22:09 +0900)]
test: add tests for unit_name_from_dbus_path()
Zbigniew Jędrzejewski-Szmek [Sun, 13 May 2018 16:43:11 +0000 (18:43 +0200)]
Merge pull request #8962 from floppym/issue8905
basic: timezone_is_valid: check for magic bytes "TZif"
Yu Watanabe [Fri, 11 May 2018 09:29:39 +0000 (18:29 +0900)]
dbus-manager: introduce property_get_{hashmap,set}_size()
Yu Watanabe [Fri, 11 May 2018 09:12:12 +0000 (18:12 +0900)]
dbus-unit: check userdata before obtaining data
Yu Watanabe [Fri, 11 May 2018 09:11:18 +0000 (18:11 +0900)]
dbus-unit: use BUS_DEFINE_PROPERTY_GET* macros
Yu Watanabe [Fri, 11 May 2018 09:10:25 +0000 (18:10 +0900)]
dbus-swap: use BUS_DEFINE_PROPERTY_GET* macros
Yu Watanabe [Fri, 11 May 2018 09:10:03 +0000 (18:10 +0900)]
dbus-socket: use BUS_DEFINE_PROPERTY_GET* macros
Yu Watanabe [Fri, 11 May 2018 09:09:40 +0000 (18:09 +0900)]
dbus-mount: use BUS_DEFINE_PROPERTY_GET* macros
Yu Watanabe [Fri, 11 May 2018 09:09:15 +0000 (18:09 +0900)]
dbus-manager: use BUS_DEFINE_PROPERTY_GET* macros
Yu Watanabe [Fri, 11 May 2018 09:21:04 +0000 (18:21 +0900)]
dbus-execute: use BUS_DEFINE_PROPERTY_GET* macros
Yu Watanabe [Sun, 13 May 2018 03:20:51 +0000 (12:20 +0900)]
bus-util: add several macros for defining functions of getting dbus properties
Mike Gilbert [Sat, 12 May 2018 19:20:13 +0000 (15:20 -0400)]
basic: add log_level argument to timezone_is_valid
Zbigniew Jędrzejewski-Szmek [Sat, 12 May 2018 16:58:05 +0000 (18:58 +0200)]
Merge pull request #8959 from yuwata/bash-completion-analyze
bash-completion: update completion for systemd-analyze
Zbigniew Jędrzejewski-Szmek [Sat, 12 May 2018 16:48:58 +0000 (18:48 +0200)]
Merge pull request #8966 from yuwata/bus-resolve-fallback-dns
resolve: add bus property for fallback DNS servers
David Tardon [Fri, 11 May 2018 16:43:40 +0000 (18:43 +0200)]
core: use automatic cleanup more
Mikhail Kasimov [Sat, 12 May 2018 14:02:44 +0000 (17:02 +0300)]
po: uk: fixed missed word
updated uk-translation for 'network time synchronization' construction.
Danylo Korostil [Fri, 11 May 2018 21:16:26 +0000 (00:16 +0300)]
Updated uk translation
Mike Gilbert [Thu, 10 May 2018 19:10:48 +0000 (15:10 -0400)]
basic: timezone_is_valid: check for magic bytes "TZif"
Fixes: https://github.com/systemd/systemd/issues/8905
David Tardon [Wed, 9 May 2018 07:35:52 +0000 (09:35 +0200)]
systemd-analyze: make dump work for large # of units
If there is a large number of units, the size of the generated dump
string can overstep DBus message size limit. So let's pass that string
via a fd.
Philip Withnall [Fri, 11 May 2018 09:58:00 +0000 (10:58 +0100)]
man: Fix a minor typo in systemctl(1)
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Zbigniew Jędrzejewski-Szmek [Fri, 11 May 2018 09:48:05 +0000 (11:48 +0200)]
Merge pull request #8924 from yuwata/fix-3682
resolve: allow whitespaces in the digest
Zbigniew Jędrzejewski-Szmek [Fri, 11 May 2018 08:40:18 +0000 (10:40 +0200)]
Merge pull request #8961 from yuwata/fix-8960
network: make route_update() accept NULL
Yu Watanabe [Fri, 11 May 2018 07:12:57 +0000 (16:12 +0900)]
resolvectl: show current DNS server only when it is set
Yu Watanabe [Fri, 11 May 2018 07:12:17 +0000 (16:12 +0900)]
resolvectl: show fallback DNS servers by status command
Yu Watanabe [Fri, 11 May 2018 07:03:17 +0000 (16:03 +0900)]
resolve: introduce FallbackDNS bus property
This also makes DNS bus property not include the fallback DNS servers.
Yu Watanabe [Fri, 11 May 2018 06:43:04 +0000 (15:43 +0900)]
network: make route_update() accept NULL
This also fixes a wrong argument for route_configure().
Fixes #8960.
Yu Watanabe [Fri, 11 May 2018 03:36:15 +0000 (12:36 +0900)]
network: fix indentation
Lennart Poettering [Thu, 10 May 2018 18:29:11 +0000 (11:29 -0700)]
tmpfiles: remove newline that shouldn't be there
We should really keep "else" branches together with their "if", hence
drop the double newline here...
Lennart Poettering [Thu, 10 May 2018 18:28:33 +0000 (11:28 -0700)]
terminal-util: add a function that shows a pretty separator line
Follow-up for #8824
Yu Watanabe [Fri, 11 May 2018 06:01:35 +0000 (15:01 +0900)]
test: do not call alloca() inside the list of arguments
Lennart Poettering [Fri, 11 May 2018 05:51:17 +0000 (22:51 -0700)]
Merge pull request #8953 from yuwata/bus-macro
core: simplify dbus properties
Yu Watanabe [Thu, 10 May 2018 14:17:50 +0000 (23:17 +0900)]
test-execute: remove state directories before running tests
Fixes #8679.
Yu Watanabe [Thu, 10 May 2018 15:17:38 +0000 (00:17 +0900)]
units: set RestrictNamespaces=yes to networkd and resolved
Closes #8949.
Yu Watanabe [Fri, 11 May 2018 05:44:03 +0000 (14:44 +0900)]
sd-dhcp: drop deserialize_dhcp_option() as it is equivalent to unhexmem()
Yu Watanabe [Wed, 9 May 2018 03:50:27 +0000 (12:50 +0900)]
resolve: allow whitespaces in the DS digest or DNSKEY key data
Fixes #3682.
Yu Watanabe [Fri, 11 May 2018 04:56:28 +0000 (13:56 +0900)]
hexdecoct: drop an unnecessary check
Yu Watanabe [Fri, 11 May 2018 04:55:28 +0000 (13:55 +0900)]
basic: fix comment style
Yu Watanabe [Fri, 11 May 2018 05:36:22 +0000 (14:36 +0900)]
hexdecoct: ignore whitespace within the input hexadecimal text of unhexmem()
Joost Heitbrink [Thu, 10 May 2018 13:28:10 +0000 (15:28 +0200)]
test: add testcase for environment file variables with backslashes
systemd silently strips out backslashes in variables from environment
files. Add a testcase that explicitly tests for this behaviour.
Yu Watanabe [Fri, 11 May 2018 03:42:46 +0000 (12:42 +0900)]
Merge pull request #8964 from MikhailKasimov/patch-2
man: systemd-journal-upload: rsa 2048
Mikhail Kasimov [Thu, 10 May 2018 23:43:00 +0000 (02:43 +0300)]
Update systemd-journal-upload.service.xml
Security note on 2048 bits is added.
Mikhail Kasimov [Thu, 10 May 2018 23:17:27 +0000 (02:17 +0300)]
man: systemd-journal-upload: rsa 2048
rsa:2048 is currently in use as minimal recommended key length on cert/key generating. Specifying rsa:1024 is not recommended for security reasons.
Yu Watanabe [Thu, 10 May 2018 19:11:56 +0000 (04:11 +0900)]
bash-completion: analyze: support cat-config verb
Follow-up for
854a42fb2e9db1b9eaa381559d7671f2e9b3a0f1.
Yu Watanabe [Thu, 10 May 2018 18:33:55 +0000 (03:33 +0900)]
bash-completion: analyze: add --no-pager for some verbs
Lennart Poettering [Thu, 10 May 2018 18:14:23 +0000 (11:14 -0700)]
Merge pull request #8824 from keszybz/analyze-show-config
systemd-analyze show-config
Lennart Poettering [Tue, 24 Apr 2018 15:50:01 +0000 (17:50 +0200)]
mtd: some basic code cleanups
While looking at our exit() invocations I noticed that the mtd_probe
stuff uses 'exit(-1)' at various places, which is not really a good
idea, as exit codes of processes on Linux are supposed to be in the
range of 0…255.
This patch cleans that up a bit, and fixes a number of other things:
1. Let's always let main() exit, nothing intermediary. We generally
don't like code that invokes exit() on its own.
2. Close the file descriptors opened.
3. Some logging for errors is added, mostly on debug level.
Please review this with extra care. As I don't have the right hardware
to test this patch I only did superficial testing.
Susant Sahani [Sun, 29 Apr 2018 04:02:22 +0000 (09:32 +0530)]
Networkd tests: add bridge link properties to test
Test the "[Bridge]" section keys
```
[Bridge]
UnicastFlood=true
HairPin=true
UseBPDU=true
FastLeave=true
AllowPortToBeRoot=true
Cost=555
Priority=23
```
```
test_bridge_init (__main__.BridgeTest) ... ok
test_bridge_port_priority (__main__.BridgeTest) ... ok
test_bridge_port_priority_set_zero (__main__.BridgeTest)
It should be possible to set the bridge port priority to 0 ... ok
test_bridge_port_property (__main__.BridgeTest)
Test the "[Bridge]" section keys ... ok
```
Mikhail Kasimov [Thu, 10 May 2018 16:58:12 +0000 (19:58 +0300)]
man: journal-gatewayd.service: links on {rem,upl}
While set of systemd-journal-{gatewayd,remote,upload}.service services presents single subsystem on journald logs network transmission, systemd-journal-gatewayd.service description should also contain links to other parts of this subsystem: systemd-journal-remote.service and systemd-journal-upload.service.
Yu Watanabe [Thu, 10 May 2018 16:55:46 +0000 (01:55 +0900)]
string-util: rename strdash_if_empty() to empty_to_dash()
Yu Watanabe [Thu, 10 May 2018 16:47:33 +0000 (01:47 +0900)]
path-util: introduce empty_to_root() and use it many places
Yu Watanabe [Thu, 10 May 2018 16:41:06 +0000 (01:41 +0900)]
core: merge duplicated functions
Yu Watanabe [Thu, 10 May 2018 16:22:49 +0000 (01:22 +0900)]
core: send NULL instead of empty string
Yu Watanabe [Thu, 10 May 2018 15:39:52 +0000 (00:39 +0900)]
core: use offsetof() for Syslog{Level,Facility} dbus properties
Zbigniew Jędrzejewski-Szmek [Thu, 10 May 2018 15:23:40 +0000 (17:23 +0200)]
Merge pull request #8950 from dtardon/cleanup
use automatic cleanup more
Zbigniew Jędrzejewski-Szmek [Thu, 10 May 2018 07:01:22 +0000 (09:01 +0200)]
github: use multiple issue templates
Github now has issue templates in the web interface, and allows
more than one to be specified. Let's split our single template
in two: bug report and RFE.
Yu Watanabe [Thu, 10 May 2018 14:22:38 +0000 (23:22 +0900)]
Merge pull request #8943 from keszybz/coverity-fixes
Coverity fixes
Yu Watanabe [Thu, 10 May 2018 14:02:57 +0000 (23:02 +0900)]
core: use bus_property_get_*() functions instead of NULL
David Tardon [Thu, 10 May 2018 13:55:56 +0000 (15:55 +0200)]
sd-bus: use automatic cleanup more
Yu Watanabe [Thu, 10 May 2018 13:36:13 +0000 (22:36 +0900)]
core: drop property_get_syscall_errno()
Yu Watanabe [Thu, 10 May 2018 13:31:47 +0000 (22:31 +0900)]
core: drop property_get_{capability_bounding_set,ambient_capabilities}()
Yu Watanabe [Thu, 10 May 2018 13:26:59 +0000 (22:26 +0900)]
core: use BUS_DEFINE_PROPERTY_GET_ENUM() macro
Yu Watanabe [Thu, 10 May 2018 13:26:27 +0000 (22:26 +0900)]
core: drop 'bus_' prefix from bus_property_get_protect_{home,system}()
Yu Watanabe [Thu, 10 May 2018 13:25:00 +0000 (22:25 +0900)]
core: simplify property_get_cpu_affinity()
David Tardon [Thu, 10 May 2018 12:10:53 +0000 (14:10 +0200)]
basic: use automatic cleanup more
David Tardon [Thu, 10 May 2018 12:08:35 +0000 (14:08 +0200)]
basic: use automatic cleanup more
David Tardon [Thu, 10 May 2018 12:04:30 +0000 (14:04 +0200)]
basic: use automatic cleanup more
David Tardon [Thu, 10 May 2018 11:42:36 +0000 (13:42 +0200)]
journal: use automatic cleanup more
Yu Watanabe [Thu, 10 May 2018 05:54:21 +0000 (14:54 +0900)]
doc: mention the required minimum version of meson and python
Yu Watanabe [Wed, 2 May 2018 04:56:28 +0000 (13:56 +0900)]
meson: use array type option
Array type option is supported since 0.44.0.
Yu Watanabe [Thu, 10 May 2018 05:50:52 +0000 (14:50 +0900)]
meson: use warning() method
This bumps the required minimum version of meson to 0.44, as
`warning()` method is supported since 0.44.