platform/upstream/systemd.git
5 years agotty-ask-password-agent: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 14:24:07 +0000 (15:24 +0100)]
tty-ask-password-agent: define main through macro

5 years agosysv-generator: configure logging before use and define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 14:22:24 +0000 (15:22 +0100)]
sysv-generator: configure logging before use and define main through macro

5 years agostdio-bridge: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 14:20:28 +0000 (15:20 +0100)]
stdio-bridge: define main through macro

5 years agosleep: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 14:15:22 +0000 (15:15 +0100)]
sleep: define main through macro

5 years agoremount-fs: configure logging before use and define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 14:13:14 +0000 (15:13 +0100)]
remount-fs: configure logging before use and define main through macro

5 years agorandom-seed: configure logging before use and define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 14:06:40 +0000 (15:06 +0100)]
random-seed: configure logging before use and define main through macro

5 years agoquotacheck: configure logging before use and define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:57:46 +0000 (14:57 +0100)]
quotacheck: configure logging before use and define main through macro

5 years agoportabled: add missing STOPPING=1 notification
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:56:59 +0000 (14:56 +0100)]
portabled: add missing STOPPING=1 notification

5 years agoportabled: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:56:15 +0000 (14:56 +0100)]
portabled: define main through macro

5 years agopath: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:54:20 +0000 (14:54 +0100)]
path: define main through macro

5 years agomakefs: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:52:25 +0000 (14:52 +0100)]
makefs: define main through macro

5 years agonotify: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:50:29 +0000 (14:50 +0100)]
notify: define main through macro

5 years agomachined: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:44:14 +0000 (14:44 +0100)]
machined: define main through macro

5 years agouser-runtime-dir: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:42:39 +0000 (14:42 +0100)]
user-runtime-dir: define main through macro

5 years agologind: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:41:08 +0000 (14:41 +0100)]
logind: define main through macro

5 years agoinhibit: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:37:13 +0000 (14:37 +0100)]
inhibit: define main through macro

5 years agocat: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:34:57 +0000 (14:34 +0100)]
cat: define main through macro

5 years agoimport: define mains through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 11:25:43 +0000 (12:25 +0100)]
import: define mains through macro

5 years agoid128: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 11:15:35 +0000 (12:15 +0100)]
id128: define main through macro

5 years agohwdb: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 11:13:28 +0000 (12:13 +0100)]
hwdb: define main through macro

5 years agohostnamectl: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 10:23:02 +0000 (11:23 +0100)]
hostnamectl: define main through macro

5 years agofsck: configure logging before use and define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 10:14:16 +0000 (11:14 +0100)]
fsck: configure logging before use and define main through macro

There's a slight change in logic: before, when rebooting the machine, we could
also request quotacheck (by touching /run/systemd/quotacheck) if the fsck
helper set FSCK_ERROR_CORRECTED.  This is just a race, and doesn't matter much
in practice.

5 years agoescape: use free_and_replace
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 09:59:29 +0000 (10:59 +0100)]
escape: use free_and_replace

5 years agoescape: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 09:58:36 +0000 (10:58 +0100)]
escape: define main through macro

5 years agodetect-virt: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 09:53:47 +0000 (10:53 +0100)]
detect-virt: define main through macro

5 years agocoredump: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 09:49:30 +0000 (10:49 +0100)]
coredump: define main through macro

5 years agoboot-check-no-failures: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 09:44:36 +0000 (10:44 +0100)]
boot-check-no-failures: define main through macro

5 years agoac-power: define main through macro
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 09:39:57 +0000 (10:39 +0100)]
ac-power: define main through macro

I decided to use a separate definition for this because it's too easy to return
positive from functions which don't need this distinction and only return
negative on error and success otherwise.

5 years agoIntroduce main definer and use it in cgtop
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 09:28:36 +0000 (10:28 +0100)]
Introduce main definer and use it in cgtop

This actually fixes one bogus return code in error path.

5 years agoupdate TODO
Lennart Poettering [Thu, 15 Nov 2018 20:20:42 +0000 (21:20 +0100)]
update TODO

5 years agocgroup-util: when attaching/creating cgroups in multiple hierarchies, take jointly...
Lennart Poettering [Thu, 15 Nov 2018 20:16:57 +0000 (21:16 +0100)]
cgroup-util: when attaching/creating cgroups in multiple hierarchies, take jointly mounted controlelrs into account

If we create a cgroup in one controller it might already have been
created in another too, if we have jointly mounted controllers. Take
that into consideration.

5 years agocgroup: when determining which controllers we need, always extend the mask according...
Lennart Poettering [Thu, 15 Nov 2018 20:15:19 +0000 (21:15 +0100)]
cgroup: when determining which controllers we need, always extend the mask according to cpu/cpuacct joint mounting

Note that for cgroup_context_get_mask() this doesn't actually change
much, but it does prepare the ground for #10507 later on.

5 years agocgroup: add new helper that knows which controllers are mounted together
Lennart Poettering [Thu, 15 Nov 2018 20:14:54 +0000 (21:14 +0100)]
cgroup: add new helper that knows which controllers are mounted together

5 years agocore: remove JoinControllers= configuration setting
Lennart Poettering [Thu, 15 Nov 2018 20:07:43 +0000 (21:07 +0100)]
core: remove JoinControllers= configuration setting

This removes the ability to configure which cgroup controllers to mount
together. Instead, we'll now hardcode that "cpu" and "cpuacct" are
mounted together as well as "net_cls" and "net_prio".

The concept of mounting controllers together has no future as it does
not exist to cgroupsv2. Moreover, the current logic is systematically
broken, as revealed by the discussions in #10507. Also, we surveyed Red
Hat customers and couldn't find a single user of the concept (which
isn't particularly surprising, as it is broken...)

This reduced the (already way too complex) cgroup handling for us, since
we now know whenever we make a change to a cgroup for one controller to
which other controllers it applies.

5 years agocore: fix capitalization of CPUShares= settings
Lennart Poettering [Thu, 15 Nov 2018 19:09:03 +0000 (20:09 +0100)]
core: fix capitalization of CPUShares= settings

5 years agocgtop: use FOREACH_STRING() for fun and profit
Lennart Poettering [Thu, 15 Nov 2018 19:08:17 +0000 (20:08 +0100)]
cgtop: use FOREACH_STRING() for fun and profit

5 years agocgtop: use automatic clean-up
Lennart Poettering [Thu, 15 Nov 2018 19:07:45 +0000 (20:07 +0100)]
cgtop: use automatic clean-up

5 years agosd-bus: make strict asan shut up
Lennart Poettering [Fri, 16 Nov 2018 12:00:40 +0000 (13:00 +0100)]
sd-bus: make strict asan shut up

asan doesn't like it if we use strndup() (i.e. a string function) on a
non-NULL terminated buffer (i.e. something that isn't really a string).

Let's hence use memdup_suffix0() instead of strndup(), which is more
appropriate for binary data that is to become a string.

Fixes: #10385

5 years agoMerge pull request #10795 from poettering/generator-fixes
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:30:53 +0000 (14:30 +0100)]
Merge pull request #10795 from poettering/generator-fixes

trivial fixes to some generators

5 years agoMerge pull request #10796 from poettering/systemd-exit-service-fixes
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 13:29:20 +0000 (14:29 +0100)]
Merge pull request #10796 from poettering/systemd-exit-service-fixes

units: corrections for systemd-exit.service

5 years agoMerge pull request #10791 from keszybz/sd-event-get-enabled
Lennart Poettering [Fri, 16 Nov 2018 11:46:30 +0000 (12:46 +0100)]
Merge pull request #10791 from keszybz/sd-event-get-enabled

Some minor tweaks for sd_event_source_get_enabled

5 years agotest: initialize syslog_fd in fuzz-journald-kmsg too
Evgeny Vereshchagin [Fri, 16 Nov 2018 08:23:53 +0000 (09:23 +0100)]
test: initialize syslog_fd in fuzz-journald-kmsg too

This is a follow-up to 8857fb9beb9dcb that prevents the fuzzer from crashing with
```
==220==ERROR: AddressSanitizer: ABRT on unknown address 0x0000000000dc (pc 0x7ff4953c8428 bp 0x7ffcf66ec290 sp 0x7ffcf66ec128 T0)
SCARINESS: 10 (signal)
    #0 0x7ff4953c8427 in gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35427)
    #1 0x7ff4953ca029 in abort (/lib/x86_64-linux-gnu/libc.so.6+0x37029)
    #2 0x7ff49666503a in log_assert_failed_realm /work/build/../../src/systemd/src/basic/log.c:805:9
    #3 0x7ff496614ecf in safe_close /work/build/../../src/systemd/src/basic/fd-util.c:66:17
    #4 0x548806 in server_done /work/build/../../src/systemd/src/journal/journald-server.c:2064:9
    #5 0x5349fa in LLVMFuzzerTestOneInput /work/build/../../src/systemd/src/fuzz/fuzz-journald-kmsg.c:26:9
    #6 0x592755 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:571:15
    #7 0x590627 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/libfuzzer/FuzzerLoop.cpp:480:3
    #8 0x594432 in fuzzer::Fuzzer::MutateAndTestOne() /src/libfuzzer/FuzzerLoop.cpp:708:19
    #9 0x5973c6 in fuzzer::Fuzzer::Loop(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, fuzzer::fuzzer_allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) /src/libfuzzer/FuzzerLoop.cpp:839:5
    #10 0x574541 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:764:6
    #11 0x5675fc in main /src/libfuzzer/FuzzerMain.cpp:20:10
    #12 0x7ff4953b382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #13 0x420f58 in _start (/out/fuzz-journald-kmsg+0x420f58)
```

5 years agounits: fix Description= of systemd-exit.service
Lennart Poettering [Fri, 16 Nov 2018 10:39:27 +0000 (11:39 +0100)]
units: fix Description= of systemd-exit.service

This file was probably copied from the --user version, let's use some
more appropriate wording for the --system version.

5 years agounits: use correct command to exit
Lennart Poettering [Fri, 16 Nov 2018 10:35:59 +0000 (11:35 +0100)]
units: use correct command to exit

Otherwise we'll end a cyclic loop.

5 years agounits: add the same ordering deps for systemd-exit.service as for systemd-poweroff...
Lennart Poettering [Fri, 16 Nov 2018 10:34:47 +0000 (11:34 +0100)]
units: add the same ordering deps for systemd-exit.service as for systemd-poweroff.service and friends

This stuff runs in containers, and should really behave the same
everywhere.

5 years agocore: show error code even when debug logging
Lennart Poettering [Fri, 16 Nov 2018 10:43:49 +0000 (11:43 +0100)]
core: show error code even when debug logging

5 years agohibernate-resume-generator: fix minor memory leak on error path
Lennart Poettering [Thu, 15 Nov 2018 21:29:23 +0000 (22:29 +0100)]
hibernate-resume-generator: fix minor memory leak on error path

5 years agodebug-generator: fix minor memory leak
Lennart Poettering [Thu, 15 Nov 2018 21:28:58 +0000 (22:28 +0100)]
debug-generator: fix minor memory leak

5 years agoudev-util: read resolve_names from udev.conf
Yu Watanabe [Fri, 16 Nov 2018 07:02:32 +0000 (16:02 +0900)]
udev-util: read resolve_names from udev.conf

Fixes CID#1396866.

5 years agoMerge pull request #10788 from evverx/fuzz-kmsg
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 08:08:38 +0000 (09:08 +0100)]
Merge pull request #10788 from evverx/fuzz-kmsg

tests: add a fuzzer for dev_kmsg_record

5 years agojournal: simplify use of sd_event_source_get_enabled()
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 07:54:36 +0000 (08:54 +0100)]
journal: simplify use of sd_event_source_get_enabled()

5 years agojournal-file: get rid of a helper variable
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 07:51:17 +0000 (08:51 +0100)]
journal-file: get rid of a helper variable

It doesn't really save much in code length. Having the event source named
explicitly makes it easier to understand the code at a glance.

5 years agosd-event: make sd_event_source_get_enabled return more info
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 07:43:43 +0000 (08:43 +0100)]
sd-event: make sd_event_source_get_enabled return more info

5 years agosd-event: do not use assert_return for something that is not an error
Zbigniew Jędrzejewski-Szmek [Fri, 16 Nov 2018 06:37:59 +0000 (07:37 +0100)]
sd-event: do not use assert_return for something that is not an error

It's totally OK for description to be unset, so let's not log about this
even at debug level.

5 years agotests: add a reproducer for a heap-buffer-overflow fixed in 937b1171378bc1000a
Evgeny Vereshchagin [Fri, 16 Nov 2018 06:33:02 +0000 (07:33 +0100)]
tests: add a reproducer for a heap-buffer-overflow fixed in 937b1171378bc1000a

5 years agotests: add a reproducer for a memory leak fixed in 30eddcd51b8a472e05d3b8d1 in August
Evgeny Vereshchagin [Fri, 16 Nov 2018 06:20:44 +0000 (07:20 +0100)]
tests: add a reproducer for a memory leak fixed in 30eddcd51b8a472e05d3b8d1 in August

5 years agojournal: fix an off-by-one error in dev_kmsg_record
Evgeny Vereshchagin [Fri, 16 Nov 2018 06:11:06 +0000 (07:11 +0100)]
journal: fix an off-by-one error in dev_kmsg_record

5 years agobasic: remove an assertion from cunescape_one
Evgeny Vereshchagin [Fri, 16 Nov 2018 06:05:29 +0000 (07:05 +0100)]
basic: remove an assertion from cunescape_one

The function takes a pointer to a random block of memory and
the length of that block. It shouldn't crash every time it sees
a zero byte at the beginning there.

This should help the dev-kmsg fuzzer to keep going.

5 years agotests: add a fuzzer for dev_kmsg_record
Evgeny Vereshchagin [Thu, 15 Nov 2018 16:52:57 +0000 (17:52 +0100)]
tests: add a fuzzer for dev_kmsg_record

5 years agoudev-rules: fix possible assertion
Yu Watanabe [Thu, 15 Nov 2018 09:46:23 +0000 (18:46 +0900)]
udev-rules: fix possible assertion

On 'remove' action, event->dev_db_clone is NULL. So, `IMPORT{db}` rule
on 'remove' action triggers assertion. This fixes the issue.

5 years agoRevert "units: lock down logind with fs namespacing options"
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 16:03:33 +0000 (17:03 +0100)]
Revert "units: lock down logind with fs namespacing options"

5 years agobasic/json: silence gcc warning about limited range of data type
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2018 13:50:07 +0000 (14:50 +0100)]
basic/json: silence gcc warning about limited range of data type

With gcc-7.1.1-3.fc26.aarch64:
../src/basic/json.c: In function ‘json_format’:
../src/basic/json.c:1409:40: warning: comparison is always true due to limited range of data type [-Wtype-limits]
                                 if (*q >= 0 && *q < ' ')
                                        ^~
../src/basic/json.c: In function ‘inc_lines_columns’:
../src/basic/json.c:1762:31: warning: comparison is always true due to limited range of data type [-Wtype-limits]
                 } else if (*s >= 0 && *s < 127) /* Process ASCII chars quickly */
                               ^~

Cast to (signed char) silences the warning, but a cast to (int) for some reason
doesn't.

5 years agoMerge pull request #10742 from poettering/c-utf8
Zbigniew Jędrzejewski-Szmek [Thu, 15 Nov 2018 11:47:17 +0000 (12:47 +0100)]
Merge pull request #10742 from poettering/c-utf8

default to C.UTF-8 locale, and many improvements to env var file parsing/kernel cmdline parsing

5 years agoMerge pull request #10753 from keszybz/pager-no-interrupt
Lennart Poettering [Wed, 14 Nov 2018 19:09:39 +0000 (20:09 +0100)]
Merge pull request #10753 from keszybz/pager-no-interrupt

Add mode in journalctl where ^C is handled by the pager

5 years agocore: drop dbus queue recursion check
Lennart Poettering [Wed, 14 Nov 2018 12:00:12 +0000 (13:00 +0100)]
core: drop dbus queue recursion check

We don't dispatch the queue recursively anymore, hence let's simplify
things a bit.

As pointed out by @fbuihuu:

https://github.com/systemd/systemd/pull/10763#discussion_r233209550

5 years agotests: add some tests for cmdline args containing spaces
Lennart Poettering [Wed, 14 Nov 2018 16:22:18 +0000 (17:22 +0100)]
tests: add some tests for cmdline args containing spaces

5 years agoupdate NEWS
Lennart Poettering [Mon, 12 Nov 2018 16:00:32 +0000 (17:00 +0100)]
update NEWS

5 years agoupdate TODO
Lennart Poettering [Mon, 12 Nov 2018 12:19:07 +0000 (13:19 +0100)]
update TODO

5 years agolocale-util: introduce common helper locale_variables_free() for freeing locale varia...
Lennart Poettering [Mon, 12 Nov 2018 15:50:58 +0000 (16:50 +0100)]
locale-util: introduce common helper locale_variables_free() for freeing locale variable arrays

5 years agofileio: automatically add NULL sentinel to parse_env_file()
Lennart Poettering [Mon, 12 Nov 2018 13:18:03 +0000 (14:18 +0100)]
fileio: automatically add NULL sentinel to parse_env_file()

Let's modernize things a bit.

5 years agolocaled: be more careful with the used types
Lennart Poettering [Mon, 12 Nov 2018 13:06:22 +0000 (14:06 +0100)]
localed: be more careful with the used types

5 years agofileio: drop "newline" parameter for env file parsers
Lennart Poettering [Mon, 12 Nov 2018 13:04:47 +0000 (14:04 +0100)]
fileio: drop "newline" parameter for env file parsers

Now that we don't (mis-)use the env file parser to parse kernel command
lines there's no need anymore to override the used newline character
set. Let's hence drop the argument and just "\n\r" always. This nicely
simplifies our code.

5 years agotree-wide: replace all remaining uses of parse_env_file() for parsing /proc/cmdline
Lennart Poettering [Mon, 12 Nov 2018 12:49:20 +0000 (13:49 +0100)]
tree-wide: replace all remaining uses of parse_env_file() for parsing /proc/cmdline

Let's always go through the proc-cmdline.c APIs.

5 years agolocaled: no need to log twice about reload requests
Lennart Poettering [Mon, 12 Nov 2018 12:23:51 +0000 (13:23 +0100)]
localed: no need to log twice about reload requests

5 years agolocaled: show proper bus error if we can in log message
Lennart Poettering [Mon, 12 Nov 2018 12:22:48 +0000 (13:22 +0100)]
localed: show proper bus error if we can in log message

5 years agolocaled: don't silently eat up errors, log something
Lennart Poettering [Mon, 12 Nov 2018 12:22:36 +0000 (13:22 +0100)]
localed: don't silently eat up errors, log something

5 years agolocale-setup: default to C.UTF-8
Lennart Poettering [Mon, 12 Nov 2018 12:12:39 +0000 (13:12 +0100)]
locale-setup: default to C.UTF-8

Most distributions already were shipping a C.UTF-8 locale and even Fedora
now supports the C.UTF-8 locale, and there's clear indication that this
is going upstream too. Hence, let's default to it now too, if nothing
else is set.

Note that this is only a fallback if noting else is set, and since
distros generally configure a default for this behaviour shouldn't
really change in installed systems.

On new systems this makes vconsole.conf redundant.

5 years agolocale-setup: rework to use new proc_cmdline_get_key_many() API
Lennart Poettering [Mon, 12 Nov 2018 11:53:28 +0000 (12:53 +0100)]
locale-setup: rework to use new proc_cmdline_get_key_many() API

This way we use the same code to access /proc/cmdline as everywhere
else, and thus support it in containers and the SYSTEMD_PROC_CMDLINE env
var.

5 years agolocale-setup: use precise type for locale variable iterator
Lennart Poettering [Mon, 12 Nov 2018 11:51:23 +0000 (12:51 +0100)]
locale-setup: use precise type for locale variable iterator

5 years agolocale-setup: use _cleanup_strv_free_
Lennart Poettering [Mon, 12 Nov 2018 11:50:06 +0000 (12:50 +0100)]
locale-setup: use _cleanup_strv_free_

5 years agoproc-cmdline: introduce new proc_cmdline_get_key_many() helper
Lennart Poettering [Mon, 12 Nov 2018 11:41:23 +0000 (12:41 +0100)]
proc-cmdline: introduce new proc_cmdline_get_key_many() helper

This is like parse_env_file(), but from the kernel command line

5 years agoproc-cmdline: split out rd. prefix handling in proc_cmdline_parse_given() and proc_cm...
Lennart Poettering [Mon, 12 Nov 2018 11:39:34 +0000 (12:39 +0100)]
proc-cmdline: split out rd. prefix handling in proc_cmdline_parse_given() and proc_cmdline_get_key()

This introduces a wrapper around extrac_first_word() called
proc_cmdline_extract_first(), which suppresses "rd." parameters
depending on the specified calls.

This allows us to share more code between proc_cmdline_parse_given() and
proc_cmdline_get_key(), and makes it easier to reuse this logic for
other purposes.

5 years agoman: use <keycombo> more
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 15:57:33 +0000 (16:57 +0100)]
man: use <keycombo> more

5 years agobasic/pager: ignore ^C when piping to less and K is not set
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 18:04:00 +0000 (19:04 +0100)]
basic/pager: ignore ^C when piping to less and K is not set

Normally, we want to immediately quit on ^C. But when we are running under
less, people may set SYSTEMD_LESS without K, in which case they can use ^C to
communicate with less, and e.g. start and stop following input.

Fixes #6405.

5 years agobasic/cgroup-util: remove two unnecessary includes
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 17:43:44 +0000 (18:43 +0100)]
basic/cgroup-util: remove two unnecessary includes

5 years agoMove LONG_LINE_MAX definition to fileio.h
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 17:39:39 +0000 (18:39 +0100)]
Move LONG_LINE_MAX definition to fileio.h

All users of the macro (except for one, in serialize.c), use the macro in
connection with read_line(), so they must include fileio.h.  Let's not play
libc games and require multiple header file to be included for the most common
use of a function.

The removal of def.h includes is not exact. I mostly went over the commits that
switch over to use read_line() and add def.h at the same time and reverted the
addition of def.h in those files.

5 years agobasic/pager: convert the pager options to a flags argument
Zbigniew Jędrzejewski-Szmek [Sun, 11 Nov 2018 11:56:29 +0000 (12:56 +0100)]
basic/pager: convert the pager options to a flags argument

Pretty much everything uses just the first argument, and this doesn't make this
common pattern more complicated, but makes it simpler to pass multiple options.

5 years agoproc-cmdline: turn flags parameter into a proper typedef'ed enum
Lennart Poettering [Mon, 12 Nov 2018 10:58:58 +0000 (11:58 +0100)]
proc-cmdline: turn flags parameter into a proper typedef'ed enum

Let's add some extra typesafety.

5 years agoMerge pull request #10759 from keszybz/udevd-more-configuration
Lennart Poettering [Wed, 14 Nov 2018 15:21:14 +0000 (16:21 +0100)]
Merge pull request #10759 from keszybz/udevd-more-configuration

Udevd more configuration options

5 years agotravis: use double the normal timeout in the ASan & UBSan stage
Evgeny Vereshchagin [Wed, 14 Nov 2018 09:38:59 +0000 (10:38 +0100)]
travis: use double the normal timeout in the ASan & UBSan stage

This should somewhat address https://github.com/systemd/systemd/issues/10696.

5 years agoMerge pull request #10747 from poettering/machinectl-list-fix
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 11:47:56 +0000 (12:47 +0100)]
Merge pull request #10747 from poettering/machinectl-list-fix

properly acquire os-release file from containers

5 years agoMerge pull request #10763 from poettering/pending-reload-fix
Zbigniew Jędrzejewski-Szmek [Wed, 14 Nov 2018 09:44:50 +0000 (10:44 +0100)]
Merge pull request #10763 from poettering/pending-reload-fix

when reloading, don't throttle unit/job dbus change signal generation

5 years agojson: decrease DEPTH_MAX to 4k
Yu Watanabe [Tue, 13 Nov 2018 00:05:59 +0000 (09:05 +0900)]
json: decrease DEPTH_MAX to 4k

This makes DEPTH_MAX lower value, as test-json fails with stack
overflow.

Note that the test can pass with 8k, but for safety, here set to 4k.

Fixes #10738.

5 years agohwdb: Add accelerometer orientation quirk for the Chuwi CoreBook tablet
Ruben Suarez Alvarez [Wed, 14 Nov 2018 07:18:23 +0000 (08:18 +0100)]
hwdb: Add accelerometer orientation quirk for the Chuwi CoreBook tablet

5 years agotravis: also compile and run unsafe unit tests
Evgeny Vereshchagin [Wed, 14 Nov 2018 06:41:06 +0000 (07:41 +0100)]
travis: also compile and run unsafe unit tests

5 years agohwdb: Add Onda V820w accelerometer transformation matrix
jambonmcyeah [Wed, 14 Nov 2018 03:03:21 +0000 (22:03 -0500)]
hwdb: Add Onda V820w accelerometer transformation matrix

Added accelerometer transformation matrix for the Onda V820w Tablet

5 years agounit: don't claim there was no IP traffic generated by a unit when we don't know
Lennart Poettering [Tue, 13 Nov 2018 19:51:31 +0000 (20:51 +0100)]
unit: don't claim there was no IP traffic generated by a unit when we don't know

Only if we have some IP traffic accounting at all we should claim that.

5 years agocore: split out audit message generation from unit_notify()
Lennart Poettering [Tue, 13 Nov 2018 19:59:20 +0000 (20:59 +0100)]
core: split out audit message generation from unit_notify()

Just some refactoring, no change in behaviour.

5 years agoman: document that env vars are not suitable for passing secrets
Lennart Poettering [Tue, 13 Nov 2018 22:09:32 +0000 (23:09 +0100)]
man: document that env vars are not suitable for passing secrets

Prompted by the thread around:

https://lists.freedesktop.org/archives/systemd-devel/2018-November/041665.html

5 years agoupdate TODO
Lennart Poettering [Tue, 13 Nov 2018 22:05:36 +0000 (23:05 +0100)]
update TODO