1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00
Commit Graph

51125 Commits

Author SHA1 Message Date
Frantisek Sumsal
f2ef6d98e6 test: fix partition check in TEST-58-REPART
Follow-up to 1c41c1dc34.
2021-05-07 21:17:22 +02:00
Lennart Poettering
37ef2fc9f7
Merge pull request #18863 from keszybz/cmdline-escaping
Escape command lines properly
2021-05-07 17:29:39 +02:00
Zbigniew Jędrzejewski-Szmek
d0f14a6cf4
Merge pull request #19134 from poettering/outbound-special-hostname
introduce a new synthetic hostname "_outbound" that maps to "the" local IP address
2021-05-07 17:15:22 +02:00
Lennart Poettering
2d882d3581 nss-systemd: make llvm work-around for used _cleanup_ explicit 2021-05-07 16:44:03 +02:00
Lennart Poettering
bbfb8c878c userdbd: reverse which path is a socket and which a symlink
userdbd listens on "two" sockets, that are actually the same: one is a
real AF_UNIX socket in the fs, and the other is a symlink to it.

So far, when userdbd was started from the command line it would make one
a symlink and the other a real socket, but when invoked via unit files
they'd be swapped, i.e. the other would be a symlink and the one a real
socket.

Let's bring this in line.

Since the "io.systemd.Multiplexer" is our main interface, let's make it
the one exposed as socket, and then make "io.systemd.NameServiceSwitch"
a symlink to it. Or in other words, let's adjust the C code to match the
unit file.
2021-05-07 16:43:43 +02:00
Lennart Poettering
2708160ccd fileio: optionally, return discovered path of file in search_and_fopen() 2021-05-07 16:43:26 +02:00
Dimitri John Ledkov
9137c03c04
boot: add optional EFI SBAT support
Add SBAT support, when -Dsbat-distro value is specified. One can use
-Dsbat-distro=auto for autodetection of all sbat options. Many meson configure
options added to customize SBAT CSV values, but sensible defaults are auto
detected by default. SBAT support is required if shim v15+ is used to load
systemd-boot binary or kernel.efi (Type II BootLoaderSpec).

Fixes #19247
2021-05-07 14:38:48 +01:00
Zbigniew Jędrzejewski-Szmek
ac2c088939
Merge pull request #19391 from poettering/dissect-grow
optionally, grow file systems to partition size when mounting them via GPT auto-discovery
2021-05-07 15:04:55 +02:00
Lennart Poettering
2a9cfe6b07
Merge pull request #19531 from poettering/nss-systemd-fixes
nss-systemd: two minor fixes
2021-05-07 11:15:53 +02:00
Lennart Poettering
a1aa41e4e1 nss-systemd: properly handle empty membership lists
When we are queried for membership lists on a system that has exactly
zero, then we'll return ESRCH immediately instead of at EOF. Which is
OK, but we need to handle this in various places, and not get confused
by it.
2021-05-07 09:15:40 +02:00
Lennart Poettering
e9b88a6d4e string-util: add strextendf() helper, that allows extending some allocated string via a format string
It's not going to be efficient if called in inner loops, but it's oh so
handy, and we have some code that does this:

   asprintf(&p, "%s…", b, …);
   free(b);
   b = TAKE_PTR(p);

which can now be replaced by the quicker and easier to read:

   strextendf(&p, "…", …);
2021-05-07 09:10:59 +02:00
Lennart Poettering
db1ce3ea1a nspawn: fix the sections .nspawn settings are placed in
The actual section names are quite different from what the comment so
far suggested. Fix that.
2021-05-07 05:57:30 +09:00
Lennart Poettering
1fdfca4da7 nss-systemd: reset the right field 2021-05-06 22:35:49 +02:00
Lennart Poettering
5b235f0df5
Merge pull request #19523 from bluca/coredump_meta_fixes
docs/COREDUMP_PACKAGE_METADATA.md: Add debuginfod key
2021-05-06 22:34:53 +02:00
Lennart Poettering
53c25ac968 user-util: add generic definition for special password hash values in /etc/passwd + /etc/shadow
Let's add three defines for the 3 special cases of passwords.

Some of our tools used different values for the "locked"/"invalid" case,
let's settle on using "!*" which means the password is both locked *and*
invalid.

Other tools like to use "!!" for this case, which however is less than
ideal I think, since the this could also be a considered an entry with
an empty password, that can be enabled again by unlocking it twice.
2021-05-06 21:55:58 +02:00
Mike Kazantsev
a7bd1656f3 Fix indent prefix being used as a suffix in systemd-analyze dump for some properties 2021-05-06 21:55:35 +02:00
Lennart Poettering
cf38805567
Merge pull request #19527 from poettering/userdb-fixes
various minor userdb fixes
2021-05-06 21:54:42 +02:00
Lennart Poettering
7c67419117 userdb: honour USERDB_AVOID_SHADOW flag also when iterating 2021-05-06 18:36:32 +02:00
Lennart Poettering
d9f5f2a12c userdb: fix typo in comment 2021-05-06 18:36:32 +02:00
Lennart Poettering
d4f560df4f userdb: add missing 'else' 2021-05-06 18:36:32 +02:00
Lennart Poettering
77fe7d1593 userdb: remove unnecesary repeated if check 2021-05-06 18:36:32 +02:00
Lennart Poettering
27a5a22f03 userdb: count NSS records too 2021-05-06 18:36:32 +02:00
Luca Boccassi
201962ef46 docs/COREDUMP_PACKAGE_METADATA.md: add table with well-known keys and their definition 2021-05-06 16:58:43 +01:00
Dimitri John Ledkov
e706aaa7a3 boot/efi: add ARM (THUMB) and RISCV64 machine types
Also drop defines from shared/pe-header.h, appear to be unused.
2021-05-06 15:16:29 +02:00
Mark Wielaard
4f90b052e5 docs/COREDUMP_PACKAGE_METADATA.md: Add debuginfod key
Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-05-06 13:50:21 +01:00
Yu Watanabe
a83a7d1e9e test: drop default ACL from $TESTDIR
This fixes an issue introduced by the commit 954c77c251.

For some reasons, setting default ACL on $TESTDIR makes TEST-29-PORTABLE
fail. Let's drop the default ACL, and set ACL on saved results instead.

Fixes #19519.
2021-05-06 11:28:00 +02:00
Yu Watanabe
853401a6bc test: increase image size when static library or standalone binaries are installed 2021-05-06 11:28:00 +02:00
howl
84e492cdba Unify pn81H3 and cvrLenovoideapadD330-10IGM
D330-10IGM has been added due the fact that 81H3 and 81MD product name belongs to the same product version. So the fact is that now that we know 81MD has the same transformation matrix that the 81H3 we can just use the product version and get rid the product name.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
2021-05-06 11:13:48 +02:00
Phaedrus Leeds
00473ac804 docs: Fix typos in PORTABLE_SERVICES.md 2021-05-06 16:01:23 +09:00
Yu Watanabe
3d396b2837 test: drop log_trace() in test-random-util
It provides almost no inoformation. Moreover, it massively increases
logs, and firefox cannot show the results of Ubuntu CIs due to this.
2021-05-06 12:46:31 +09:00
Yu Watanabe
d8c1422439
Merge pull request #19515 from keszybz/config-parser-crash-fix
Fix crashes in config parsing
2021-05-06 12:46:13 +09:00
Yu Watanabe
d6eaee6e74
Merge pull request #19514 from keszybz/return-UnitNameFlags-more
Return UnitNameFlags from unit_name_to_instance()
2021-05-06 12:46:00 +09:00
Yu Watanabe
5971630cf6
Merge pull request #19513 from takaswie/topic/ieee1394-hwdb-entries-for-video
hwdb: ieee1394-unit-function: add entries to obsolete existent udev rules for video function
2021-05-06 12:45:05 +09:00
Yu Watanabe
f0373df1a7
Merge pull request #19507 from nabijaczleweli/bootctlpsko-lite
bootctl: take --make-machine-id-directory=yes|no|auto and make/remove \$MACHINE_ID accordingly
2021-05-06 12:44:21 +09:00
Frantisek Sumsal
c191e09230 ci: cover standalone/static binaries in build test 2021-05-06 11:52:58 +09:00
Luca Boccassi
fd7d8bf105
Merge pull request #19498 from poettering/mallinfo2
selinux: use mallocinfo2() if it exists
2021-05-05 22:00:49 +01:00
Alyssa Ross
f8eb41003d udev: make /dev/vfio/vfio 0666
Quoting Documentation/driver-api/vfio.rst in Linux:

> note that /dev/vfio/vfio provides no capabilities on its own and is therefore
> expected to be set to mode 0666 by the system
2021-05-05 17:22:00 +02:00
Zbigniew Jędrzejewski-Szmek
52a89a5f08 sd-device: reject empty driver name
If ":" was the last char in the string, we would call access() on ".../drivers/", which
would pass. It probably doesn't matter, but let's reject this anyway.
2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
3e2d0c6ab2 sd-device: use memdupa_suffix0() where appropriate
No functional change intended.
2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
e17c95af8e sd-device: do no allocate strings of unknown length on the stack
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33881.

Not only we would duplicate unknown input on the stack, we would do it
over and over. So let's first check that the input has reasonable length,
but also allocate just one fixed size buffer.
2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
7ecb052fb3 fuzz-journald-kmsg: silence output as usual 2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
3968ccd0cd core: fix crash in BPFProgram parsing
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33270.
2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
07b3075fad basic/log: use SYNTHETIC_ERRNO in one more place 2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
a687f50009 core: use the same pattern for extract_first_word() checks
No functional change, but there is no reason to write it too verbosely
or in different orders.
2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
d762abece9 core: fix potential crash in BPFProgram= 2021-05-05 17:15:04 +02:00
Zbigniew Jędrzejewski-Szmek
cc87b3f68f core: fix crash in parsing of SocketBind{Allow,Deny}=
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33876.
2021-05-05 17:14:58 +02:00
Takashi Sakamoto
ecd64ffafd udev: uaccess: remove ID_FFADO entry
The ID_FFADO environment variable comes from external FFADO project.
Now we have comprehensive and self-contained rules instead of it.
Let's remove it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto
e51d5b9c8a hwdb: ieee1394-unit-function: add entry for AV/C device with vendor unique command set
In IEC 61883-1:1998, we can see some values for AV/C device with vendor
unique command set in IEC 61883-1:1998. Current udev rule handles it
for video. However it brings an issue that the functions in AV/C device
are not distinguished just by the content of configuration ROM.

In former commit, hardware database was added to describe function type
of unit in the node, then udev rules are added to utilize the database.

However, we have an request to obsolete existent udev rules by putting
enough entries to the database. It should be done carefully.

This commit adds entry into hardware database just for backward
compatibility. The entry can match to some node and unit unexpectedly.
Therefore this commit modifies existent entries to invalidate the effect
from added entry.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto
002f6e92af hwdb: ieee1394-unit-function: add entry for AV/C device with generic AV/C command set
Typical node of AV/C device has standard content of configuration ROM.
This is defined in documentation of 1394 Trading Association.

 * Configuration ROM for AV/C Devices 1.0 (Dec. 12, 2000, 1394 Trading
   Association, TA Document 1999027)

However, it brings an issue that the functions in AV/C device are not
distinguished just by the content of configuration ROM.

In former commit, hardware database was added to describe function type
of unit in the node, then udev rules are added to utilize the database.

However, we have an request to obsolete existent udev rules by putting
enough entries to the database. It should be done carefully.

This commit adds entry into hardware database just for backward
compatibility. The entry can match to some node and unit unexpectedly.
Therefore this commit modifies existent entries to invalidate the effect
from added entry.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto
fae95d9ff5 hwdb: ieee1394-unit-function: remove entry for Cool Stream iSweet
IIDC specification describes configuration ROM without model field, thus
it's not possible to match any entry with vendor ID and model ID.
Current entry for Cool Stream iSweet can match any node and unit of
IIDC.

This commit removes the entry. I note that this model uses Texus
Instruments MC680-DCC as all-in-one chipset for video function in
IEEE 1394 bus.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00