summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* hexdecoct: ignore whitespace within the input hexadecimal text of unhexmem()Yu Watanabe2018-08-24
|
* terminal-util: add a function that shows a pretty separator lineLennart Poettering2018-08-24
| | | | Follow-up for #8824
* string-util: rename strdash_if_empty() to empty_to_dash()Yu Watanabe2018-08-24
|
* path-util: introduce empty_to_root() and use it many placesYu Watanabe2018-08-24
|
* basic/terminal-util: fix output of files without a final newlineZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | If the main config file or one of the drop-ins did not have the final newline, there would be no seperating empty line (or if this was the last file displayed, our own output would end without the final newline, possibly running into the subsequent prompt or such). copy_bytes() does not know anything about lines, so let's just use a normal loop with read_line() and puts().
* analyze: add --root option for cat-configZbigniew Jędrzejewski-Szmek2018-08-24
|
* sysusers: add --cat-configZbigniew Jędrzejewski-Szmek2018-08-24
|
* tmpfiles: add --cat-configZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | This implements similar logic as conf_files_cat(), but with slightly different file gathering logic. I also want to add support for replacement files later on, so it seems better to keep those two file-gathering functions separate.
* analyze: add 'cat-config' verbZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is used as 'systemd-analyze show-config systemd/logind.conf', which will dump /etc/systemd/system/user@.service /etc/systemd/system/user@.service.d/*.conf /run/systemd/system/user@.service.d/*.conf /usr/local/lib/systemd/system/user@.service.d/*.conf /usr/lib/systemd/system/user@.service.d/*.conf The idea is to make it easy to dump the configuration using the same locations and order that systemd programs use themselves (including masking, in the right order, etc.). This is the generic variant that works with any configuration scheme that follows the same general rules: $ systemd-analyze cat-config systemd/system.conf $ systemd-analyze cat-config systemd/user.conf $ systemd-analyze cat-config systemd/logind.conf $ systemd-analyze cat-config systemd/sleep.conf $ systemd-analyze cat-config systemd/journald.conf $ systemd-analyze cat-config systemd/journal-remote.conf $ systemd-analyze cat-config systemd/journal-upload.conf $ systemd-analyze cat-config systemd/coredump.conf $ systemd-analyze cat-config systemd/resolved.conf $ systemd-analyze cat-config systemd/timesyncd.conf $ systemd-analyze cat-config udev/udev.conf
* Move function to cat file & dropins into basic/Zbigniew Jędrzejewski-Szmek2018-08-24
| | | | | This fixes a buglet where the second and later drop-in would not be seperated properly by a newline.
* sd-bus: use automatic cleanup moreDavid Tardon2018-08-24
|
* basic: use automatic cleanup moreDavid Tardon2018-08-24
|
* basic: use automatic cleanup moreDavid Tardon2018-08-24
|
* core/mount-setup: remove part of check which is always trueZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | k was set to join_controllers at this point and only incremented, so it cannot be null at this point. CID #1390949.
* basic/fs-util: remove logically dead codeZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | We can jump to chase_one from two places. In the first 'todo' is set to 'buffer', which comes from path_make_absolute_cwd() and is nonnull In the second 'todo' is set to 'joined' which is checked to be nonull a few lines above the jump. So let's kill the code that deals with null todo there. CID #1390941.
* logind: fix borked r checkZbigniew Jędrzejewski-Szmek2018-08-24
| | | | CID #1390947, #1390952.
* basic/format-table: add missing va_end()Zbigniew Jędrzejewski-Szmek2018-08-24
| | | | CID #1390930, #1390940.
* shared/sleep-config: fix memleak of strv, add testZbigniew Jędrzejewski-Szmek2018-08-24
| | | | CID #1390921, #1390951.
* conf-parser: accept trailing backslash at the end of the file (#8941)Filipe Brandenburger2018-08-24
| | | | | | | | | | This makes it behave the same whether there is a blank line or not at the end of the file. This is also consistent with the behavior of the shell on a shell script that ends on a trailing backslash at the last line. Added tests to test_config_parse(), which only pass if the corresponding change to config_parse() is included.
* meson: recompile all sources for install_libudev_static and ↵Zbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | install_libsystemd_static This means that when those targets are built, all the sources are built again, instead of reusing the work done to create libbasic.a and other convenience static libraries. It would be nice to not do this, but there seems to be no support in our toolchain for joining multiple static libraries into one. When linking a static library, any -l arguments are simply ignored by ar/gcc-ar, and .a libraries given as positional arguments are copied verbatim into the archive so they objects in them cannot be accessed. https://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries suggests either unzipping all the archives and putting them back togather, or using a linker script. Unzipping and zipping back together seems ugly. The other option is not very nice. The linker script language does not allow "+" to appear in the filenames, and filenames that meson generates use that, so files would have to be renamed before a linker script was used. And we would have to generate the linker script on the fly. Either way, this doesn't seem attractive. Since those static libraries are a niche use case, it seems reasonable to just go with the easiest and safest solution and recompile all the source files. Thanks to ccache, this is probably almost as cheap as actually reusing the convenience .a libraries. test-libsystemd-sym.c and test-libudev-sym.c compile fine with the generated static libs, so it seems that they indeed provide all the symbols they should.
* meson: add support for building static libsystemd and libudevDavide Cavalca2018-08-24
|
* tree-wide: use strv_free_and_replace() macroYu Watanabe2018-08-24
|
* time-util: fix indentation for commentsYu Watanabe2018-08-24
|
* sd-bus: add bus_freep and use _cleanup_Zbigniew Jędrzejewski-Szmek2018-08-24
|
* sd-bus: use automatic cleanup moreZbigniew Jędrzejewski-Szmek2018-08-24
|
* sd-bus: trivial simplificationZbigniew Jędrzejewski-Szmek2018-08-24
|
* use max. message size allowed by DBus spec (#8936)David Tardon2018-08-24
| | | | C.f. https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages.
* bus-util: print a friendly message when PID1 is not systemdYu Watanabe2018-08-24
| | | | | | Follow-up for 861f16d2679eeda79e8185057cef24653913e300. Fixes #8913.
* login: do not wall message on cancelling shutdown when ↵Yu Watanabe2018-08-24
| | | | | | Manager.enable_wall_messages is false Fixes #8904.
* login: change variable type of enable_wall_messages as it matches ↵Yu Watanabe2018-08-24
| | | | Manager.enable_wall_messages
* meson: generate m4 preprocessor from config.h (#8914)Yu Watanabe2018-08-24
|
* test: add tests for signal_from_string()Yu Watanabe2018-08-24
|
* util: rename signal_from_string_try_harder() to signal_from_string()Yu Watanabe2018-08-24
| | | | | Also this makes the new `signal_from_string()` function reject e.g, `SIG3` or `SIG+5`.
* util: make signal_from_string() accept RTMIN, RTMAX, and RTMAX-nYu Watanabe2018-08-24
| | | | | | | | | | Before this, `signal_from_string()` accepts simple signal name or RTMIN+n. This makes the function also accept RTMIN, RTMAX, and RTMAX-n. Note that RTMIN+0 is equivalent to RTMIN, and RTMAX-0 is to RTMAX. This also fixes the integer overflow reported by oss-fuzz #8064. https://oss-fuzz.com/v2/testcase-detail/5648573352902656
* virt: simplificationsLennart Poettering2018-08-24
| | | | | | | | | | Let's simplify the code a bit. Let's reduce the number of redundant if checks a bit, (i.e. if we want to check for equality with VIRTUALIZATION_VM_OTHER there's no need to check for non-equality with VIRTUALIZATION_NONE first). As a very welcome side-effect this means we lose some lines of code and our level of indentation is reduced. No changes in behaviour.
* virt: if we detect Xen by DMI, trust that over CPUIDLennart Poettering2018-08-24
| | | | | | | Apparently Xen sometimes lies about its identity when queried via CPUID. Let's hence prefer DMI tests for CPUID Fixes: #8844
* test: add tests for signal_from_string()Yu Watanabe2018-08-24
|
* util: rename signal_from_string_try_harder() to signal_from_string()Yu Watanabe2018-08-24
| | | | | Also this makes the new `signal_from_string()` function reject e.g, `SIG3` or `SIG+5`.
* util: make signal_from_string() accept RTMIN, RTMAX, and RTMAX-nYu Watanabe2018-08-24
| | | | | | | | | | Before this, `signal_from_string()` accepts simple signal name or RTMIN+n. This makes the function also accept RTMIN, RTMAX, and RTMAX-n. Note that RTMIN+0 is equivalent to RTMIN, and RTMAX-0 is to RTMAX. This also fixes the integer overflow reported by oss-fuzz #8064. https://oss-fuzz.com/v2/testcase-detail/5648573352902656
* virt: simplificationsLennart Poettering2018-08-24
| | | | | | | | | | Let's simplify the code a bit. Let's reduce the number of redundant if checks a bit, (i.e. if we want to check for equality with VIRTUALIZATION_VM_OTHER there's no need to check for non-equality with VIRTUALIZATION_NONE first). As a very welcome side-effect this means we lose some lines of code and our level of indentation is reduced. No changes in behaviour.
* virt: if we detect Xen by DMI, trust that over CPUIDLennart Poettering2018-08-24
| | | | | | | Apparently Xen sometimes lies about its identity when queried via CPUID. Let's hence prefer DMI tests for CPUID Fixes: #8844
* locale-util: add comment with link to unicode chars supported by eurlatgr ↵Lennart Poettering2018-08-24
| | | | | | (#8894) See: #6443
* mount-setup: add a comment that the character/block device nodes are ↵Lennart Poettering2018-08-24
| | | | | | | | | | "optional" (#8893) if we lack privs to create device nodes that's fine, and creating /run/systemd/inaccessible/chr or /run/systemd/inaccessible/blk won't work then. Document this in longer comments. Fixes: #4484
* test: add tests for signal_from_string()Yu Watanabe2018-08-24
|
* util: rename signal_from_string_try_harder() to signal_from_string()Yu Watanabe2018-08-24
| | | | | Also this makes the new `signal_from_string()` function reject e.g, `SIG3` or `SIG+5`.
* util: make signal_from_string() accept RTMIN, RTMAX, and RTMAX-nYu Watanabe2018-08-24
| | | | | | | | | | Before this, `signal_from_string()` accepts simple signal name or RTMIN+n. This makes the function also accept RTMIN, RTMAX, and RTMAX-n. Note that RTMIN+0 is equivalent to RTMIN, and RTMAX-0 is to RTMAX. This also fixes the integer overflow reported by oss-fuzz #8064. https://oss-fuzz.com/v2/testcase-detail/5648573352902656
* set: drop unused set_make() function (#8879)Yu Watanabe2018-08-24
| | | | | The function causes compiler error when built with '-Ddebug=hashmap', and is not used anymore. Let's drop it.
* add __nr_statx defines for extra architectures (#8872)Adam Duskett2018-08-24
| | | | | | | | | | | This includes: - arm - arm64 - alpha - powerpc64 - sparc Taken from kernel 4.16.6
* logind: (void)ify all things we knowingly ignoreLennart Poettering2018-08-24
|
* logind: terminate cleanly on SIGTERM/SIGINTLennart Poettering2018-08-24
| | | | | | | Let's properly terminate on SIGTERM or SIGINT. Previously we'd just rely on the implicit process clean-up logic on UNIX. By shutting down properly on SIGTERM/SIGINT we make it easier to track down memory leaks by employing valgrind.