Lennart Poettering [Fri, 22 Jun 2018 18:03:49 +0000 (20:03 +0200)]
bootctl: add auto-paging
Lennart Poettering [Fri, 22 Jun 2018 18:00:19 +0000 (20:00 +0200)]
bootctl: highlight various title/product fields in output
Lennart Poettering [Fri, 22 Jun 2018 17:57:06 +0000 (19:57 +0200)]
bootctl: unify the code which we use to show boot loader entries
Lennart Poettering [Fri, 22 Jun 2018 17:46:13 +0000 (19:46 +0200)]
bootctl: downgrade to log messages that aren't actually errors
Lennart Poettering [Fri, 22 Jun 2018 17:39:17 +0000 (19:39 +0200)]
bootctl: reword status/list section headers a bit
This is really confusing, let's try to clean this up a bit, in
particular as there are two very similar concepts:
1. The boot loaders, i.e. the category you find systemd-boot, the
Windows and Apple boot loaders in. These may typically be listed in the
firmware's EFI variables.
2. The boot loader entries, as defined by the Boot Loader Spec. In this
category you find the various Linux kernels that are installed, i.e.
the stuff systemd-boot shows on screen. To make things confusing, the
Windows and Apple boot loaders can appear both as boot loaders and as
boot loader entries.
This tries to establish the following nomenclature: "boot loaders" and
"boot loader entries" for these two concepts.
Lennart Poettering [Fri, 22 Jun 2018 17:33:42 +0000 (19:33 +0200)]
bootspec: access EFI variables on on EFI boots
Lennart Poettering [Fri, 22 Jun 2018 17:32:49 +0000 (19:32 +0200)]
bootctl: show 'Default Boot Entry' header only when we found something
Lennart Poettering [Fri, 22 Jun 2018 17:31:50 +0000 (19:31 +0200)]
bootspec: it's fine if loader.conf is absent
We shouldn't generate an error in that case, as the file is optional.
Lennart Poettering [Fri, 22 Jun 2018 17:30:12 +0000 (19:30 +0200)]
bootspec: reduce number of functions we export
Let's internalize these four calls as noone else calls them.
Lennart Poettering [Fri, 22 Jun 2018 17:26:22 +0000 (19:26 +0200)]
bootspec: remove redundant logging
boot_loader_read_conf(), boot_entries_find(), boot_entries_load_config()
all log their errors internally, hence no need to log a second or third
time about the same error when they return.
Lennart Poettering [Fri, 22 Jun 2018 17:01:21 +0000 (19:01 +0200)]
test: shorten test-boot-timestamps a bit
Lennart Poettering [Fri, 22 Jun 2018 16:49:47 +0000 (18:49 +0200)]
efivars: some trivial coding style updates
Lennart Poettering [Fri, 22 Jun 2018 16:47:37 +0000 (18:47 +0200)]
efivars: check whether we are booted with EFI before reading/writing to variables
We do these checks only for the high-level calls as for the low-level
ones it might make sense in some exotic uses to read the host EFI data
from a container or so.
Lennart Poettering [Fri, 22 Jun 2018 16:40:43 +0000 (18:40 +0200)]
efi: detect containers in is_efi_boot()
Let's make sure that we never assume we booted up in EFI mode if we are
run in a container.
Lennart Poettering [Fri, 22 Jun 2018 09:43:13 +0000 (11:43 +0200)]
bootctl: tiny shortification
Lennart Poettering [Fri, 22 Jun 2018 09:36:58 +0000 (11:36 +0200)]
bootctl: let's be paranoid and synchronize the ESP in full after all changes
We already synchronize all files we write individually, as well as the
directories they are stored in. Let's also synchronize the ESP as a
whole after our work, just in case.
Lennart Poettering [Mon, 8 Oct 2018 19:39:54 +0000 (21:39 +0200)]
Merge pull request #10262 from keszybz/hibres-disable
Switches to disable hibernation and/or resuming
Lennart Poettering [Mon, 8 Oct 2018 18:59:11 +0000 (20:59 +0200)]
mount-util: show mount source in failure log message (#10312)
Lennart Poettering [Mon, 8 Oct 2018 18:53:35 +0000 (20:53 +0200)]
ptyfwd: voidify more calls (#10310)
Zbigniew Jędrzejewski-Szmek [Mon, 8 Oct 2018 18:12:18 +0000 (20:12 +0200)]
Merge pull request #10159 from poettering/killall-spree-kernel-thread
killall.c fixes regarding kernel thread detection
Zbigniew Jędrzejewski-Szmek [Mon, 8 Oct 2018 16:42:47 +0000 (18:42 +0200)]
Merge pull request #10281 from yuwata/follow-up-10277
meson: add more compile tests
Yu Watanabe [Mon, 8 Oct 2018 16:37:06 +0000 (01:37 +0900)]
meson: use c_args in generator scripts (#10289)
May be useful in some cases.
Lennart Poettering [Mon, 8 Oct 2018 16:32:03 +0000 (18:32 +0200)]
nspawn: optionally don't mount a tmpfs over /tmp (#10294)
nspawn: optionally, don't mount a tmpfs on /tmp
Fixes: #10260
Michael Olbrich [Sun, 30 Sep 2018 14:08:14 +0000 (16:08 +0200)]
meson: only build src/shared/tests.c if tests are enabled
It's only needed for tests and leaks build directories into
libsystemd-shared.
Yu Watanabe [Mon, 1 Oct 2018 19:45:05 +0000 (04:45 +0900)]
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 09:18:25 +0000 (11:18 +0200)]
TODO: remove entry
Swap on luks works great. Nothing to do here.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 09:17:36 +0000 (11:17 +0200)]
shared/sleep-config: add switches to kill specific sleep modes
/etc/systemd/sleep.conf gains four new switches:
AllowSuspend=, AllowHibernation=, AllowSuspendThenHibernate=, AllowHybridSleep=.
Disabling specific modes was already possible by masking suspend.target,
hibernate.target, suspend-then-hibernate.target, or hybrid-sleep.target.
But this is not convenient for distributions, which want to set some defaults
based on what they want to support. Having those available as configuration
makes it easy to put a config file in /usr/lib/systemd/sleep.conf.d/ that
overrides the defaults and gives instructions how to undo that override.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 08:15:46 +0000 (10:15 +0200)]
shared/sleep-config: forbid hibernation if resume= is not configured
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 08:15:16 +0000 (10:15 +0200)]
test-sleep: print function names
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 07:29:09 +0000 (09:29 +0200)]
basic/proc-cmdline: allow parsing of cmdline from a string
Comes with tests.
Also add direct test for $SYSTEMD_PROC_CMDLINE.
In test-proc-cmdline, "true" was masquerading as PROC_CMDLINE_STRIP_RD_PREFIX,
fix that. Also, reorder functions to match call order.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 06:45:25 +0000 (08:45 +0200)]
Drop empty lines in proc-cmdline.c
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 06:35:12 +0000 (08:35 +0200)]
shared/bootspec: remember the full path to boot entry and use it in logging
It's much easier to understand what is going on when the full path is
logged.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 05:45:56 +0000 (07:45 +0200)]
Move logic to find default sd-boot entry from systemctl to shared
In preparation for use in other places. No functional change.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 05:31:10 +0000 (07:31 +0200)]
hib-res-generator: add "noresume"
This is an override parameter, to totally skip dehiberanation.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 05:23:03 +0000 (07:23 +0200)]
hib-res-generator: open logging before emitting the first message
Also add a debug message when we are not in initrd, because it can be
confusing why nothing is happenning.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Sep 2018 05:15:55 +0000 (07:15 +0200)]
Add $SYSTEMD_IN_INITRD=yes|no override for debugging
Ray Strode [Sat, 6 Oct 2018 10:08:31 +0000 (06:08 -0400)]
logind: ensure seat0 CanGraphical state is written
For non-`seat0` seats, attaching a graphics card to a seat can
lead to it getting created. This is because the graphics device
is a "master device" which means that device is a seat-defining
device.
`seat0` may get created, even before the graphics driver is loaded,
though. This is because the graphics driver is loaded
asynchronously at startup, and `seat0` is the primary seat of
system, associated with the system VTs.
When a graphics card is attached to a seat the `CanGraphical`
property on that seat will flip to `true`.
For seats that haven't been created yet (non-`seat0` seats), this
leads to `seat_start` getting called which ultimately causes the
seat to get serialized to `/run/systemd/seats`.
For `seat0`, which is already created, `seat_start` will return
immediately, which means the updated `CanGraphical` state will
never get written to `/run/systemd/seats`.
The end result is that clients querying `sd_seat_can_graphical`
won't get the correct answer for `seat0` in cases where the
graphics device takes a long time to load until some other peice
of seat state is updated.
This commit fixes the problem by calling `seat_save` explicitly
for already running seats at the time a graphics device is
attached.
Yu Watanabe [Sat, 6 Oct 2018 14:35:28 +0000 (23:35 +0900)]
Merge pull request #10293 from poettering/cryptsetup-fixes
two tiny cryptsetup-generator fixes
Lennart Poettering [Fri, 5 Oct 2018 20:39:02 +0000 (22:39 +0200)]
cryptsetup: use PATH_IN_SET() instead of STR_IN_SET() when comparing paths
It's formally more correct.
Lennart Poettering [Fri, 5 Oct 2018 20:37:37 +0000 (22:37 +0200)]
cryptsetup: don't use %m if there's no error to show
We are not the ones receiving an error here, but the ones generating it,
hence we shouldn't show it with %m, that's just confusing, as it
suggests we received an error from some other call.
Thomas Haller [Fri, 5 Oct 2018 11:14:38 +0000 (13:14 +0200)]
path-util: fix path_simplify() with kill_dots and "."
Previously, together with kill_dots true, patch like
".", "./.", ".//.//" would all return an empty string.
That is wrong. There must be one "." left to reference
the current directory.
Also, the comment with examples was wrong.
Yu Watanabe [Fri, 5 Oct 2018 14:43:08 +0000 (23:43 +0900)]
core/dbus-execute: fix parsing CPUScheduling* and Nice for transient services
Fixes #10290.
Frank Schaefer [Thu, 4 Oct 2018 21:06:16 +0000 (16:06 -0500)]
* hack around deficiencies in prctl() PR_SET_MM_*
Lennart Poettering [Fri, 5 Oct 2018 18:35:30 +0000 (20:35 +0200)]
Merge pull request #10134 from keszybz/test-runner
Some test-related fixed and a test runner for installed tests
Yu Watanabe [Fri, 5 Oct 2018 09:33:40 +0000 (18:33 +0900)]
man: fix explanation about UID/GID field in tmpfiles.d(5)
Fixes #9495.
Lennart Poettering [Fri, 5 Oct 2018 15:41:56 +0000 (17:41 +0200)]
Merge pull request #10117 from keszybz/undynamicify
Set DynamicUser=no for networkd, resolved, timesyncd
Alan Jenkins [Fri, 14 Sep 2018 10:57:57 +0000 (11:57 +0100)]
man/systemd.exec: MountFlags=shared behaviour was changed (fixed?)
The behaviour described *was* observed on Fedora 28
(systemd-238-9.git0e0aa59), with and without SELinux. I don't actually
know why though! It contradicts my understanding of the code, including an
explicit comment in the code.
Testing in a VM upgraded to v239-792-g1327f272d, this behaviour goes away.
Test case:
# /etc/systemd/system/mount-test.service
[Service]
MountFlags=shared
Type=oneshot
ExecStart=/usr/bin/ls -l /proc/1/ns/mnt /proc/self/ns/mnt
ExecStart=/usr/bin/grep ext4 /proc/self/mountinfo
Weird old behaviour: new mount namespace but / is fully shared.
lrwxrwxrwx. 1 root root 0 Sep 14 11:18 /proc/1/ns/mnt -> mnt:[
4026531840]
lrwxrwxrwx. 1 root root 0 Sep 14 11:48 /proc/self/ns/mnt ->
mnt:[
4026532851]
968 967 253:0 / / rw,relatime shared:1 - ext4 /dev/mapper/alan_dell_2016...
Current behaviour: / is not fully shared
lrwxrwxrwx. 1 root root 0 Sep 14 11:39 /proc/1/ns/mnt -> mnt:[
4026531840]
lrwxrwxrwx. 1 root root 0 Sep 14 11:41 /proc/self/ns/mnt ->
mnt:[
4026532329]
591 558 8:3 / / rw,relatime shared:313 master:1 - ext4 /dev/sda3 rw,secl...
Lennart Poettering [Fri, 5 Oct 2018 15:36:31 +0000 (17:36 +0200)]
Merge pull request #10094 from keszybz/wants-loading
Fix bogus fragment paths in units in .wants/.requires
Lennart Poettering [Fri, 5 Oct 2018 15:11:43 +0000 (17:11 +0200)]
Merge pull request #10152 from yuwata/udev-use-extract
udev: small cleanups
Patrik Flykt [Tue, 2 Oct 2018 18:48:22 +0000 (12:48 -0600)]
networkd-link: Don't start a DHCPv6 informational exchange automatically
When a link is configured, wait until there is a Router Advertisement before
attempting to start DHCPv6. The intended DHCPv6 mode will be evaluated in
ndisc_router_handler() in networkd-ndisc.c.
Yu Watanabe [Fri, 5 Oct 2018 05:40:44 +0000 (14:40 +0900)]
sd-resolve: make struct addrinfo defined
Yu Watanabe [Fri, 5 Oct 2018 05:29:05 +0000 (14:29 +0900)]
meson: also run compile tests for not installed systemd headers
Follow-up for
b62f9008668a5330c61b4de7e0d48147bcd1edf7 (#10277).
Yu Watanabe [Fri, 5 Oct 2018 05:46:30 +0000 (14:46 +0900)]
test-execute: add a test for systemcall filter (#10273)
This adds a test for issue #9939 which is fixed by
a5404992cc7724ebf7572a0aa89d9fdb26ce0b62 (#9942).
Yu Watanabe [Fri, 5 Oct 2018 05:27:32 +0000 (14:27 +0900)]
sd-netlink: sort headers and include net/ethernet.h
Thomas Haller [Thu, 4 Oct 2018 16:54:58 +0000 (18:54 +0200)]
dhcp6: don't include internal header "sparse-endian.h" in "sd-dhcp6-client.h"
Arguably, libsystemd-network is (still) entirely internal API.
However there is the aim of maybe exposing it as public API.
For that reason, it cannot include internal headers from
"src/basic/".
Note how files "src/systemd/sd-*.h" don't include any systemd
headers which don't themself have an "sd-" prefix.
Fixes:
d89a400ed664e0b57fd8667db5637792a185e831
Stephen Gallagher [Thu, 4 Oct 2018 12:19:18 +0000 (07:19 -0500)]
Add DOCUMENTATION_URL as a standard value for /etc/os-release
It is very useful for distributions to be able to set a primary
documentation URL in a standard location so that users and
applications on the system can identify it. For example, many
headless systems these days use the "Cockpit" admin console. It
would be ideal if we could specify this location directly in the
os-release file so that any application or service could have a
well-known location for retrieving this and displaying it
appropriately. Users could likewise examine /etc/os-release to
learn this location.
Related: https://github.com/cockpit-project/cockpit/issues/10198
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Lennart Poettering [Thu, 4 Oct 2018 11:23:41 +0000 (13:23 +0200)]
Merge pull request #10263 from keszybz/test-fs-util-generalization
test-fs-util generalization
Yu Watanabe [Thu, 4 Oct 2018 07:22:11 +0000 (16:22 +0900)]
test: fix memleak in test-fs-util
Fixes #10267 and CID#1395997.
Zbigniew Jędrzejewski-Szmek [Wed, 3 Oct 2018 12:08:49 +0000 (14:08 +0200)]
test-fs-util: run all tests on the specified directory
This removes $RENAME_NOREPLACE_DIR and uses a command-line argument instead.
Logging is added, and tests are skipped if we get -EPERM or friends
(which happens on FAT and other filesystems).
Zbigniew Jędrzejewski-Szmek [Wed, 3 Oct 2018 11:42:08 +0000 (13:42 +0200)]
test-fs-util: simplify testdir creation
Zbigniew Jędrzejewski-Szmek [Wed, 3 Oct 2018 11:37:53 +0000 (13:37 +0200)]
Merge pull request #10251 from poettering/renameat-racy
rename_noreplace() fallback for file systems where neither RENAME_REPLACE nor link()/unlinkat() is available
Zbigniew Jędrzejewski-Szmek [Wed, 3 Oct 2018 09:04:41 +0000 (11:04 +0200)]
Merge pull request #10257 from pfl/dhcp6_pd_enable_later_link
DHCP6 PD enable later link
Zbigniew Jędrzejewski-Szmek [Wed, 3 Oct 2018 08:03:34 +0000 (10:03 +0200)]
Merge pull request #10261 from yuwata/test-network
test: small improvements for systemd-networkd-test.py
Yu Watanabe [Wed, 19 Sep 2018 05:17:29 +0000 (14:17 +0900)]
test-execute: also tests under the condition that unshare() is filtered
This is mainly for testing
1beab8b0d0ff2d7d1436b52d4a0c3d56dc908962.
Zbigniew Jędrzejewski-Szmek [Wed, 3 Oct 2018 06:31:55 +0000 (08:31 +0200)]
Merge pull request #10213 from yuwata/oss-fuzz-10746
dhcp6: fix issue oss-fuzz#10746
Yu Watanabe [Wed, 3 Oct 2018 05:38:30 +0000 (14:38 +0900)]
test: make systemd-networkd-tests.py run on arbitrary directory
Yu Watanabe [Wed, 3 Oct 2018 05:16:24 +0000 (14:16 +0900)]
test: replace stop+start by restart
This suppress the following warnings:
```
Warning: Stopping systemd-networkd.service, but it can still be activated by:
systemd-networkd.socket
```
Yu Watanabe [Sun, 30 Sep 2018 11:28:19 +0000 (20:28 +0900)]
test: add a testcase for oss-fuzz#10746
Yu Watanabe [Sun, 30 Sep 2018 11:23:58 +0000 (20:23 +0900)]
dhcp6: check option length before reading values
Fixes oss-fuzz#10746
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10746.
Yu Watanabe [Fri, 28 Sep 2018 11:52:48 +0000 (20:52 +0900)]
test: add test for sd_device
Joe Hershberger [Fri, 28 Sep 2018 20:32:35 +0000 (15:32 -0500)]
udev: Allow acpi_index and index to be "0"
0 can be a valid index returned by the BIOS, so allow that by using the
parsing function safe_atolu() to check for errors without excluding the
valid value "0".
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Patrik Flykt [Tue, 2 Oct 2018 18:29:09 +0000 (12:29 -0600)]
networkd-dhcp6: Request prefix delegation for a new link
Request prefix delegation for a new downstream link that is enabled
after any number of upstream DHCPv6 links. Submit the request after
the link has been configured with a link-local address.
If the upstream DHCPv6 client has already been configured to request
prefixes, attempt to re-assign any possible prefixes between the
already existing links and the new one. If no prefixes are yet
acquired, nothing will happen right away and any prefixes will be
distributed after a reply from the DHCPv6 server.
If none of the already existing downstream links have requested
DHCPv6 prefixes to be assigned, enable prefix delegation for each
client and restart them one by one if they are already running. This
causes the DHCPv6 clients to re-acquire addresses and prefixes and
to re-distribute them to all links when receiving an updated
response from their respective DHCPv6 servers. If the DHCPv6 client
in question was not already running, it is set to request prefixes
but not restarted.
When an error occurs while setting or restarting the DHCPv6 client,
log the incident and move over to the next link.
Fixes #9758.
Patrik Flykt [Tue, 2 Oct 2018 18:29:06 +0000 (12:29 -0600)]
networkd-dhcp: Rename function and reduce its logging
Rename dhcp6_verify_link() to dhcp6_get_prefix_delegation() in order
to be clearer in what it does. Reduce unnecessary logging.
David Strauss [Tue, 2 Oct 2018 16:22:45 +0000 (09:22 -0700)]
Docs: Update CoC with email alias for David Strauss
Lennart Poettering [Tue, 2 Oct 2018 16:00:10 +0000 (18:00 +0200)]
update TODO
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 15:56:31 +0000 (17:56 +0200)]
Merge pull request #10252 from poettering/recv-log-msg-bump
tiny sd-ravd/sd-ndisc logging fixes
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 15:54:36 +0000 (17:54 +0200)]
Merge pull request #10255 from poettering/hide-new-id128
drop references to "journalctl --new-id128"
Lennart Poettering [Tue, 2 Oct 2018 15:43:37 +0000 (17:43 +0200)]
Merge pull request #9898 from keszybz/id128
Add a new tool 'systemd-id128'
Lennart Poettering [Tue, 2 Oct 2018 15:42:55 +0000 (17:42 +0200)]
Merge pull request #10249 from keszybz/lgtm-fixes
Fixes for issues found by LGTM
Lennart Poettering [Tue, 2 Oct 2018 14:43:54 +0000 (16:43 +0200)]
tree-wide: drop all references to "journalctl --new-id128"
Let's advertise "systemd-id128 new" instead.
Lennart Poettering [Tue, 2 Oct 2018 14:42:30 +0000 (16:42 +0200)]
journalctl: drop --new-id128 from help and man texts
Let's remove redundancy and not advertise "journalctl --new-id128"
anymore, now that we have "systemd-id128 new" in a proper tool.
This allows us to reduce the overly large journalctl command set a bit.
Note that this just removes the --help and man text, the call remains
available for compat reasons.
Lennart Poettering [Tue, 2 Oct 2018 14:28:06 +0000 (16:28 +0200)]
update TODO
Lennart Poettering [Tue, 2 Oct 2018 14:26:50 +0000 (16:26 +0200)]
sd-radv: EAGAIN is not really unexpected, distinguishit from other errors when logging
Lennart Poettering [Tue, 2 Oct 2018 14:25:51 +0000 (16:25 +0200)]
sd-ndisc: generate debug log messages on unexpected errors
We really should make it possible to debug unexpected errors, hence log
something at LOG_DEBUG.
Lennart Poettering [Tue, 2 Oct 2018 14:22:54 +0000 (16:22 +0200)]
sd-radv: remove log_radv_warning_errno()
According to our CODING_STYLE our library code should generally not log
beyond LOG_DEBUG. Let's hence get rid of log_radv_warning_errno() and
just use log_radv_errno() instead.
Lennart Poettering [Tue, 2 Oct 2018 14:10:39 +0000 (16:10 +0200)]
test: add test case for rename_noreplace()
Lennart Poettering [Tue, 2 Oct 2018 11:34:18 +0000 (13:34 +0200)]
fs-util: add racy RENAME_NOREPLACE fallback using access()
Apparently FAT on some recent kernels can't do RENAME_NOREPLACE, and of
course cannot do linkat()/unlinkat() either (as the hard link concept
does not exist on FAT). Add a fallback using an explicit beforehand
faccessat() check. This sucks, but what we can do if the safe operations
are not available?
Fixes: #10063
Lennart Poettering [Tue, 2 Oct 2018 11:34:05 +0000 (13:34 +0200)]
fileio: fix error propagation in link_tmpfile()
Ronny Chevalier [Fri, 21 Sep 2018 13:59:25 +0000 (14:59 +0100)]
bus-unit-util: fix parsing of IPAddress{Allow,Deny}
While the config parser correctly handles the case of multiple IPs,
bus_append_cgroup_property was only parsing one IP,
and it would fail with "Failed to parse IP address prefix" when given
a list of IPs.
Lennart Poettering [Tue, 2 Oct 2018 13:45:21 +0000 (15:45 +0200)]
Merge pull request #10246 from keszybz/fuzz-buss
Bus fuzzer
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 10:46:31 +0000 (12:46 +0200)]
journal-upload: add asserts that snprintf does not return an error
LGMT complains:
> The size argument of this snprintf call is derived from its return value,
> which may exceed the size of the buffer and overflow.
Let's make sure that r is non-negative. (This shouldn't occur unless the format
string is borked, so let's just add an assert.)
Then, let's reorder the comparison to avoid the potential overflow.
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 10:35:37 +0000 (12:35 +0200)]
pid1: remove unnecessary error reassignment
LGTM was complaining:
> Comparison is always true because r >= 0.
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 10:31:13 +0000 (12:31 +0200)]
shared/install: avoid overwriting 'r' counter with a partial result
We want to store either the first error or the total number of changes in 'r'.
Instead, we were overwriting this with the return value from
install_info_traverse().
LGTM complained later in the loop that:
> Comparison is always true because r >= 0.
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 13:02:04 +0000 (15:02 +0200)]
Prettify printing of uuids
I know this a bit over the top, but I'm following reviewers' requests.
Zbigniew Jędrzejewski-Szmek [Tue, 21 Aug 2018 14:25:21 +0000 (16:25 +0200)]
man: add man page for systemd-id128
Zbigniew Jędrzejewski-Szmek [Tue, 21 Aug 2018 14:08:48 +0000 (16:08 +0200)]
systemd-id128: a new tool to print machine/boot/invocation/app-specific ids
The raison d'etre for this program is printing machine-app-specific IDs. We
provide a library function for that, but not a convenient API. We can hardly
ask people to quickly hack their own C programs or call libsystemd through CFFI
in python or another scripting language if they just want to print an ID.
Verb 'new' was already available as 'journalctl --new-id128', but this makes
it more discoverable.
v2:
- rename binary to systemd-id128
- make --app-specific= into a switch that applies to boot-id and machine-id
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 12:25:24 +0000 (14:25 +0200)]
sd-id128: add sd_id128_get_boot_app_specific()
Zbigniew Jędrzejewski-Szmek [Tue, 21 Aug 2018 13:38:04 +0000 (15:38 +0200)]
journalctl: move generate_new_id128() to shared
Evgeny Vereshchagin [Mon, 1 Oct 2018 22:37:17 +0000 (22:37 +0000)]
icmp6-util: stop ignoring EAGAIN and EINTR in icmp6_receive
The code handling the errors was originally part of ndisc_recv, which,
being an event handler, would be simply turned off if it returned a negative
error code. It's no longer necessary. Plus, it helps avoid passing
an uninitialized value to radv_send.
Closes https://github.com/systemd/systemd/issues/10223.
Zbigniew Jędrzejewski-Szmek [Tue, 2 Oct 2018 10:26:23 +0000 (12:26 +0200)]
journal-verify: add comment and silence LGTM warning