Commit graph

31437 commits

Author SHA1 Message Date
Lennart Poettering bc6695ec7e analyze: correct help text where we take unit name arguments 2017-12-26 16:04:10 +01:00
Lennart Poettering 8486c92394 analyze: fix indentation in one case 2017-12-26 16:04:10 +01:00
Lennart Poettering 8efbce138a analyze: add some logging to some error cases 2017-12-26 16:04:10 +01:00
Lennart Poettering f72b7018d2 analyze: arg_host can be "const char*", hence make it so. 2017-12-26 16:04:10 +01:00
Lennart Poettering a6bcef2957 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.
2017-12-26 16:04:10 +01:00
Lennart Poettering dfde7e8c5b sd-daemon: use sockaddr_port() helper 2017-12-26 13:36:07 +01:00
Lennart Poettering f6aac5bf1b socket-util: clarify why sockaddr_port returns unsigned rather than uint16_t 2017-12-26 13:35:52 +01:00
Yu Watanabe 263195c6dd 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.
2017-12-26 12:12:36 +01:00
bleep_blop 7629744a3d separate flags from shebang 2017-12-25 19:48:49 +01:00
Yu Watanabe 977f65f01d sd-boot, udev: trivial condition simplifications
Reported and proposed by @dcb314.

Fixes #7656 and #7657.
2017-12-25 19:45:40 +01:00
Lennart Poettering aabe647d20
Merge pull request #7742 from poettering/meson-syscall
Meson syscall
2017-12-25 17:21:59 +01:00
Lennart Poettering 2acfd0ff43 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.
2017-12-25 12:35:43 +01:00
Lennart Poettering 7b961e40ee 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.
2017-12-25 12:35:28 +01:00
Lennart Poettering 3c042add1d 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.
2017-12-25 12:10:22 +01:00
Lennart Poettering 85db59b794 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.
2017-12-25 12:10:14 +01:00
Yu Watanabe 0e50bfaefd 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.
2017-12-25 11:42:42 +01:00
Lennart Poettering ebe6ff658d
Merge pull request #7663 from keszybz/mkdir-return-value
util-lib: fix return value in mkdir_parents()
2017-12-24 11:59:58 +01:00
Lennart Poettering 15ce164770 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
2017-12-24 08:47:24 +09:00
Lennart Poettering 7785da68e6
Merge pull request #7695 from yuwata/transient-socket
DBus-API: implement transient socket unit
2017-12-23 19:20:29 +01:00
Susant Sahani d384826f69 networkd: Add support for ipvlan L3s and flags (#7726)
This works supports to configure L3S mode and flags
such as bridge, private and vepa
2017-12-23 18:55:03 +01:00
Lennart Poettering 186d5f2e79
Merge pull request #7620 from keszybz/two-docs
Two docs
2017-12-23 12:40:48 +01:00
Lucas Werkmeister 053114090b man: mention StateDirectory in file-hierarchy(7) 2017-12-23 12:30:05 +01:00
Yu Watanabe 533f8a6771 load-fragment: simplify list insertion logic
LIST_FIND_TAIL and LIST_INSERT_AFTER can work for empty list.
2017-12-23 19:32:46 +09:00
Yu Watanabe 32048f5414 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.
2017-12-23 19:32:42 +09:00
Yu Watanabe 845001221d core/socket: shorten socket_fdname() 2017-12-23 19:32:40 +09:00
Yu Watanabe 827d9bf297 core/socket: dump more settings 2017-12-23 19:32:38 +09:00
Yu Watanabe 13ec20d42a dbus-cgroup: merge several blocks which operate almost same tasks 2017-12-23 19:32:36 +09:00
Yu Watanabe d6ff82d37c dbus-execute: use empty_to_null() where it can be applicable 2017-12-23 19:32:34 +09:00
Yu Watanabe f50ab33faf doc: add {Condition,Assert}ControlGroupController= to TRANSIENT-SETTINGS.md
Follow-up for e16647c39d.
2017-12-23 19:32:31 +09:00
Yu Watanabe d9f7305fd7 cgroup: move path checking logic to dbus-cgroup.c 2017-12-23 19:32:29 +09:00
Yu Watanabe 62b749a981 bus-unit-util: simplify bus_append_cgroup_property() 2017-12-23 19:32:27 +09:00
Yu Watanabe eae194a51b 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`.
2017-12-23 19:32:25 +09:00
Yu Watanabe b48e508db3 dbus-socket: move truncation check to bus_socket_set_transient_property() 2017-12-23 19:32:23 +09:00
Yu Watanabe e045e325df basic: introduce socket_protocol_{from,to}_name()
And use them where they can be applicable.
2017-12-23 19:32:04 +09:00
Yu Watanabe 8a211c8edb doc: update TRANSIENT-SETTINGS.md 2017-12-23 18:48:35 +09:00
Yu Watanabe 624dd00973 man: add explanation about transient path or socket units in systemd-run 2017-12-23 18:48:31 +09:00
Yu Watanabe d59ef3e243 run: add support to create transient path and socket unit 2017-12-23 18:48:27 +09:00
Yu Watanabe 89ada3ba08 bus-unit-util: add socket unit related options
Also, split bus_append_unit_property_assignment().
2017-12-23 18:48:16 +09:00
Yu Watanabe 9c0320e7ab core: implement transient socket unit 2017-12-23 18:47:33 +09:00
Yu Watanabe 398ce0bc5a socket-util: add socket_address_type_{from,to}_string() 2017-12-23 18:46:43 +09:00
Yu Watanabe 038ed5a4b6 core/socket: add socket_port_type_from_string() 2017-12-23 18:46:16 +09:00
Yu Watanabe 836bb1cd42 core:socket: fix string in socket_exec_command_table 2017-12-23 18:45:59 +09:00
Yu Watanabe 9ee896d5dd 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
2017-12-23 18:45:52 +09:00
Yu Watanabe 898748d8b9 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
2017-12-23 18:45:32 +09:00
Lennart Poettering 7e985c6983 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.
2017-12-23 08:47:55 +01:00
Dmitry Rozhkov 5526ac50fe 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.
2017-12-22 15:35:17 +01:00
Sylvain Plantefève fe25b1496b catalog: update french translation 2017-12-22 15:34:51 +01:00
Mathieu Malaterre 63d00dfb64 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!"
2017-12-22 15:30:03 +01:00
Yu Watanabe e1694a752f networkd: show warning on error or cast to void when error is ignored (#7716) 2017-12-21 19:07:23 +01:00
Michał 575cfb6227 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
2017-12-21 14:17:33 +01:00