Zbigniew Jędrzejewski-Szmek [Wed, 11 Nov 2020 13:37:07 +0000 (14:37 +0100)]
meson: use "_" as separator in test names
":" is prettier, but meson 0.56+ doesn't like it:
src/systemd/meson.build:73: DEPRECATION: ":" is not allowed in test name "cc-sd-bus.h:c", it has been replaced with "_"
src/systemd/meson.build:73: DEPRECATION: ":" is not allowed in test name "cc-sd-bus.h:c-ansi", it has been replaced with "_"
...
Fixes #17568.
Lennart Poettering [Wed, 11 Nov 2020 13:11:02 +0000 (14:11 +0100)]
Merge pull request #16603 from benzea/benzea/special-app-slice
Use app.slice by default in user manager (and define special user slices)
Zbigniew Jędrzejewski-Szmek [Tue, 10 Nov 2020 16:24:22 +0000 (17:24 +0100)]
NEWS,man: tweak the description of FixedRandomDelay=
Explain why this is useful, but don't describe the implementation exactly,
since we're likely to want to change details in the future.
Zbigniew Jędrzejewski-Szmek [Thu, 5 Nov 2020 12:59:17 +0000 (13:59 +0100)]
user: move "extrinsic" units to their root slice
With the grandparent change to move most units to app.slice,
those units would be ordered After=app.slice which doesn't make any sense.
Actually they appear earlier, before the manager is even started, and
conceputally it doesn't seem useful to put them under any slice.
Zbigniew Jędrzejewski-Szmek [Tue, 10 Nov 2020 15:59:30 +0000 (16:59 +0100)]
Merge pull request #17566 from poettering/v247-rc2-prep
V247 rc2 prep
Zbigniew Jędrzejewski-Szmek [Thu, 5 Nov 2020 12:08:02 +0000 (13:08 +0100)]
pid1: expose "extrinsic" status of swaps and mounts
The only visible change from this is that we show Extrinsic: yes/no
in dumps for swap units (this was already done for mount units).
Lennart Poettering [Tue, 10 Nov 2020 13:20:06 +0000 (14:20 +0100)]
man: properly list relative time event source API in man page
The content was already there, but it wasn't listed in the header
metadata. Fix that.
Lennart Poettering [Tue, 10 Nov 2020 13:16:17 +0000 (14:16 +0100)]
hwdb: update
Lennart Poettering [Tue, 10 Nov 2020 13:12:27 +0000 (14:12 +0100)]
git-contrib: exclude -rc tags
Lennart Poettering [Tue, 10 Nov 2020 13:12:08 +0000 (14:12 +0100)]
update NEWS
Lennart Poettering [Tue, 10 Nov 2020 12:29:04 +0000 (13:29 +0100)]
Merge pull request #17497 from anitazha/randomizeonce
timer: add new feature FixedRandomDelay=
onlybugreports [Tue, 10 Nov 2020 12:16:13 +0000 (09:16 -0300)]
Add Logitech G403 Prodigy Gaming Mouse to hwdb. (#17537)
This PR adds logitech G403 to the hwdb.
Settings were obtained with 'sudo mouse-dpi-tool /dev/input/event3' and 'ratbagctl hollering-marmot info'.
Lennart Poettering [Tue, 10 Nov 2020 12:15:10 +0000 (13:15 +0100)]
Merge pull request #17555 from yuwata/ethtool-get-driver
ethtool: make ethtool_get_driver() return -ENODATA if driver is an empty string.
Yu Watanabe [Mon, 9 Nov 2020 06:23:32 +0000 (15:23 +0900)]
journal: refuse skip parameter for sd_journal_next_skip() larger than INT_MAX
Fixes #17502.
Zbigniew Jędrzejewski-Szmek [Tue, 10 Nov 2020 08:41:57 +0000 (09:41 +0100)]
Merge pull request #17431 from msekletar/udev-link-update-race
udev: make algorithm that selects highest priority devlink less susceptible to race conditions
Yu Watanabe [Mon, 9 Nov 2020 20:40:58 +0000 (05:40 +0900)]
sd-bus: drop redundant abs()
strerror_safe() internally applies abs().
Yu Watanabe [Mon, 9 Nov 2020 14:59:36 +0000 (23:59 +0900)]
core: add missing oom check
Fixes #17552.
Zbigniew Jędrzejewski-Szmek [Mon, 9 Nov 2020 14:39:29 +0000 (15:39 +0100)]
udev: log when we fail to query ID_NET_DRIVER
Inspired by #17532.
Zbigniew Jędrzejewski-Szmek [Mon, 9 Nov 2020 20:07:16 +0000 (21:07 +0100)]
Merge pull request #17551 from yuwata/radv-router-lifetime
network: about router lifetime
Yu Watanabe [Mon, 9 Nov 2020 16:14:38 +0000 (01:14 +0900)]
ethtool: make ethtool_get_driver() return -ENODATA if ioctl succeeds but driver name is empty
Inspired by #17532.
Yu Watanabe [Mon, 9 Nov 2020 16:04:36 +0000 (01:04 +0900)]
ethtool: add several assertions
Yu Watanabe [Mon, 9 Nov 2020 07:49:33 +0000 (16:49 +0900)]
network: convert router lifetime from usec_t to uint16_t
Yu Watanabe [Mon, 9 Nov 2020 07:41:17 +0000 (16:41 +0900)]
sd-radv: refuse to set preference except medium when router lifetime is zero
Yu Watanabe [Mon, 9 Nov 2020 07:35:24 +0000 (16:35 +0900)]
sd-radv: router lifetime is uint16_t
Yu Watanabe [Mon, 9 Nov 2020 07:29:32 +0000 (16:29 +0900)]
network: make default router lifetime to 30min
Closes #17527.
Lennart Poettering [Mon, 9 Nov 2020 15:04:01 +0000 (16:04 +0100)]
Merge pull request #17549 from yuwata/tiny-fixes
tiny fixes
Zbigniew Jędrzejewski-Szmek [Mon, 9 Nov 2020 08:34:31 +0000 (09:34 +0100)]
Merge pull request #17548 from yuwata/license-update
License: LGPL-2.1+ -> LGPL-2.1-or-later, and GPL-2.0+ -> GPL-2.0-or-later
Yu Watanabe [Mon, 9 Nov 2020 05:40:02 +0000 (14:40 +0900)]
core: reduce scope of variants
Fixes #17543.
Yu Watanabe [Mon, 9 Nov 2020 05:33:16 +0000 (14:33 +0900)]
sd-bus: fix possible division by 0
Fixes #17541.
Yu Watanabe [Mon, 9 Nov 2020 05:00:14 +0000 (14:00 +0900)]
home: fix copy-and-paste mistake
Fixes #17542.
Yu Watanabe [Mon, 9 Nov 2020 04:25:50 +0000 (13:25 +0900)]
license: GPL-2.0+ -> GPL-2.0-or-later
Yu Watanabe [Mon, 9 Nov 2020 04:23:58 +0000 (13:23 +0900)]
license: LGPL-2.1+ -> LGPL-2.1-or-later
fwSmit [Sat, 7 Nov 2020 11:20:03 +0000 (12:20 +0100)]
hwdb: Add support for HP ZBook Studio G5 keyboard (#17525)
I tested this on my ZBook Studio G5. I'm not sure if this works for other ZBook studio machines.
I have two more notes on this PR:
- some keys send multiple scancodes. I matched only on one of them, because I couldn't figure out how to match
on all of them. This results in the others still being visible:
Event: time
1604520228.146226, -------------- SYN_REPORT ------------
Event: time
1604520228.151533, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time
1604520228.151533, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
Event: time
1604520228.151533, -------------- SYN_REPORT ------------
Event: time
1604520228.259862, type 4 (EV_MSC), code 4 (MSC_SCAN), value 38
Event: time
1604520228.259862, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 0
Event: time
1604520228.259862, -------------- SYN_REPORT ------------
Event: time
1604520228.259944, type 4 (EV_MSC), code 4 (MSC_SCAN), value 66
Event: time
1604520228.259944, type 1 (EV_KEY), code 218 (KEY_CONNECT), value 0
Event: time
1604520228.259944, -------------- SYN_REPORT ------------
Event: time
1604520228.266513, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time
1604520228.266513, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 0
Event: time
1604520228.266513, -------------- SYN_REPORT ------------
I wanted to set the display key to switchvideomode, but another key is already set to that, so I set it to displaytoggle instead.
Lennart Poettering [Fri, 6 Nov 2020 17:08:38 +0000 (18:08 +0100)]
resolved: fix non-initialized memory access
Fix for bug introduced in
1ed314087fab3988f3221b1b736a7e711f174349.
Lennart Poettering [Fri, 6 Nov 2020 21:39:09 +0000 (22:39 +0100)]
Merge pull request #17534 from poettering/resolved-more-tweaks
seven smaller resolved tweaks
Lennart Poettering [Fri, 6 Nov 2020 10:46:39 +0000 (11:46 +0100)]
resolved: slightly extend debug log output about outgoing messages
Lennart Poettering [Thu, 5 Nov 2020 13:16:03 +0000 (14:16 +0100)]
resolved: don't resolve "local." via LLMNR
It's the mDNS top-level domain, hence don't consider it for LLMNR, ever.
Fixes: #16233
Lennart Poettering [Thu, 5 Nov 2020 08:45:12 +0000 (09:45 +0100)]
resolved: add comments for various query flags
Lennart Poettering [Wed, 4 Nov 2020 20:01:49 +0000 (21:01 +0100)]
resolved: show all answer flags when dumping answer
Lennart Poettering [Wed, 4 Nov 2020 19:42:02 +0000 (20:42 +0100)]
resolved: add minor optimization path to dns_answer_merge()
Lennart Poettering [Thu, 5 Nov 2020 14:49:15 +0000 (15:49 +0100)]
resolved: suppress misleading debug message about ignored resolv.conf line
Lennart Poettering [Fri, 6 Nov 2020 13:30:25 +0000 (14:30 +0100)]
errno: ETIMEDOUT is also a connection error
Michal Sekletár [Fri, 23 Oct 2020 14:30:23 +0000 (16:30 +0200)]
udev: make algorithm that selects highest priority devlink less susceptible to race conditions
Previously it was very likely, when multiple contenders for the symlink
appear in parallel, that algorithm would select wrong symlink (i.e. one
with lower-priority).
Now the algorithm is much more defensive and when we detect change in
set of contenders for the symlink we reevaluate the selection. Same
happens when new symlink replaces already existing symlink that points
to different device node.
Michal Sekletár [Thu, 5 Nov 2020 16:55:25 +0000 (17:55 +0100)]
basic/stat-util: make mtime check stricter and use entire timestamp
Note that st_mtime member of struct stat is defined as follows,
#define st_mtime st_mtim.tv_sec
Hence we omitted checking nanosecond part of the timestamp (struct
timespec) and possibly would miss modifications that happened within the
same second.
Ronan Pigott [Wed, 28 Oct 2020 06:53:23 +0000 (23:53 -0700)]
journalctl: show boot id in the reboot context separator
Jian-Hong Pan [Thu, 5 Nov 2020 04:22:08 +0000 (12:22 +0800)]
hwdb: Fix Pinebook Pro's brightness up/down and sleep keys
Pinebook Pro's display brightness up & down keys do not work until the
keys are mapped to the corresponding codes.
Also, the sleep key is mapped to KEY_POWER code originally. This quirk
maps the sleep key to the KEY_SLEEP code.
This idea comes from the pinebookpro-post-install package [1] of Manjaro
ARM, which is the preloaded OS on Pinebook Pro.
[1]: https://gitlab.manjaro.org/manjaro-arm/packages/community/pinebookpro-post-install/-/commit/
7ab1a134ea9d5b55d99de567d1ebee4ebd6f6640
Lennart Poettering [Mon, 2 Nov 2020 13:51:10 +0000 (14:51 +0100)]
seccomp: allow turning off of seccomp filtering via env var
Fixes: #17504
(While we are it, also move $SYSTEMD_SECCOMP_LOG= env var description
into the right document section)
Also suggested in: https://github.com/systemd/systemd/issues/17245#issuecomment-
704773603
Kristijan Gjoshev [Sat, 1 Feb 2020 17:27:08 +0000 (18:27 +0100)]
timer: add new feature FixedRandomDelay=
FixedRandomDelay=yes will use
`siphash24(sd_id128_get_machine() || MANAGER_IS_SYSTEM(m) || getuid() || u->id)`,
where || is concatenation, instead of a random number to choose a value between
0 and RandomizedDelaySec= as the timer delay.
This essentially sets up a fixed, but seemingly random, offset for each timer
iteration rather than having a random offset recalculated each time it fires.
Closes #10355
Co-author: Anita Zhang <the.anitazha@gmail.com>
Lennart Poettering [Wed, 4 Nov 2020 14:46:51 +0000 (15:46 +0100)]
update TODO
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 18:47:26 +0000 (19:47 +0100)]
selinux: also try the netlink-based fallback and continue on permission error
Fedora Rawhide still has the old policy, so selinux prevents our selinux code
from checking if selinux is enabled. But it seems smart to fall back to the old
API anyway.
Follow-up for
fd5e402fa9377f2860e02bdb5b84d5f5942e73f4.
Both the reference policy [1] and Fedora selinux policy [2] needed to be
updated, so it's likely that this will impact other distros too.
[1] https://github.com/SELinuxProject/refpolicy/pull/308
[2] https://github.com/fedora-selinux/selinux-policy/pull/464
Topi Miettinen [Mon, 2 Nov 2020 11:10:24 +0000 (13:10 +0200)]
shared/seccomp-util: move stime() to @obsolete
Quoting the manual page of stime(2): "Starting with glibc 2.31, this function
is no longer available to newly linked applications and is no longer declared
in <time.h>."
Zbigniew Jędrzejewski-Szmek [Tue, 3 Nov 2020 14:13:20 +0000 (15:13 +0100)]
sd-login: fix parsing in sd_uid_is_on_seat
Bug introduced in
81823e6c12771721e9a729f6280a9de26fd70bad:
logind uses spaces not commas to separate items.
Zbigniew Jędrzejewski-Szmek [Wed, 4 Nov 2020 08:38:09 +0000 (09:38 +0100)]
Merge pull request #17521 from poettering/resolved-more-fixes
six fixes to resolved
Zbigniew Jędrzejewski-Szmek [Wed, 4 Nov 2020 08:26:31 +0000 (09:26 +0100)]
Merge pull request #17517 from keszybz/revert-hwdb-trailing-colon
Revert hwdb trailing colon
Zbigniew Jędrzejewski-Szmek [Wed, 4 Nov 2020 08:22:15 +0000 (09:22 +0100)]
Merge pull request #17493 from Villemoes/va-arg-simplifications
Some vararg simplifications
Anita Zhang [Fri, 30 Oct 2020 23:16:31 +0000 (16:16 -0700)]
man: add <option> around default booleans in systemd.timer
Lennart Poettering [Tue, 3 Nov 2020 19:34:21 +0000 (20:34 +0100)]
resolved: handle RRs where we don't have a signer
If we encounter an RR that has no matching signature, then we don't know
whether it was expanded from a wildcard or not. We need to accept that
and not make the NSEC test fail, just skip over the RR.
Lennart Poettering [Wed, 28 Oct 2020 14:12:32 +0000 (15:12 +0100)]
resolved: drop unused family argument from manager_routable()
Lennart Poettering [Wed, 28 Oct 2020 13:54:12 +0000 (14:54 +0100)]
resolved: fix dumping of DnsAnswer objects
Lennart Poettering [Tue, 3 Nov 2020 17:31:03 +0000 (18:31 +0100)]
resolved: put size limit in DnsAnswer size to UINT16_MAX
The three answer sections can only carry up to UINT16_MAX entries, hence
put a hard upper limit on how far DnsAnswer can grow. The three count
fields in the DNS packet header are 16 bit only, hence the limit.
If code actually tries to add more than 64K RRs it will get ENOSPC with
this new checking.
And similar to DnsQuestion.
Lennart Poettering [Tue, 3 Nov 2020 17:06:47 +0000 (18:06 +0100)]
resolved: check return value of memdup() correctly for OOM
Lennart Poettering [Thu, 29 Oct 2020 17:58:04 +0000 (18:58 +0100)]
man: remove misplaced comma
Zbigniew Jędrzejewski-Szmek [Tue, 3 Nov 2020 13:28:14 +0000 (14:28 +0100)]
Partially revert "hwdb: reindent commments and say that "*" should always be trailing"
This partially reverts commit
62ad1c6495c098a09b36bb20bb37a9b8a11df76f.
I kept the reindents and other cosmetic changes, but removed the statements
about trailing ":*".
Zbigniew Jędrzejewski-Szmek [Tue, 3 Nov 2020 13:26:51 +0000 (14:26 +0100)]
Revert "parse_hwdb: enforce the ":*" suffix"
This reverts commit
ad2d8e61eeab27f3e36572c7981362227357f420.
Rasmus Villemoes [Fri, 30 Oct 2020 09:54:15 +0000 (10:54 +0100)]
strv.c: simplify strv_new_ap
Instead of duplicating the code for x and the varargs, handle them all the same
way by using for loops.
Rasmus Villemoes [Fri, 30 Oct 2020 09:27:55 +0000 (10:27 +0100)]
signal-util: make sigaction_many_ap a little more concise
There's no reason to duplicate the stop condition sig < 0, nor the sigaction()
call.
Rasmus Villemoes [Fri, 30 Oct 2020 09:18:04 +0000 (10:18 +0100)]
string-util: improve overflow checking
The current overflow checking is broken in the corner case of the strings'
combined length being exactly SIZE_MAX: After the loop, l would be SIZE_MAX,
but we're not testing whether the l+1 expression overflows.
Fix it by simply pre-accounting for the final '\0': initialize l to 1 instead
of 0.
Rasmus Villemoes [Fri, 30 Oct 2020 09:13:27 +0000 (10:13 +0100)]
string-util: simplify logic in strjoin_real()
The loops over (x, then all varargs, until a NULL is found) can be written much
simpler with an ordinary for loop. Just initialize the loop variable to x, test
that, and in the increment part, fetch the next va_arg(). That removes a level
of indentation, and avoids doing a separate strlen()/stpcpy() call for x.
While touching this code anyway, change (size_t)-1 to the more readable
SIZE_MAX.
Zbigniew Jędrzejewski-Szmek [Tue, 3 Nov 2020 13:17:53 +0000 (14:17 +0100)]
Partially revert "hwdb: add trailing ":*" everywhere"
This reverts commit
c0443b97b71d5f70a0622061f589307bec5502c6.
I got various cases wrong:
"usb:v04F3p2B7Cd5912dc00dsc00dp00ic03isc00ip00in00"
"usb:v0627p0001:QEMU USB Tablet"
"input:b0003v0627p0001e0001-e0,1,2,4,k110,111,112,r0,1,8,B,am4,lsfw"
OTOH:
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
is OK. Other parts follow after 'pn'.
-mouse:*:name:*Trackball*:*
-mouse:*:name:*trackball*:*
-mouse:*:name:*TrackBall*:*
+mouse:*:name:*Trackball*:
+mouse:*:name:*trackball*:
+mouse:*:name:*TrackBall*:
... and anything else with :name should be OK too, because our imports always
include ":" at the end:
IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'"
Including '*' at the end makes the pattern work even if we decide to add
something to the match string later.
Fixes #17499.
Lennart Poettering [Mon, 2 Nov 2020 11:07:51 +0000 (12:07 +0100)]
fileio: beef up READ_FULL_FILE_CONNECT_SOCKET to allow setting sender socket name
This beefs up the READ_FULL_FILE_CONNECT_SOCKET logic of
read_full_file_full() a bit: when used a sender socket name may be
specified. If specified as NULL behaviour is as before: the client
socket name is picked by the kernel. But if specified as non-NULL the
client can pick a socket name to use when connecting. This is useful to
communicate a minimal amount of metainformation from client to server,
outside of the transport payload.
Specifically, these beefs up the service credential logic to pass an
abstract AF_UNIX socket name as client socket name when connecting via
READ_FULL_FILE_CONNECT_SOCKET, that includes the requesting unit name
and the eventual credential name. This allows servers implementing the
trivial credential socket logic to distinguish clients: via a simple
getpeername() it can be determined which unit is requesting a
credential, and which credential specifically.
Example: with this patch in place, in a unit file "waldo.service" a
configuration line like the following:
LoadCredential=foo:/run/quux/creds.sock
will result in a connection to the AF_UNIX socket /run/quux/creds.sock,
originating from an abstract namespace AF_UNIX socket:
@$RANDOM/unit/waldo.service/foo
(The $RANDOM is replaced by some randomized string. This is included in
the socket name order to avoid namespace squatting issues: the abstract
socket namespace is open to unprivileged users after all, and care needs
to be taken not to use guessable names)
The services listening on the /run/quux/creds.sock socket may thus
easily retrieve the name of the unit the credential is requested for
plus the credential name, via a simpler getpeername(), discarding the
random preifx and the /unit/ string.
This logic uses "/" as separator between the fields, since both unit
names and credential names appear in the file system, and thus are
designed to use "/" as outer separators. Given that it's a good safe
choice to use as separators here, too avoid any conflicts.
This is a minimal patch only: the new logic is used only for the unit
file credential logic. For other places where we use
READ_FULL_FILE_CONNECT_SOCKET it is probably a good idea to use this
scheme too, but this should be done carefully in later patches, since
the socket names become API that way, and we should determine the right
amount of info to pass over.
Lennart Poettering [Mon, 2 Nov 2020 14:30:16 +0000 (15:30 +0100)]
update TODO
Muhammet Kara [Sun, 1 Nov 2020 13:10:19 +0000 (16:10 +0300)]
po: Update Turkish translation
Martin Wilck [Tue, 24 Apr 2018 19:40:23 +0000 (21:40 +0200)]
test/sys-script.py: add missing DEVNAME entries to uevents
Martin Wilck [Thu, 26 Apr 2018 12:07:27 +0000 (14:07 +0200)]
test/udev_test.pl: add "expected good" count
Since 'test/udev-test.pl: count "good" results', we know how many
checks succeeded. Add an "expected good" count to make that number
more meaningful.
Martin Wilck [Thu, 26 Apr 2018 11:25:11 +0000 (13:25 +0200)]
test/udev-test.pl: suppress umount error message at startup
umount emits an error message "no mount point specified" if the
tmpfs isn't mounted yet, which is the normal case.
Suppress that by redirecting stderr.
Martin Wilck [Wed, 25 Apr 2018 15:21:49 +0000 (17:21 +0200)]
test/sd-script.py: new helper script for udev testing
Script for generating LOTS of SCSI disk and partition devices in
the fake sysfs we use for udev testing.
This script is supposed to be run after sys-script.py. It uses
code from sys-script.py as template to generate additional SCSI disk data
structures. Together with the "generator" code in udev-test.pl
added in the previous patch, it allows to run udev tests with almost
arbitrarily many devices, and thus to do performance scaling tests.
Martin Wilck [Wed, 25 Apr 2018 07:54:26 +0000 (09:54 +0200)]
test/udev-test.pl: generator for large list of block devices
Manually listing all devices in the test definition becomes cumbersome with
lots of devices. Add a function that scans on all block devices in
the test sysfs and generates a list of devices to test.
Martin Wilck [Tue, 24 Apr 2018 20:24:43 +0000 (22:24 +0200)]
test/udev-test.pl: add repeat count
for easier reproduction of sporadic test failures.
Martin Wilck [Tue, 24 Apr 2018 20:04:55 +0000 (22:04 +0200)]
tests/udev-test.pl: add multiple device test
Add 4 new tests using multiple devices. Number 2-4 use many
devices claiming the same symlink, where only one device has
a higher priority thatn the others. They fail sporadically with
the current code, if a race condition causes the symlink to point
to the wrong device. Test 4 is like test 2 with sleeps in between,
it's much less likely to fail.
Martin Wilck [Tue, 24 Apr 2018 18:55:01 +0000 (20:55 +0200)]
test/udev-test.pl: count "good" results
This is helpful to catch possible regressions in the test.
Also, don't count wait() errors, they are likely not udev errors.
Martin Wilck [Tue, 24 Apr 2018 16:30:09 +0000 (18:30 +0200)]
test/udev-test.pl: merge import parent tests into one
As we can test multiple devices and multiple links per device
in one test now, these two tests can be merged into one.
Martin Wilck [Tue, 24 Apr 2018 16:27:25 +0000 (18:27 +0200)]
test/udev-test.pl: merge "space and var with space" tests
As we can check multiple links in a single test now, these 3
tests can be merged into one.
Martin Wilck [Tue, 24 Apr 2018 16:16:59 +0000 (18:16 +0200)]
test/udev-test.pl: remove bogus rules from magic subsys test
These rules have survived from an ancient version of the code
and save no purpose any more.
Martin Wilck [Tue, 24 Apr 2018 16:09:50 +0000 (18:09 +0200)]
test/udev-test.pl: Make some tests a little harder
Add some rules that make it a bit harder to pass, mainly the
non-existence checks.
Martin Wilck [Tue, 24 Apr 2018 16:08:18 +0000 (18:08 +0200)]
test/udev-test.pl: last_rule is unsupported
the "last_rule" option hasn't been supported for some time.
Therefore this test fails if a "not_exp_links" attribute is added,
as it should be. Mark it appropriately.
Martin Wilck [Tue, 24 Apr 2018 15:57:47 +0000 (17:57 +0200)]
test/udev-test.pl: fix wrong test descriptions
udev hasn't supported renaming device nodes for some time.
Martin Wilck [Tue, 24 Apr 2018 15:15:58 +0000 (17:15 +0200)]
test/udev-test.pl: allow checking multiple symlinks
Instead of testing the existence or non-exisitence of just a single
symlink, allow testing of several links per device.
Change the test definitions accordingly.
Martin Wilck [Tue, 24 Apr 2018 08:50:24 +0000 (10:50 +0200)]
test/udev-test.pl: test correctness of symlink targets
Test if symlinks are created correctly by comparing the symlink
targets to the devnode path. This implies (for the symlink) that
major/minor numbers and permissions are correct, as we have tested
that on the devnode already.
Martin Wilck [Tue, 24 Apr 2018 07:38:26 +0000 (09:38 +0200)]
test/udev-test.pl: use computed devnode name
More often than not, the created devnode is the basename of the
sysfs entry. The "devnode" device may be used to override the
auto-detected node name.
Permissions and major/minor number are now verified on the devnode
itself, not on symlinks.
For those tests where exp_name is set to the computed devnode name,
the explicit "exp_name" can be removed. "exp_name" is only required for
symlinks.
This allows separate testing for devnodes and symlinks an a follow-up
patch.
Martin Wilck [Mon, 23 Apr 2018 19:59:05 +0000 (21:59 +0200)]
test/udev-test.pl: allow concurrent additions and removals
Allow testing cases where multiple devices are added and removed
simultaneously. Tests are started as synchronously as possible using a
semaphore, in order to test possible race conditions. If this isn't desired,
the test parameter "sleep_us" can be set to the number of microseconds to wait
between udev invocations.
Martin Wilck [Mon, 23 Apr 2018 19:58:12 +0000 (21:58 +0200)]
test/udev-test.pl: create rules only once
It's not necessary to write the rules for every udev run, as we
now may have many (rather than just 2) per test.
Martin Wilck [Fri, 20 Apr 2018 20:38:30 +0000 (22:38 +0200)]
test/udev-test.pl: allow multiple devices per test
Allow testing cases where multiple devices are added and removed.
This implies a change of the data structure: every test allows
for multiple devices to be added, and "exp_name" etc. are now properties
of the device, not of the test.
Purushottam choudhary [Wed, 28 Oct 2020 16:41:49 +0000 (22:11 +0530)]
network: selinux hook handling to enumerate nexthop
When selinux is enabled, the call of
manager_rtnl_enumerate_nexthop() fails.
This fix is to facilitate selinux hook handling for enumerating
nexthop.
In manager_rtnl_enumerate_nexthop() there is a check
if "Not supported" is returned by the send_netlink() call.
This check expects that -EOPNOTSUPP is returned,
the selinux hook seems to return -EINVAL instead.
This happens in kernel older than 5.3
(more specificallytorvalds/linux@
65ee00a) as it does not support
nexthop handling through netlink.
And if SELinux is enforced in the order kernel, callingRTM_GETNEXTHOP
returns -EINVAL.
Thus adding a call in the manager_rtnl_enumerate_nexthop for the
extra return -EINVAL.
Sorin Ionescu [Sat, 31 Oct 2020 08:07:27 +0000 (04:07 -0400)]
Fix typo
Lennart Poettering [Tue, 27 Oct 2020 08:56:08 +0000 (09:56 +0100)]
automount: make user unmounting for automount units more debuggable
Let's add an explicit log message plus an error state for automount
units, if users explicitly unmounted our autofs mount.
Prompted by: #17448
Lennart Poettering [Tue, 27 Oct 2020 08:57:28 +0000 (09:57 +0100)]
pid1: various minor watchdog modernizations
Just some clean-ups.
Yu Watanabe [Fri, 30 Oct 2020 00:52:45 +0000 (09:52 +0900)]
Merge pull request #17399 from afq984/udev-escaped-string
Allow escaped string in udev rules
Zbigniew Jędrzejewski-Szmek [Thu, 29 Oct 2020 18:27:29 +0000 (19:27 +0100)]
Merge pull request #17444 from BtbN/fix_ib_dhcp4
networkd: fix DHCP on InfiniBand interfaces
Zbigniew Jędrzejewski-Szmek [Thu, 29 Oct 2020 18:05:05 +0000 (19:05 +0100)]
Merge pull request #17472 from keszybz/spdx-license-headers
More SPDX license headers
Zbigniew Jędrzejewski-Szmek [Thu, 29 Oct 2020 17:58:56 +0000 (18:58 +0100)]
Merge pull request #17476 from poettering/resolved-tweaks
three small resolved cleanups