summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pid1: fix message about triggers missing servicesZbigniew Jędrzejewski-Szmek2019-07-291-2/+4
| | | | | systemd[1]: systemd-tmpfiles-clean.timer: Refusing to start, unit systemd-tmpfiles-cle an.timer to trigger not loaded.
* pid1,systemctl: allow symbolic exit code namesZbigniew Jędrzejewski-Szmek2019-07-294-46/+54
|
* shared/bus-util: fix dbus serialization of ↵Zbigniew Jędrzejewski-Szmek2019-07-293-23/+23
| | | | | | | | {RestartPrevent,RestartForce,Success}ExitStatus We were passing 1/4th of the size in bytes as argument. So depending on the size of the array, either we'd only transfer a subset of values, or we'd get an alignment error.
* bus-util: convert bus_log_{parse,create}_error into definesZbigniew Jędrzejewski-Szmek2019-07-292-10/+5
| | | | | | | With SYSTEMD_LOG_LOCATION=1, it is much more useful to see the location where the call to bus_log_{parse,create}_error() was made, rather then the one-line body of the helper function. Also, it's our internal code, so having a one-line non-inline function doesn't make much sense anyway.
* shared/exit-status: use Bitmap instead of SetsZbigniew Jędrzejewski-Szmek2019-07-297-58/+38
| | | | | | | | | | | | | | | | | | I opted to embed the Bitmap structure directly in the ExitStatusSet. This means that memory usage is a bit higher for units which don't define this setting: Service changes: /* size: 2720, cachelines: 43, members: 73 */ /* sum members: 2680, holes: 9, sum holes: 39 */ /* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */ /* last cacheline: 32 bytes */ /* size: 2816, cachelines: 44, members: 73 */ /* sum members: 2776, holes: 9, sum holes: 39 */ /* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */ But this way the code is simpler and we do less pointer chasing.
* shared/bitmap: constify various operators which don't modify bitmapZbigniew Jędrzejewski-Szmek2019-07-292-10/+9
|
* shared/exit-status: add exit_status_from_string()Zbigniew Jędrzejewski-Szmek2019-07-293-0/+33
|
* shared/exit-status: turn status level into a bitmask, add "test"Zbigniew Jędrzejewski-Szmek2019-07-297-239/+161
| | | | | The "test" doesn't really test much automatically, but it is still useful to look at the mappings.
* Merge pull request #13120 from keszybz/journal-min-useZbigniew Jędrzejewski-Szmek2019-07-271-53/+55
|\ | | | | Increase journald min_use value
| * journald: lower keep_free to 5% and raise min_use to 2%Zbigniew Jędrzejewski-Szmek2019-07-261-49/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1715699 > /dev/mapper/live-rw 6.4G 5.7G 648M 91% / > systemd-journald[905]: Fixed min_use=1.0M max_use=648.7M max_size=81.0M min_size=512.0K keep_free=973.1M n_max_files=100 When journald is started, we pick keep_free as 15% of the disk size. When the fs is almost filled, we will only keep one journal file around and rotate very often (because min_size is very small). Let's set min use to something reasonable, so that we get more useful logs that will cover at least the full boot. Some cases considered in the PR: > /dev/mapper/live-rw 6.4G 5.7G 648M 91% / keep_free→MIN(327,100)→100 MB. min_use→16MB. effective range: 16 MB – 548 MB > /dev/mapper/fedora_krowka-root 78G 69G 5.7G 93% / keep_free → MIN(4GB, 100MB)→100MB min_use→16MB effective range: 16 MB – 5.6 GB (but then there's the max_use limit, which cuts the range down) > 4TB, 4GB free keep_free → MIN(209715, 100) → 100 MB min_use→16MB effective range: 16 MB – 4.9 GB (also effectively limited by max_use) Also replace unneeded width suffixes with spaces, I think this is more readable, and drop DEFAULT_ prefixes in cases where this setting is simply a bound, and cannot be overridden by user config, hence is not a default.
| * journal: emit debug log about settings only once (or when changed)Zbigniew Jędrzejewski-Szmek2019-07-191-4/+17
| | | | | | | | | | | | | | | | https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902795 https://bugzilla.redhat.com/show_bug.cgi?id=1715699 report "thousands" of those messages. I think this occurs when journald rotates files very quickly. Nevertheless, logging this over and over is not useful, let's do it just once.
* | errno-util: return const string from strerror_safe()Thomas Haller2019-07-261-1/+1
| | | | | | | | | | | | | | | | | | C's strerror() function does not return a "const char *" pointer for the string. That has historic reasons and C99 even comments that "[t]he array pointed to shall not be modified by the program". Make the strerror_safe() wrapper correct this and be more strict in this regard.
* | Merge pull request #13194 from keszybz/chase-symlinks-testingLennart Poettering2019-07-264-17/+129
|\ \ | | | | | | Chase symlinks testing
| * | fs-util: CHASE_NOFOLLOW is not limited to CHASE_OPENZbigniew Jędrzejewski-Szmek2019-07-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ build/test-chase-symlinks /etc/os-release /etc/os-release → /usr/lib/os-release $ build/test-chase-symlinks --nofollow /etc/os-release /etc/../etc/os-release /etc/../etc/./././os-release /etc/os-release → /etc/os-release /etc/../etc/os-release → /etc/os-release /etc/../etc/./././os-release → /etc/os-release
| * | test-chase-symlinks: manual test to call chase_symlinks()Zbigniew Jędrzejewski-Szmek2019-07-262-0/+110
| | | | | | | | | | | | | | | v2: - print --help to stdout, use size_t
| * | fs-util: adjust punctuation in commentsZbigniew Jędrzejewski-Szmek2019-07-192-17/+18
| | |
* | | Merge pull request #13195 from keszybz/minor-rewordingsLennart Poettering2019-07-262-5/+7
|\ \ \ | | | | | | | | Minor rewordings
| * | | bootctl: log message tweaksZbigniew Jędrzejewski-Szmek2019-07-261-2/+2
| | | | | | | | | | | | | | | | Follow-up for e44c3229f22459b189c1e79cb01fdb156672eb93.
| * | | man: reword description of "-" for sysctl.dZbigniew Jędrzejewski-Szmek2019-07-261-3/+5
|/ / / | | | | | | | | | Follow-up for e08be64937.
* | | Merge pull request #13191 from poettering/sysctl-no-failZbigniew Jędrzejewski-Szmek2019-07-264-38/+107
|\ \ \ | | | | | | | | allow sysctl assignments to fail
| * | | NEWS: mention the new sysctl.d/ - prefixLennart Poettering2019-07-261-0/+3
| | | |
| * | | sysctl: prefix ping port range setting with a dashLennart Poettering2019-07-261-1/+1
| | | | | | | | | | | | | | | | Fixes: #13177
| * | | Revert "Revert "sysctl: Enable ping(8) inside rootless Podman containers""Lennart Poettering2019-07-262-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit be74f51605b4c7cb74fec3a50cd13b67598a8ac1. Let's add this again. With the new sysctl "-" thing we can make this work.
| * | | man: document the new sysctl.d/ - prefixLennart Poettering2019-07-261-0/+4
| | | |
| * | | sysctl: if options are prefixed with "-" ignore write errorsLennart Poettering2019-07-261-34/+80
| | | |
| * | | sysctl: reset 'r' only where neededLennart Poettering2019-07-261-2/+2
| | | |
| * | | sysctl: switch to log_syntax()Lennart Poettering2019-07-261-2/+1
| | | | | | | | | | | | | | | | | | | | With @keszybz' recent work this will give us clickable links in the journalctl output.
* | | | Merge pull request #13137 from poettering/efi-randomZbigniew Jędrzejewski-Szmek2019-07-2633-214/+2239
|\ \ \ \ | | | | | | | | | | beef up random seed logic, add boot loader entropy privisioning, improve docs about it
| * | | | update TODOLennart Poettering2019-07-251-1/+8
| | | | |
| * | | | TODO: remove apparently fixed issue from TODOLennart Poettering2019-07-251-5/+0
| | | | |
| * | | | docs: add longer document about systemd and random number seedsLennart Poettering2019-07-255-3/+433
| | | | |
| * | | | man: extend on the --print-boot-path description a bitLennart Poettering2019-07-251-2/+11
| | | | |
| * | | | bootctl: add is-installed verbLennart Poettering2019-07-252-9/+58
| | | | | | | | | | | | | | | | | | | | Fixes: #9428
| * | | | man: document the systemd-random-seed reworkLennart Poettering2019-07-256-31/+243
| | | | |
| * | | | docs: document new random seed EFI vars as part of the boot loader interfaceLennart Poettering2019-07-251-1/+25
| | | | |
| * | | | random-seed: rework systemd-random-seed.service substantiallyLennart Poettering2019-07-252-35/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes two major changes to the way systemd-random-seed operates: 1. We now optionally credit entropy if this is configured (via an env var). Previously we never would do that, with this change we still don't by default, but it's possible to enable this if people acknowledge that they shouldn't replicate an image with a contained random seed to multiple systems. Note that in this patch crediting entropy is a boolean thing (unlike in previous attempts such as #1062), where only a relative amount of bits was credited. The simpler scheme implemented here should be OK though as the random seeds saved to disk are now written only with data from the kernel's entropy pool retrieved after the pool is fully initialized. Specifically: 2. This makes systemd-random-seed.service a synchronization point for kernel entropy pool initialization. It was already used like this, for example by systemd-cryptsetup-generator's /dev/urandom passphrase handling, with this change it explicitly operates like that (at least systems which provide getrandom(), where we can support this). This means services that rely on an initialized random pool should now place After=systemd-random-seed.service and everything should be fine. Note that with this change sysinit.target (and thus early boot) is NOT systematically delayed until the entropy pool is initialized, i.e. regular services need to add explicit ordering deps on this service if they require an initialized random pool. Fixes: #4271 Replaces: #10621 #4513
| * | | | random-seed: drop falling back to O_WRONLY if O_RDWR on /dev/urandom doesn't ↵Lennart Poettering2019-07-251-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | work There's no reason why writing should work if reading and writing doesn't. Let's simplify this hence. /dev/urandom is generally an r/w device, and everything else would be a serious system misconfiguration.
| * | | | random-seed: reduce scope of variableLennart Poettering2019-07-251-2/+2
| | | | |
| * | | | units: automatically initialize the system token if that makes senseLennart Poettering2019-07-252-0/+36
| | | | |
| * | | | bootctl: show random seed stateLennart Poettering2019-07-251-0/+16
| | | | |
| * | | | bootctl: add new verb for initializing a random seed in the ESPLennart Poettering2019-07-251-50/+253
| | | | |
| * | | | random-seed: move pool size determination to random-util.[ch]Lennart Poettering2019-07-253-18/+35
| | | | | | | | | | | | | | | | | | | | That way we can reuse it elsewhere.
| * | | | core: take random seed from boot loader and credit it to kernel entropy poolLennart Poettering2019-07-254-1/+121
| | | | |
| * | | | sd-boot: read random seed from ESP and pass it to OSLennart Poettering2019-07-254-2/+397
| | | | |
| * | | | efi: steal glibc sha256 implementationLennart Poettering2019-07-253-1/+306
| | | | |
| * | | | bootctl: add new feature flag for indicating random seed management supportLennart Poettering2019-07-252-6/+8
| | | | |
| * | | | bootctl: shortcut configuration file parsingLennart Poettering2019-07-251-0/+6
| | | | |
| * | | | bootctl: drop const from non-pointer function argumentLennart Poettering2019-07-251-1/+1
| | | | |
| * | | | bootctl: use the fact that startswith() returns the suffixLennart Poettering2019-07-251-3/+4
| | | | |
| * | | | efivars: modernize efi_get_variable() a bitLennart Poettering2019-07-251-27/+44
| | | | | | | | | | | | | | | | | | | | | | | | | Primarily, make sure the return parameters are all individually optional.