Age | Commit message (Collapse) | Author |
|
|
|
It's a good idea to store away the recption time of LLDP packets in the
neighbor object, simply because the LLDP data only has a validity of a certain
amount of time.
Hence, let's record the timestamp when we receive the datagram and expose an
API for it. Also, automatically expire LLDP neighbors based on this new
timestamp.
|
|
|
|
We already have a double timestamp object that we use whenever we need both a
MONOTONIC and a REALTIME timestamp taken and stored. With this change we
also add a triple timestamp object that in addition stores a BOOTTIME
timestamp, which is useful for a few usecases.
Note that we keep dual_timestamp around, as it is useful in many cases where
triple_timestamp is not, in particular because retrieving the monotonic and
realtime timestamps is much cheaper on Linux that getting the boottime
timestamp.
|
|
changed via bus calls
This also moves log message generation into manager_write_resolv_conf(), so
that it is shorter to invoke the function, given that we have to invoke it at a
couple of additional places now.
Fixes: #3225
|
|
Make sure we can parse DNS server addresses that use the "zone id" syntax for
local link addresses, i.e. "fe80::c256:27ff:febb:12f%wlp3s0", when reading
/etc/resolv.conf.
Also make sure we spit this out correctly again when writing /etc/resolv.conf
and via the bus.
Fixes: #3359
|
|
|
|
|
|
As discovered by Adam Williamson in
https://bugzilla.redhat.com/show_bug.cgi?id=1333998#c32, after the changes in
81fd105a5f9 we would only match compound layouts, i.e. a comma would be
required after 'ru' to match. This seems wrong, and we should match single
layouts like too. So 'ru', 'ru,us' now both match.
startswith_comma is changed to not require a comma, i.e. check that the prefix
matches until a comma or the end of the string. Note that startswith_comma is
called twice. At the first site, we check that strings are not equal
beforehand, so this change to startswith_comma has no effect. At the second
site, it does have an effect, as described above.
|
|
Rework the code a bit where find_converted_keymap cannot (and should not) be
called with a null layout, so streq can be used instead of streq_ptr, etc.
Note that the behaviour of vconsole_convert_to_x11 and x11_convert_to_vconsole
is not symmetrical. When the latter cannot find a match, it simply makes the
vconsole mapping empty. But vconsole_convert_to_x11 leaves the x11 layout
unchanged. I don't know what the proper solution is here, so I'm just adding
more verbose logging without changing the logic.
|
|
I was puzzled why "localectl set-keymap pl" does not change the X11 keymap.
Output a message at notice level, becuase not converting the X11 keymap
is most likely an error. We usually do not output non-debug messages
from "library" code, but this isn't really library code, it's split out
to a separate file only to allow it to be called from tests.
(pl is not converted because we only have a mapping for pl2. This is
intentional, even though we might want to change this. In any case, the
conversion code works correctly.)
|
|
When converting an empty x11 variant, we would not delete vconsole mapping
properly.
find_legacy_keymap() is made non-static. I think it's important to be able to
test it. In principle we could also test it through the higher-level interface
of x11_convert_to_vconsole, but x11_convert_to_vconsole also uses
find_converted_keymap, and it's better to test at this lower level.
Note that find_legacy_keymap might be a bit of a misnomer, because we'd probably
want to keep kbd-model-map even if the "legacy" layouts went away. So we might
want to change this name, but I'm leaving that for another commit.
|
|
This way the dbus and management logic is seperated from the business logic
and we can write test cases for the mapping functionality.
|
|
|
|
this patch solves the following waring:
../src/network/networkd-ndisc.c:197:13: warning: unused variable ‘r’
[-Wunused-variable]
int r;
fixes acac5b2f
|
|
|
|
When many services are running, it was difficult to see only the interesting ones.
This patch allows to show only the subtree of interest.
|
|
This basically reverts 7b2fd9d51259f6cf350791434e640ac3519acc6c ("core:
remove duplicate code in automount_update_mount()").
This was not duplicate code. The expire_tokens need to be handled as well:
Send 0 == success for MOUNT_DEAD (umount successful), do nothing for
MOUNT_UNMOUNTING (not yet done) and an error for everything else.
Otherwise the automount logic will assume unmounting is not done and will
not send any new requests for mounting. As a result, the corresponding
mount unit is never mounted.
Without this, automounts with TimeoutIdleSec= are broken. Once the idle
timeout triggered a umount, any access to the corresponding filesystem
hangs forever.
Fixes #3332.
|
|
This makes systemctl robust regarding journal truncation.
This is a follow-up for 2cf4172a71860c6e44
Fixes:
Core was generated by `./systemctl status systemd-journald'.
Program terminated with signal SIGBUS, Bus error.
PID 8569 - core
TID 8569:
#0 0x00007f246cc89ed6 __memcmp_sse4_1
#1 0x0000557ebbc6f42c journal_file_init_header
#2 0x0000557ebbc77262 journal_file_open
#3 0x0000557ebbc42999 file_type_wanted
#4 0x0000557ebbc42e08 add_any_file
#5 0x0000557ebbc43832 add_directory
#6 0x0000557ebbc4401c add_root_directory
#7 0x0000557ebbc442e9 add_root_directory
#8 0x0000557ebbc446fc add_search_paths
#9 0x0000557ebbbacb5e show_journal_by_unit
#10 0x0000557ebbb8376d print_status_info
#11 0x0000557ebbb86a0b show_one
#12 0x0000557ebbb87954 show
#13 0x0000557ebbc20b1f dispatch_verb
#14 0x0000557ebbb90615 systemctl_main
#15 0x0000557ebbb9159f main
#16 0x00007f246cb3e731 __libc_start_main
#17 0x0000557ebbb75ae9 _start
|
|
Assorted stuff
|
|
Obviously we've been using the wrong handler here. Fixes #3352.
|
|
|
|
This covers the address/routers acquire dynamically.
|
|
We generally only use "const" to constify the destination of pointers, but not
the pointers themselves, as they are copied anyway during C function
invocation. Hence, drop this usage of "const".
|
|
Drop weird "const" usage, and use size_t for sizes.
|
|
addresses/routes/fdb entries
We should put a limit on everything, hence also on these resources.
|
|
New exec boolean MemoryDenyWriteExecute, when set, installs
a seccomp filter to reject mmap(2) with PAGE_WRITE|PAGE_EXEC
and mprotect(2) with PAGE_EXEC.
|
|
networkd-dhcp6: DHCPv6 starting fixes
|
|
core: log cgroup legacy and unified hierarchy setting translations
|
|
Recently added cgroup unified hierarchy support uses "max" in configurations
for no upper limit. While consistent with what the kernel uses for no upper
limit, it is inconsistent with what systemd uses for other controllers such as
memory or pids. There's no point in introducing another term. Update cgroup
unified hierarchy support so that "infinity" is the only term that systemd
uses for no upper limit.
|
|
|
|
There are many cgroups-related changes (thanks, @htejun!)
This commit will simplify testing a bit.
Use:
make run UNIFIED_CGROUP_HIERARCHY=yes to enable cgroup-v2
make run UNIFIED_CGROUP_HIERARCHY=no to enable cgroup-v1
|
|
Write comments about "too many search domains" and "Total length of all search
domains is too long" just once. Also put it on a separate line, as
resolv.conf(5) only specifies comments in a line by themselves.
This is ugly to do if write_resolv_conf_search() gets called once for every
search domain. So change it to receive the complete OrderedSet instead and do
the iteration by itself.
Add test cases to networkd-test.py.
https://launchpad.net/bugs/1588229
|
|
Like many other recent thinkpads the factory default pointingstick
sensitivity on these devices is quite low, making the pointingstick
very slow in moving the cursor.
This extends the existing hwdb rules for tweaking the sensitivity to
also apply to the X1 carbon 4thgen model.
|
|
To accommodate changes in kernel interface, cgroup unified hierarchy support
added several configuration items which overlap with the existing resource
control settings and there is simple config translation between the overlapping
settings to ease the transition. As why certain cgroup knobs are being
configured can become confusing, this patch adds a master warning message which
is printed once when such translation is first used and logs each translation
with a debug message.
v2:
- Switched to log_unit*().
|
|
cgroup_context_apply() and friends take CGroupContext and cgroup path as input
and has no way of getting back to the associated Unit and thus uses raw cgroup
path for logging. This makes the log messages difficult to track down.
There's no reason to avoid passing in Unit into these functions. Pass in Unit
and use log_unit*() instead.
While at it, make cgroup_context_apply(), which has no outside users, static.
Also, drop cgroup path from log messages where the path itself isn't too
interesting and can be easily obtained from the unit.
|
|
For it's silly and unnecessary. Although it was apparently mandated by RFC 2462 in [5.5.2. Absence of Router Advertisements], that has been changed in the same section of RFC 4862, which obsoleted the former RFC.
|
|
Implement sets of system calls to help constructing system call
filters. A set starts with '@' to distinguish from a system call.
Closes: #3053, #3157
|
|
In the same vein as commit ac59f0c12c117b9bb5b7e17f33987b0107791239 which added
the --wait option to the emergency service, this patch makes sure that plymouth
has exited before entering into the rescue mode.
|
|
dhcp6_request_address() was merely a function to switch the DHCPv6 client from "stateless" mode to "stateful" mode. It was also a one-way switch. Also, to (re)start the client, we would need to repeat separate function calls.
In this patch, dhcp6_request_address() is made a general starter/manager of the DHCPv6 client. It now takes an extra parameter so we will be specifying which mode the DHCPv6 client should be started in. Also it will keep track of the current mode and compare with the newly requested mode, and only restart the client in case there is a difference between them.
This also makes sure that the DHCPv6 client will be (re)started accordingly as per the Router Advertisement flags.
|
|
systemctl --property doesn't validate if a requested property is valid or not,
and always returns with an exit code of 0, regardless of whether the requested
property exists or not.
How reproducible:
This works fine:
Id=multi-user.target
But put in a non-existing property:
Id=default.targets.service
Id=default.targets.service
0
[root@shou18lkvm8 ~]# systemctl show --property Id this.is.rubbish; echo $?
Id=this.is.rubbish.service
0
After:
sus@maximus bz-95593]$ ./systemctl show --property Id this.is.rubbish; echo $?
Can't display property this.is.rubbish. Unit this.is.rubbish.service does not
exist.
4
fixes #2295
|
|
Now we just using constants for the init script exit status codes.
Replace those error codes with enum so that it's more meaningful
and readable.
|
|
Fixes: 9ed8b06c9be4a5efae432d5cf4b1c47d03e6f107
|
|
Side-effect of https://bugs.freedesktop.org/show_bug.cgi?id=94989
|
|
As suggested in
https://github.com/systemd/systemd/issues/3282#issuecomment-220264509
|
|
|
|
|
|
Let's better ignore an invalid message size parameter, than assume ridiculously
larger sizes.
|
|
As suggested here:
https://bugs.freedesktop.org/show_bug.cgi?id=64737#c8
This adds a new call terminal_is_dumb() and makes use of this where
appropriate.
|
|
|