| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
- their names are prefixed with "journal_",
- make them not directly use global variables,
- simplifies the loop counter in find_boot_by_offset().
|
|
|
|
| |
To make journal entries always contain valid boot ID.
|
|
|
|
|
| |
The two callers of journal_file_append_entry_internal() always pass
non-NULL boot ID.
|
|
|
|
|
|
| |
journal_file_verify_header()
Then, we can drop the redundant check in journal_file_read_tail_timestamp().
|
| |
|
|\
| |
| | |
Small fixups for first boot
|
| | |
|
|\ \
| | |
| | | |
resolved: minor varlink API tweaks
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
So, unfortunately oomd uses "io.system." rather than "io.systemd." as
prefix for its sockets. This is a mistake, and doesn't match the
Varlink interface naming or anything else in oomd.
hence, let's fix that.
Given that this is an internal protocol between PID1 and oomd let's
simply change this without retaining compat.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
O_CLOEXEC too
Let's move setting of O_NONBLOCK into varlink_server_listen_fd() and out
of varlink_server_create_listen_fd_socket(). The latter has two callers:
varlink_server_listen_fd() and varlink_server_listen_address(), which
guarantees O_CLOEXEC+O_NONBLOCK anyway, hence no neet to repeat the
logic.
|
| | |
| | |
| | |
| | | |
partition we want to write
|
| |/
|/|
| |
| |
| | |
Let#s make sure we never shorten the allocation leaving an invalid
string (i.e. a memory allocation without a trailing NUL) around.
|
|/ |
|
|
|
|
|
| |
Let's make the tool a tiny bit more generic by allowing the PCR index to
measure into to be configurable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tool initially just measured the boot phase, but was subsequently
extended to measure file system and machine IDs, too. At AllSystemsGo
there were request to add more, and make the tool generically
accessible.
Hence, let's rename the binary (but not the pcrphase services), to make
clear the tool is not just measureing the boot phase, but a lot of other
things too.
The tool is located in /usr/lib/ and still relatively new, hence let's
just rename the binary and be done with it, while keeping the unit names
stable.
While we are at it, also move the tool out of src/boot/ and into its own
src/pcrextend/ dir, since it's not really doing boot related stuff
anymore.
|
|
|
|
|
| |
(#29290)
To support multiple DHCP servers in a network.
|
|\
| |
| | |
sd-ndisc: make sd_ndisc return time values in usec
|
| |
| |
| |
| |
| | |
This also introduces sd_ndisc_router_get_lifetime_timestamp() and
friends that return timestamp rather than timespan.
|
| | |
|
| |
| |
| |
| |
| | |
No functional change, just refactoring and preparation for later
commits.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
No functional change, just refactoring and preparation for later
commits.
|
| |
| |
| |
| |
| | |
No functional change, just refactoring and preparation for later
commits.
|
| |
| |
| |
| | |
Follow-up for efb6a76a2a097132087ee30720421136cba9e708
|
| |
| |
| |
| |
| |
| | |
When booting from virtiofs, we won't be able to find a root block
device. Let's gracefully handle this similar to how we don't fail
if we can't find a GPT partition table.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Use a helper to simplify parsing of ranges in netdev config and related changes
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The macro used to return NULL if input was NULL or had the wrong type. Now
it asserts that input is nonnull and it has the expected type.
There are a few places where a missing or mismatched type was OK, but in a
majority of places, we would do both of the asserts. In various places we'd
only do one, but that was by ommission/mistake. So moving the asserts into the
macro allows us to save some lines.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
We have two fields: inherit and ttl, and ttl is ignored if inherit is true.
Setting TTL=inherit and later TTL=n would not work because we didn't unset
inherit.
|
| | |
| | |
| | |
| | |
| | | |
The docs for FlowLabel= said that the range is 0..1048575, but the code did not
reject negative numbers.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, we would call parse_ip_protocol(), which internally calls
safe_atoi(), and then call safe_atou(). This isn't terrible, but it's also
slightly confusing. Use parse_ip_protocol_full() to avoid the second call.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Optionally, accept protocols that don't have a known name.
Avoid any allocations in the common case.
Return more granular error codes: -ERANGE for negative values,
-EOPNOTSUPP if the protocol is a valid number, but we don't know
the protocol, and -EINVAL only if it's not a numerical string.
|
| | |
| | |
| | |
| | | |
parse_ip_port_range() DTRT and only sets the output on success.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This compresses repetetive code and makes it easier to add new options
in networkd. The formatting of error messages becomes uniform. The
error message always specifies the rvalue literally, instead of using
a "descriptive name". This makes the message much easier to handle for
the user.
I opted to add just one parser, and wrap it with inline functions to proxy
the type. This is less verbose than copying functions for each type
separately, and the compiler should be able to get rid of the inline wrapper
almost entirely.
asserts are reordered to use the same order as the parameter list.
This makes the code easier to read.
No functional change intended, apart from the difference in error message
formatting.
|
| | |
| | |
| | |
| | |
| | | |
"parse_range" is already used for stuff like "a-b", so use "bounded" here to
avoid confusion.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
SYNTHETIC_ERRNO() is used where appropriate.
Splits in message format strings are removed, so that it's easier to
read/grep/copy them.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the column is "-" and the X context variant specifer only
contains commas, we should also give the match bonus. The variant
string is supposed to be a comma-separated list as long as the
list of layouts, so it's quite natural for consumers to be written
in such a way that they pass a string only containing commas if
there are multiple layouts and no variants. anaconda is a real
world case that does this.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
Otherwise, e.g. sd_journal_get_monotonic_usec() return an empty boot ID
when called for such a broken entry object.
Such a broken object may be stored when the system was not cleanly shutdown.
Fixes #29167.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For file:// links, we urlify the link so that the user can click and either
open the file in a editor or some viewer. The detection is chosen via some
mechanism implemented by the terminal emulator. This seems too DTRT for text
files and PDFs, which should cover the majority of realistic cases. If the file
is not viable, the terminal emulator will say
"Could not open file://…. No application is registered to view this file type."
or similar.
For all other links, which are primarily http:// and https://, we just show the
link, letting the terminal handle the hyperlinking. The user can then ctrl-click
and open the file it their browser. If we tried to open the files automatically,
we'd would need to open many pages, and we'd need to figure out what browser to
use, etc. When the user picks whether to open the file, this leads to a nicer
user experience.
Man pages are separated by an empty line from preceding in and following output.
In my testing, this makes the output easier to read. A bit of explicit flushing
is needed to make sure that various outputs are not interleaved.
Fixes https://github.com/systemd/systemd/issues/29061.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 9289e093ae6fd5484f9119e1ee07d1dffe37cd10 we started using install_emptydir().
When running unprivileged, 'DESTDIR=… meson install -C build --quiet --no-rebuild'
would emit two warnings:
'…/var/log/journal': Unable to set owner 'root' and group 'root': Operation not permitted, ignoring...
'…/var/log/journal/remote': Unable to set owner 'root' and group 'root': Operation not permitted, ignoring...
Those were the only two install_emptydir()s that specified ownership.
Let's drop the user/group specification to get rid of the warning.
When installing as root, we will create a root-owned directory anyway.
When not running as root, we cannot create a root-owned directory.
So this specification only makes a difference if we are running as root,
and the directory already existed, and was not owned by root. In that case,
I think it's actually better to leave the existing modification in place.
(E.g. maybe the admin chgrp'ed the ownership for whatever reason. We might
just as well leave that in place.)
|
|\ \
| | |
| | | |
sd-radv: use usec_t
|
| | | |
|