1
0
mirror of https://github.com/systemd/systemd synced 2026-03-14 17:14:49 +01:00

Compare commits

...

11 Commits

Author SHA1 Message Date
howl
fd37987da5 hwdb: keyboard: D330 Touchpad toggle keymap
I have also seen that VIOS LTH17 has the exact same correction and it's also a SIPODEV composite hid device also through usb. In the D330 is a detachable keyboard. It's possible that a very generic way to apply this to at least affected sipodev keyboard could be found using the device ids, but needs info to do that and ensure all sipodev keyboard with the pertinent ids need it.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
2021-05-11 08:54:04 +02:00
howl
44cf2e6022 hwdb: sensor: D330-IGM use pvr instead cvr
We use pvr match for efifb pitch and drm orientation quirk and in touchpad toggle keymap. Also seems most consistent with the devices here.

While at it, correct a typo, 81H3 and 81MD are product names not numbers, my bad.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
2021-05-11 08:53:21 +02:00
Yu Watanabe
690ceca8dc
Merge pull request #19562 from keszybz/flag-manips
Fix flag manipulations in cryptsetup
2021-05-11 14:34:07 +09:00
Lennart Poettering
c37f7963b1 unit-def: ensure UnitType enum fits any errno value
This is a follow-up for #19514 which changed unit_name_to_instance() to
return ENOMEM as a UnitType enum, even though the enum didn't
necessarily have range for that.

Let's extend the range explicitly, so that we can cover the full errno
range in it.
2021-05-11 14:33:11 +09:00
Lennart Poettering
7eea910d24 bootctl: extend --make-machine-id-directory= documentation a bit
The directory might not be created in the ESP but in the extended boot
loader partition, hence don#t claim otherwise.

Also, give a brief reason why the concept exists at all.

Link up machine-id man page.

Follow-up for: 6a3fff75baad94d9ebff1a6c7d1fb35448c44a81
2021-05-11 14:32:42 +09:00
Lennart Poettering
51b274d881 test-user-util: fix line break confusion
This fixes some line-break confusion introduced by #11199
(c6cecb744b53561efd329309af7d02a3f9979ed1). It also restores a test with
GID_INVALID that was dropped, presumably by accident.
2021-05-11 14:32:24 +09:00
Yu Watanabe
b35028ebaa
Merge pull request #19575 from poettering/hwdb-whitespace-fix-again
hwdb: remove trailing whitespace
2021-05-11 14:31:35 +09:00
Lennart Poettering
9854ac4af4 man: remove some trailing whitespace 2021-05-10 23:10:44 +02:00
Lennart Poettering
23a2badf74 hwdb: remove trailing whitespace 2021-05-10 23:03:52 +02:00
Zbigniew Jędrzejewski-Szmek
9d59f5b2f9 cryptsetup: fix flags check
FLAGS_SET() checks if *all* the bits are set. In this case we want to check
if *any* are. FLAGS_SET() was added in cde2f8605e0c3842f9a87785dd758f955f2d04ba,
but not a bug then yet, because with just one bit, both options are equivalent.
But when more bits were added later, this stopped being correct.
2021-05-10 19:53:52 +02:00
Zbigniew Jędrzejewski-Szmek
8205c151b3 cryptsetup: initialize variable
Fixup for cde2f8605e0c3842f9a87785dd758f955f2d04ba. Use PIN+PV because the
status quo ante was that we turned off "uv" and left "up" and "clientPin" in
its default values, which with yubikeys (i.e. the most popular hardware) meant
both "up" and "clientPin" were enabled by default.

Coverity CID#1453085.
2021-05-10 19:52:06 +02:00
9 changed files with 41 additions and 20 deletions

View File

@ -911,6 +911,10 @@ evdev:input:b0003v04B3p301B*
KEYBOARD_KEY_90007=mail
KEYBOARD_KEY_90008=www
# Lenovo Ideapad D330-10IGM
evdev:name:SIPODEV Lenovo HID Device:dmi:*:svnLENOVO:*:pvrLenovoideapadD330-10IGM:*
KEYBOARD_KEY_70073=f21 # Fn+Supr (Touchpad toggle)
###########################################################
# Logitech

View File

@ -506,8 +506,8 @@ sensor:modalias:acpi:BMA250E*:dmi:bvnLENOVO:*:pvrLenovoMIIX3-1030:*
sensor:modalias:acpi:SMO8500*:dmi:bvnLENOVO:*:pvrLenovoMIIX3-830:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
# IdeaPad D330-10IGM (both 81H3 and 81MD product numbers)
sensor:modalias:acpi:BOSC0200*:dmi:*:svnLENOVO:*:cvrLenovoideapadD330-10IGM:*
# IdeaPad D330-10IGM (both 81H3 and 81MD product names)
sensor:modalias:acpi:BOSC0200*:dmi:*:svnLENOVO:*:pvrLenovoideapadD330-10IGM:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
# IdeaPad Miix 300

View File

@ -239,15 +239,25 @@
<varlistentry>
<term><option>--make-machine-id-directory=yes|no|auto</option></term>
<listitem><para>Control creation and deletion of <literal>$ESP/$MACHINE_ID</literal> during
<option>install</option> and <option>remove</option>, respectively.
<literal>auto</literal> is equivalent to to <literal>yes</literal> if <literal>/etc/machine-id</literal>
resides on a filesystem other than tmpfs and <literal>no</literal> otherwise.
Defaults to <literal>auto</literal>.</para>
<listitem><para>Control creation and deletion of the top-level machine ID directory on the file
system containing boot loader entries (i.e. beneath the file system returned by
<command>--print-boot-path</command> above) during <option>install</option> and
<option>remove</option>, respectively. <literal>auto</literal> is equivalent to
<literal>yes</literal> if <filename>/etc/machine-id</filename> resides on a filesystem other than
tmpfs and <literal>no</literal> otherwise (in the latter case the machine ID is likely transient and
hence should not be used persistently in the ESP). Defaults to <literal>auto</literal>. See
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
details about the machine ID concept and file.</para>
<para>Overriding this may be desired to hide the machine ID from the (unencrypted) ESP,
configure a <citerefentry><refentrytitle>kernel-install</refentrytitle><manvolnum>8</manvolnum></citerefentry> script, or,
conversely, commit a machine-id that only appears transient.</para></listitem>
<para>Overriding this may be desirable to hide the machine ID from the (unencrypted) ESP, configure a
<citerefentry><refentrytitle>kernel-install</refentrytitle><manvolnum>8</manvolnum></citerefentry>
script, or, conversely, commit a transient machine ID.</para>
<para>The top-level machine ID directory is useful to allow smooth multi-boot installations: each
installed OS instance will have a different machine ID and thus a separate directory to place its
boot-time resources in. If this feature is turned off with this option, care needs to be taken that
multiple OS instances do not place conflicting files on the shared ESP and Extended Boot Loader
Partitions, or that multiple OS instances are not possible.</para></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="no-pager"/>

View File

@ -3,6 +3,7 @@
#include <stdbool.h>
#include "errno-list.h"
#include "locale-util.h"
#include "macro.h"
@ -23,6 +24,7 @@ typedef enum UnitType {
UNIT_SCOPE,
_UNIT_TYPE_MAX,
_UNIT_TYPE_INVALID = -EINVAL,
_UNIT_TYPE_ERRNO_MAX = -ERRNO_MAX, /* Ensure the whole errno range fits into this enum */
} UnitType;
typedef enum UnitLoadState {

View File

@ -747,11 +747,14 @@ static int attach_luks_or_plain_or_bitlk_by_fido2(
if (arg_fido2_cid) {
if (!key_file && !key_data)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "FIDO2 mode selected but no key file specified, refusing.");
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"FIDO2 mode with manual parameters selected, but no keyfile specified, refusing.");
rp_id = arg_fido2_rp_id;
cid = arg_fido2_cid;
cid_size = arg_fido2_cid_size;
required = FIDO2ENROLL_PIN | FIDO2ENROLL_UP; /* For backwards compatibility, PIN+presence is required by default. */
} else {
r = find_fido2_auto_data(
cd,
@ -769,7 +772,7 @@ static int attach_luks_or_plain_or_bitlk_by_fido2(
if (r < 0)
return r;
if (FLAGS_SET(required, FIDO2ENROLL_PIN | FIDO2ENROLL_UP | FIDO2ENROLL_UV) && arg_headless)
if ((required & (FIDO2ENROLL_PIN | FIDO2ENROLL_UP | FIDO2ENROLL_UV)) && arg_headless)
return log_error_errno(SYNTHETIC_ERRNO(ENOPKG),
"Local verification is required to unlock this volume, but the 'headless' parameter was set.");

View File

@ -379,7 +379,9 @@ static void test_make_salt(void) {
static void test_in_gid(void) {
assert(in_gid(getgid()) >= 0);
assert(in_gid(getegid()) >= 0); assert(in_gid(TTY_GID) == 0); /* The TTY gid is for owning ttys, it would be really really weird if we were in it. */
assert(in_gid(getegid()) >= 0);
assert(in_gid(GID_INVALID) < 0);
assert(in_gid(TTY_GID) == 0); /* The TTY gid is for owning ttys, it would be really really weird if we were in it. */
}
static void test_gid_lists_ops(void) {