summaryrefslogtreecommitdiff
path: root/src/shared
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18596 from keszybz/systemctl-quiet-legendLennart Poettering2021-02-172-0/+22
|\ | | | | systemctl: hide legends with --quiet, allow overriding
| * tree-wide: use parse_boolean_argument() for variables with non-boolean typeZbigniew Jędrzejewski-Szmek2021-02-171-2/+4
| | | | | | | | | | This still works nicely, but we need to assign the return value ourselves. As before, one nice effect is that error messages are uniform.
| * tree-wide: add a helper to parse boolean optargZbigniew Jędrzejewski-Szmek2021-02-172-0/+20
| | | | | | | | | | | | | | | | | | This nicely covers the case when optarg is optional. The same parser can be used when the option string passed to getopt_long() requires a parameter and when it doesn't. The error messages are made consistent. Also fixes a log error c&p in --crash-reboot message.
* | Merge pull request #18651 from poettering/einval-followupLennart Poettering2021-02-173-33/+45
|\ \ | | | | | | two follow-up fixes for the enum einvalification
| * | install: make UnitFileChangeType enum anonymousLennart Poettering2021-02-173-33/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We almost never use the named enum type, in almost all cases we use "int" instead, since we overload it with negative errnos. To simplify things, let's use "int" really everywhere. Moreover, let's rename the fields for this enum to "type_or_errno", to make the overloading clear. And let's ad some assertions that things are in the right range.
* | | tree-wide: use in_addr_is_set() or friendsYu Watanabe2021-02-181-1/+1
|/ /
* | firewall-util: replace nft_in6addr_to_range() with in_addr_prefix_range()Yu Watanabe2021-02-171-50/+10
| |
* | logs-show: move show_journal_by_unit _BOOT_ID matchVito Caputo2021-02-171-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In scrutinizing the journal overhead of `systemctl status $service` it became apparent that the matching engine was performing the unit matches on every journal in my system, even ones containing nothing relevant to the current boot. This seemed strange and likely suboptimal to me, since there's likely far more unit data to rifle through than boot IDs in any given journal. The _BOOT_ID match seemed like it should be serving as an early exit match on irrelevant journals, but that wasn't what seemed to be happening. As a quick experiment to see if I could get the _BOOT_ID match to be something along the lines of a higher priority when matching, and try early exit on these unrelated journals, I moved add_match_this_boot() to after the unit match adds, inserting a conjunction between them. The end result seems to be a very substantial performance gain in my simple uncached tests, and I still get the expected journal output from the `systemctl status $service` command: ---------------------------------------------------------------------- Unmodified systemctl times: root@localhost:/# echo 2 > /proc/sys/vm/drop_caches root@localhost:/# time systemctl --no-pager status dbus ● dbus.service - D-Bus System Message Bus Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled) Active: active (running) since Sun 2020-10-25 17:03:05 PDT; 1 day 6h ago Docs: man:dbus-daemon(1) Main PID: 572 (dbus-daemon) Memory: 2.8M CPU: 110ms CGroup: /system.slice/dbus.service └─572 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation Oct 25 17:03:05 localhost systemd[1]: Started D-Bus System Message Bus. Oct 25 17:06:26 localhost dbus[572]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service' Oct 25 17:06:26 localhost dbus[572]: [system] Successfully activated service 'org.freedesktop.machine1' real 0m0.695s user 0m0.005s sys 0m0.043s root@localhost:/# echo 2 > /proc/sys/vm/drop_caches root@localhost:/# time systemctl --no-pager status dbus ● dbus.service - D-Bus System Message Bus Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled) Active: active (running) since Sun 2020-10-25 17:03:05 PDT; 1 day 6h ago Docs: man:dbus-daemon(1) Main PID: 572 (dbus-daemon) Memory: 2.8M CPU: 110ms CGroup: /system.slice/dbus.service └─572 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation Oct 25 17:03:05 localhost systemd[1]: Started D-Bus System Message Bus. Oct 25 17:06:26 localhost dbus[572]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service' Oct 25 17:06:26 localhost dbus[572]: [system] Successfully activated service 'org.freedesktop.machine1' real 0m0.696s user 0m0.003s sys 0m0.046s root@localhost:/# echo 2 > /proc/sys/vm/drop_caches root@localhost:/# time systemctl --no-pager status dbus ● dbus.service - D-Bus System Message Bus Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled) Active: active (running) since Sun 2020-10-25 17:03:05 PDT; 1 day 6h ago Docs: man:dbus-daemon(1) Main PID: 572 (dbus-daemon) Memory: 2.8M CPU: 110ms CGroup: /system.slice/dbus.service └─572 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation Oct 25 17:03:05 localhost systemd[1]: Started D-Bus System Message Bus. Oct 25 17:06:26 localhost dbus[572]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service' Oct 25 17:06:26 localhost dbus[572]: [system] Successfully activated service 'org.freedesktop.machine1' real 0m0.694s user 0m0.006s sys 0m0.041s ---------------------------------------------------------------------- Modified systemctl including this commit: root@localhost:/home/vc/gh/systemd/build# echo 2 > /proc/sys/vm/drop_caches root@localhost:/home/vc/gh/systemd/build# time ./systemctl --no-pager status dbus ● dbus.service - D-Bus System Message Bus Loaded: loaded (/lib/systemd/system/dbus.service; static) Active: active (running) since Sun 2020-10-25 17:03:05 PDT; 1 day 6h ago TriggeredBy: ● dbus.socket Docs: man:dbus-daemon(1) Main PID: 572 (dbus-daemon) Memory: 2.8M CPU: 110ms CGroup: /system.slice/dbus.service └─572 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation Oct 25 17:03:05 localhost systemd[1]: Started D-Bus System Message Bus. Oct 25 17:06:26 localhost dbus[572]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service' Oct 25 17:06:26 localhost dbus[572]: [system] Successfully activated service 'org.freedesktop.machine1' real 0m0.168s user 0m0.003s sys 0m0.016s root@localhost:/home/vc/gh/systemd/build# echo 2 > /proc/sys/vm/drop_caches root@localhost:/home/vc/gh/systemd/build# time ./systemctl --no-pager status dbus ● dbus.service - D-Bus System Message Bus Loaded: loaded (/lib/systemd/system/dbus.service; static) Active: active (running) since Sun 2020-10-25 17:03:05 PDT; 1 day 6h ago TriggeredBy: ● dbus.socket Docs: man:dbus-daemon(1) Main PID: 572 (dbus-daemon) Memory: 2.8M CPU: 110ms CGroup: /system.slice/dbus.service └─572 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation Oct 25 17:03:05 localhost systemd[1]: Started D-Bus System Message Bus. Oct 25 17:06:26 localhost dbus[572]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service' Oct 25 17:06:26 localhost dbus[572]: [system] Successfully activated service 'org.freedesktop.machine1' real 0m0.167s user 0m0.005s sys 0m0.013s root@localhost:/home/vc/gh/systemd/build# echo 2 > /proc/sys/vm/drop_caches root@localhost:/home/vc/gh/systemd/build# time ./systemctl --no-pager status dbus ● dbus.service - D-Bus System Message Bus Loaded: loaded (/lib/systemd/system/dbus.service; static) Active: active (running) since Sun 2020-10-25 17:03:05 PDT; 1 day 6h ago TriggeredBy: ● dbus.socket Docs: man:dbus-daemon(1) Main PID: 572 (dbus-daemon) Memory: 2.8M CPU: 110ms CGroup: /system.slice/dbus.service └─572 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation Oct 25 17:03:05 localhost systemd[1]: Started D-Bus System Message Bus. Oct 25 17:06:26 localhost dbus[572]: [system] Activating via systemd: service name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service' Oct 25 17:06:26 localhost dbus[572]: [system] Successfully activated service 'org.freedesktop.machine1' real 0m0.170s user 0m0.005s sys 0m0.014s
* | Merge pull request #18641 from benjarobin/fix-enum-invalid-valZbigniew Jędrzejewski-Szmek2021-02-176-10/+12
|\ \ | | | | | | Various follow-up: Fix build and EINVAL for _INVALID enum value
| * | shared: use -EINVAL for _NETDEV_BRIDGE_STATE_INVALIDBenjamin Robin2021-02-161-1/+1
| | | | | | | | | | | | Follow-up of #11484
| * | shared: Fix _DNS_CACHE_MODE_INVALID value: use -EINVALBenjamin Robin2021-02-161-1/+1
| | | | | | | | | | | | Follow-up of #11484
| * | shared: use -EINVAL for _UNIT_FILE_CHANGE_TYPE_INVALIDBenjamin Robin2021-02-162-3/+3
| | | | | | | | | | | | Follow-up of #11484
| * | shared: use -EINVAL for _EXEC_COMMAND_FLAGS_INVALIDBenjamin Robin2021-02-162-5/+7
| | | | | | | | | | | | Follow-up of #11484
* | | condition: add CPUFeatureGiedrius Statkevičius2021-02-172-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Taking a stab at implementing #14479. Add {Condition,Assert}CPUFeature to `systemd-analyze` & friends. Implement it by executing the CPUID instruction. Add tables for common x86/i386 features. Tested via unit tests + checked that commands such as: ```bash systemd-analyze condition 'AssertCPUFeature = rdrand' ``` Succeed as expected and that commands such as ```bash systemd-analyze condition 'AssertCPUFeature = foobar' ``` Fail as expected. Finally, I have amended the `systemd.unit` manual page with the new condition and the list of all currently supported flags.
* | | Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnatLennart Poettering2021-02-161-33/+151
|\ \ \ | | | | | | | | Support ipv6 for masquerade and dnat in nspawn and networkd
| * | | add ipv6 range element creation test casesFlorian Westphal2021-01-191-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nft set backend doesn't support network masks, it works with ranges. Inputs like dead::/64 thus need to be translated to two 'start' and 'end' elements. The 'start' element is the first element in the range (i.e., dead::). The 'stop' element is the first element *past* the range, (dead:0:0100:: in the example). This adds a few test cases.
| * | | firewall-util-nft: clear previous address on replayFlorian Westphal2021-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In case external entity wiped the ruleset, we need to clear the 'previous' address -- its already gone. This prevents the transaction from succeeding: the delete operation fails.
| * | | firewall-util: add ipv6 support to nftables backendFlorian Westphal2021-01-191-33/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closely mirrors the existing ipv4 ruleset: table ip6 io.systemd.nat { set masq_saddr { type ipv6_addr flags interval } map map_port_ipport { type inet_proto . inet_service : ipv6_addr . inet_service } chain prerouting { type nat hook prerouting priority dstnat + 1; policy accept; fib daddr type local dnat ip6 addr . port to meta l4proto . th dport map @map_port_ipport } chain output { type nat hook output priority -99; policy accept; ip6 daddr != ::1 oif "lo" dnat ip6 addr . port to meta l4proto . th dport map @map_port_ipport } chain postrouting { type nat hook postrouting priority srcnat + 1; policy accept; ip6 saddr @masq_saddr masquerade } } Only difference is the use of ipv6 addresses instead of ipv4 ones. Currently has no effect: all in-tree callers pass AF_INET exclusively. Followup patches will make nspawn expose ipv6 too and rework IPMasquerade option to support both/v4/v6.
* | | | Merge pull request #18601 from keszybz/env-assign-cleanupLennart Poettering2021-02-163-31/+12
|\ \ \ \ | |_|/ / |/| | | Envvar assignment cleanup
| * | | Refactor strv_env_replace() into strv_env_replace_consume()Zbigniew Jędrzejewski-Szmek2021-02-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | All callers of strv_env_replace() would free the argument on error. So let's follow the same pattern as with strv_consume (and similar naming) and unconditionally "use up" the argument.
| * | | shared/exec-util: fix minor memleakZbigniew Jędrzejewski-Szmek2021-02-161-8/+2
| | | | | | | | | | | | | | | | p was not freed on error.
| * | | shared/user-record: inline iterator variable declarationsZbigniew Jędrzejewski-Szmek2021-02-161-9/+6
| | | |
| * | | basic/env-util: add variant of strv_env_replace() that does strdup internallyZbigniew Jędrzejewski-Szmek2021-02-151-10/+2
| | | |
* | | | tree-wide: reset the cleaned-up variable in cleanup functionsZbigniew Jędrzejewski-Szmek2021-02-1611-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the cleanup function returns the appropriate type, use that to reset the variable. For other functions (usually the foreign ones which return void), add an explicit value to reset to. This causes a bit of code churn, but I think it might be worth it. In a following patch static destructors will be called from a fuzzer, and this change allows them to be called multiple times. But I think such a change might help with detecting unitialized code reuse too. We hit various bugs like this, and things are more obvious when a pointer has been set to NULL. I was worried whether this change increases text size, but it doesn't seem to: -Dbuildtype=debug: before "tree-wide: return NULL from freeing functions": -rwxrwxr-x 1 zbyszek zbyszek 4117672 Feb 16 14:36 build/libsystemd.so.0.30.0* -rwxrwxr-x 1 zbyszek zbyszek 4494520 Feb 16 15:06 build/systemd* after "tree-wide: return NULL from freeing functions": -rwxrwxr-x 1 zbyszek zbyszek 4117672 Feb 16 14:36 build/libsystemd.so.0.30.0* -rwxrwxr-x 1 zbyszek zbyszek 4494576 Feb 16 15:10 build/systemd* now: -rwxrwxr-x 1 zbyszek zbyszek 4117672 Feb 16 14:36 build/libsystemd.so.0.30.0* -rwxrwxr-x 1 zbyszek zbyszek 4494640 Feb 16 15:15 build/systemd* -Dbuildtype=release: before "tree-wide: return NULL from freeing functions": -rwxrwxr-x 1 zbyszek zbyszek 5252256 Feb 14 14:47 build-rawhide/libsystemd.so.0.30.0* -rwxrwxr-x 1 zbyszek zbyszek 1834184 Feb 16 15:09 build-rawhide/systemd* after "tree-wide: return NULL from freeing functions": -rwxrwxr-x 1 zbyszek zbyszek 5252256 Feb 14 14:47 build-rawhide/libsystemd.so.0.30.0* -rwxrwxr-x 1 zbyszek zbyszek 1834184 Feb 16 15:10 build-rawhide/systemd* now: -rwxrwxr-x 1 zbyszek zbyszek 5252256 Feb 14 14:47 build-rawhide/libsystemd.so.0.30.0* -rwxrwxr-x 1 zbyszek zbyszek 1834184 Feb 16 15:16 build-rawhide/systemd* I would expect that the compiler would be able to elide the setting of a variable if the variable is never used again. And this seems to be the case: in optimized builds there is no change in size whatsoever. And the change in size in unoptimized build is negligible. Something strange is happening with size of libsystemd: it's bigger in optimized builds. Something to figure out, but unrelated to this patch.
* | | | tree-wide: return NULL from freeing functionsZbigniew Jędrzejewski-Szmek2021-02-169-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | I started working on this because I wanted to change how DEFINE_TRIVIAL_CLEANUP_FUNC is defined. Even independently of that change, it's nice to make make things more consistent and predictable.
* | | | Merge pull request #18481 from keszybz/rpm-restart-post-transZbigniew Jędrzejewski-Szmek2021-02-161-1/+2
|\ \ \ \ | | | | | | | | | | Restart units after the rpm transaction
| * | | | core: allow Markers to be set using set-propertyZbigniew Jędrzejewski-Szmek2021-02-151-1/+2
| | | | |
* | | | | journalctl: rotation is not a reason to warn, but certainly noteworthyLennart Poettering2021-02-151-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | Downgrade the phrasing, since it is a bit misleading. Fixes: #18465
* | | | Move and rename parse_json_argument() functionZbigniew Jędrzejewski-Szmek2021-02-154-23/+24
| | | | | | | | | | | | | | | | | | | | json.[ch] is a very generic implementation, and cmdline argument parsing doesn't fit there.
* | | | Move and rename parse_path_argument() functionZbigniew Jędrzejewski-Szmek2021-02-152-0/+32
| | | | | | | | | | | | | | | | | | | | This fits better in shared/, and the new parse-argument.c file is a good home for it.
* | | | systemctl,loginctl,machinectl: add --signal=listZbigniew Jędrzejewski-Szmek2021-02-151-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lists numerical signal values: $ systemctl --signal list SIGNAL NAME 1 SIGHUP 2 SIGINT 3 SIGQUIT ... 62 SIGRTMIN+28 63 SIGRTMIN+29 64 SIGRTMIN+30 This is useful when trying to kill e.g. systemd with a specific signal number using kill. kill doesn't accept our fancy signal names like RTMIN+4, so one would have to calculate that value somehow. Doing systemctl --signal list | grep -F RTMIN+4 is a nice way of doing that.
* | | | systemctl,loginctl,machinectl: use a shared helper for arg_signalZbigniew Jędrzejewski-Szmek2021-02-143-0/+31
| |/ / |/| | | | | | | | | | | I seems frivolous to yet another two -util.[ch] files, but the helper should be in shared/ and it doesn't seem to fit anywhere else.
* | | Merge pull request #18401 from anitazha/oomdxattrZbigniew Jędrzejewski-Szmek2021-02-131-1/+2
|\ \ \ | | | | | | | | oomd: implement avoid/omit support for cgroups
| * | | oom: add unit file settings for oomd avoid/omit xattrsAnita Zhang2021-02-121-1/+2
| | | |
* | | | Merge pull request #18558 from poettering/have-tpm2Lennart Poettering2021-02-123-0/+40
|\ \ \ \ | | | | | | | | | | ask the uefi firmware if TPM2 support is available
| * | | | condition: if spelunking through /sys/class/tpmrm doesn't work ask EFI if ↵Lennart Poettering2021-02-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TPM2 exists This makes ConditionSecurity=tpm2 work reliably during early boot: if Linux doesn't know about the TPM2 then maybe the firmware does.
| * | | | efi-loader: add efi_has_tpm2() helperLennart Poettering2021-02-112-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The helper checks if the UEFI firmware is hooked up to a TPM2 chip. This is useful to know in trusted boot scenarios, in particular during early boot in auto-enroll scenarios where we want to know whether TPM2 is available or not, and the Linux drivers are not loaded yet, and where it might or not be worth waiting for it.
* | | | | tree-wide: use free_and_strdup_warn()Yu Watanabe2021-02-121-4/+1
| | | | |
* | | | | tree-wide: use error codes in xxx_from_string()Yu Watanabe2021-02-122-4/+4
| | | | |
* | | | | conf-parser: use return codes in xxx_from_string()Yu Watanabe2021-02-121-7/+10
|/ / / / | | | | | | | | | | | | Follow-up for #11484.
* | | | shared/generator: add missing initializerZbigniew Jędrzejewski-Szmek2021-02-111-1/+1
| |/ / |/| | | | | | | | Coverity CID#1444710.
* | | Merge pull request #11484 from keszybz/udevadm-error-logsYu Watanabe2021-02-1131-57/+61
|\ \ \ | | | | | | | | Use real return codes in _from_string() functions
| * | | tree-wide: propagate error code from _from_string() functionsZbigniew Jędrzejewski-Szmek2021-02-102-5/+5
| | | | | | | | | | | | | | | | Now that we know we have something useful, no need to make an answer up.
| * | | Return -EINVAL from _from_string() functionsZbigniew Jędrzejewski-Szmek2021-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'd return -1 (-EPERM), even though we have a general rule to use real errno values. The particular case that caught my attention was: $ sudo udevadm control -l asdf Failed to parse log priority 'asdf': Operation not permitted ... but "git grep 'r =.*_from_string' src/" return 110 hits. Confusingly, some of the _from_string functions already return a proper errno value, so not all of those are broken, but probably quite a few.
| * | | tree-wide: use -EINVAL for enum invalid valuesZbigniew Jędrzejewski-Szmek2021-02-1027-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested in https://github.com/systemd/systemd/pull/11484#issuecomment-775288617. This does not touch anything exposed in src/systemd. Changing the defines there would be a compatibility break. Note that tests are broken after this commit. They will be fixed in the next one.
| * | | shared/json: make JsonVariant.type field widerZbigniew Jędrzejewski-Szmek2021-02-101-4/+4
| | | | | | | | | | | | | | | | | | | | pahole shows that this doesn't make a difference, but we can fit -EINVAL into .type without warnings.
| * | | test-tables: make the assert more readableZbigniew Jędrzejewski-Szmek2021-02-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Doing it all in one line and with negation in front seemed like a good idea at some point, but I think it is vastly easier to understand when it is split out a bit.
| * | | test-tables: fix warning about NULL used in printfZbigniew Jędrzejewski-Szmek2021-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | With the simplified asserts, newer gcc is able to (correctly) figure out that NULL was being passed.
* | | | Merge pull request #18506 from keszybz/fuzz-systemctl-parse-argvYu Watanabe2021-02-111-11/+3
|\ \ \ \ | | | | | | | | | | Fuzzer for systemctl argline parsing
| * | | | core: drop references to UpstartZbigniew Jędrzejewski-Szmek2021-02-071-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last release of Upstart was July 2014 [1], and there have been no new commits to the repo. We should move on too. [1] https://lists.ubuntu.com/archives/upstart-devel/2014-July/003313.html The only real support was in the code that looked for $PREVLEVEL. https://codesearch.debian.net/search?q=PREVLEVEL&literal=1&perpkg=1 shows this string in our own code (or the copy in elogind), our own man pages, and init scripts for two packages (brltty, salt), which shouldn't be used with systemd. (And both *check* for PREVLEVEL, and don't set it. So most likely nothing at all sets it.)