Commit Graph
78955 Commits
Author SHA1 Message Date
Lennart Poettering c9f805674a units: enable usrquota support on /tmp/ 2025-01-18 23:13:06 +01:00
Lennart Poettering 8f5131fb9e pid1: enable usrquota support on /dev/shm 2025-01-18 23:13:06 +01:00
nl6720 a153d7cbd2 man: replace "-" with "none" in cryptsetup commands and crypttab
`none` is more explicit and harder to overlook than `-` which in certain
contexts could be misunderstood to mean standard input.
2025-01-19 04:37:14 +09:00
Yu Watanabe dadd182317 TODO: fix typo
Follow-up for fb8d46cffe.
2025-01-19 04:25:22 +09:00
Yu Watanabe f0159e2b5b process-util: fix typo
Also rebreak comment.

Follow-up for 03b89cf213.
2025-01-19 04:24:08 +09:00
Yu Watanabe 4d090126ed login: fix typo
Follow-up for a6ad410ffa.
2025-01-19 04:22:16 +09:00
Yu Watanabe 7eabb5ca61 boot: introduce _cleanup_strv_free_ 2025-01-19 04:18:04 +09:00
Yu Watanabe 6ea99fd2cf boot: introduce _cleanup_file_close_ 2025-01-19 04:15:27 +09:00
Yu Watanabe 892b734c1c selinux-util: drop _cleanup_context_free_
It is used at only one place, not necessary.
2025-01-19 04:09:55 +09:00
Yu Watanabe 43e95ddbf4 capability-util: drop _cleanup_cap_free_charp_
Also moves cap_free_charpp() to test-cap-list.c, as it is used only
there.
2025-01-19 04:04:47 +09:00
Yu Watanabe fe5a1afb67 tree-wide: use _cleanup_hashmap_free_ and friends 2025-01-19 03:48:15 +09:00
Yu Watanabe b4ffb77669 udev-rules: introduce OPTIONS="dump" token
Should be useful for debugging.
2025-01-19 03:09:06 +09:00
Yu Watanabe 91d9f8f834 udev-dump: split out dump_event() from udevadm-test.c 2025-01-19 03:07:18 +09:00
Lennart Poettering 8af1b296cb pid1: when a password is requested during PAMName= processing, query it via the ask-password logic 2025-01-18 11:45:44 +00:00
Yu Watanabe f55a6fc1e3 udev: add --verbose option for 'udevadm test' and add more verbose logs (#36021)
split out of #35968.
2025-01-18 06:12:31 +09:00
Luca Boccassi 27c947ec3d tree-wide: switch various uses of mkdtemp() over to mkdtemp_malloc() (#36057) 2025-01-17 19:49:49 +00:00
Lennart Poettering ea844c49c3 escape: make 'bad' parameter optional
Treat a NULL bad parameter just like an empty one: do not escape any
additional characters except for the CC chars.
2025-01-17 19:47:43 +00:00
Mike Yuan 9cd064aa9f meson: bump C std to gnu17
GCC 8.4 (our baseline) defaults to gnu17 already.
2025-01-17 19:46:37 +00:00
Yu Watanabe c547b9e278 udev-rules: add trace logs for GOTO and parent conditions 2025-01-18 04:22:27 +09:00
Yu Watanabe 354d063fbc udev-rules: update log messages
This also adds trace logs about token result, and skipping assignment
caused by final value already assigned.
2025-01-18 04:22:23 +09:00
Yu Watanabe 68b1e1b61a udev-rules: ignore whole command result if it is too long and does not contain newline 2025-01-18 04:19:52 +09:00
Yu Watanabe a79cd8c2be udev-rules: introduce udev_replace_chars_and_log()
And logs about replacement only when trace logging is enabled.
2025-01-18 04:19:52 +09:00
Yu Watanabe 0febeccfdc udev-rules: add more trace logs for string match 2025-01-18 04:19:52 +09:00
Yu Watanabe a3ab06ab21 udev-rules: logs result of format substitution
This also drops redundant token string in log message on truncation.

No functional change, but should improve debuggability.
2025-01-18 04:19:52 +09:00
Yu Watanabe 6809bae643 udev-rules: show original token string in log_event_error() and friends
This also makes
- make many loggers refactored,
- log_event_error() and friends UdevEvent object,
- introduces log_event_trace().

No functional change, just refactoring and preparation for later
commits.
2025-01-18 04:19:52 +09:00
Yu Watanabe 8846df63fa udevadm-test: introduce -v/--verbose option to show verbose log messages
Currently this does not show any extra log messages. In later commits,
more verbose log messages will be added.
2025-01-18 04:19:52 +09:00
Lennart Poettering ce2ef96c2b hexdump: if size is SIZE_MAX, use strlen()
Similar how we do this as various places: if SIZE_MAX is specified as
size determine the size automatically via strlen().
2025-01-17 17:02:07 +01:00
Lennart Poettering d58577d45e nspawn: assorted coding style fixes 2025-01-17 11:12:24 +01:00
Lennart Poettering bf37a69c3f tree-wide: switch various uses of mkdtemp() over to mkdtemp_malloc() 2025-01-17 10:56:35 +01:00
Zbigniew Jędrzejewski-Szmek 6e1b24820f mkosi: update fedora commit reference
* c7fecc18eb Skip test_sysusers_defined on upstream builds
* f257050ddd Add a .editorconfig file
* aa5546e9ed Add a few mkosi artifact directories to .gitignore
* 01e5bc1c93 Set SBAT in sd-boot when building on OBS
* a7eec4d33d Run upstream integration test suite with Fedora CI
2025-01-16 23:40:04 +01:00
Zbigniew Jędrzejewski-Szmek 4e97e697c0 Several fixlets for GCC warnings (#36051)
Replaces #36043 and #36039.
2025-01-16 22:41:31 +01:00
Lennart Poettering 86d6e268be Two readme tweaks (#36053) 2025-01-16 22:40:07 +01:00
Zbigniew Jędrzejewski-Szmek dce73a47b0 README: add sgx to list of required groups
Follow-up for c9c4899f44.
2025-01-16 22:22:38 +01:00
Zbigniew Jędrzejewski-Szmek 6ed73883c6 docs/HACKING: use 'run0' to indicate which commands require privileges 2025-01-16 22:22:28 +01:00
Lennart Poettering fb8d46cffe update TODO 2025-01-16 21:58:35 +01:00
Yu Watanabe dd5a0f7d75 README: update requirements 2025-01-16 20:55:44 +00:00
Miroslav Lichvar af96ccfc24 udev: set clock group for PTP and RTC devices
Add a new group for clock devices to enable applications like linuxptp
to open clocks without root privileges.
2025-01-16 21:12:47 +01:00
Yu Watanabe 9c881fa867 fundamental-macro: conditionalize several gcc warning pragmas
This fixes the following error:

In file included from ../src/basic/macro.h:13,
                 from ../src/basic/env-util.h:9,
                 from ../src/nss-systemd/nss-systemd.c:7:
../src/fundamental/macro-fundamental.h:61:9: error: option ‘-Wzero-as-null-pointer-constant’ is valid for C++/ObjC++ but not for C [-Werror=pragmas]
   61 |         _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
      |         ^~~~~~~
../src/nss-systemd/nss-systemd.c:106:1: note: in expansion of macro ‘DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT’
  106 | DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2025-01-17 04:35:09 +09:00
Lennart Poettering 83a3018e20 nss-systemd: work around -Werror=zero-as-null-pointer-constant issue with PTHREAD_MUTEX_INITIALIZER
This fixes builds on Fedora:

../src/nss-systemd/nss-systemd.c:105:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
  105 |         .mutex = PTHREAD_MUTEX_INITIALIZER,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/nss-systemd/nss-systemd.c:105:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
../src/nss-systemd/nss-systemd.c:109:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
  109 |         .mutex = PTHREAD_MUTEX_INITIALIZER,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/nss-systemd/nss-systemd.c:109:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
../src/nss-systemd/nss-systemd.c:113:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
  113 |         .mutex = PTHREAD_MUTEX_INITIALIZER,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/nss-systemd/nss-systemd.c:113:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
../src/nss-systemd/nss-systemd.c:117:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
  117 |         .mutex = PTHREAD_MUTEX_INITIALIZER,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
../src/nss-systemd/nss-systemd.c:117:18: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
cc1: all warnings being treated as errors
2025-01-17 04:09:12 +09:00
Lennart Poettering 1d5f0a88e0 fundamental: unify gcc warning pragmas at one place
This also drops HAVE_WSTRINGOP_TRUNCATION as the corresponding option
was introduced in GCC 8, and our baseline is GCC 8.4.
2025-01-17 04:08:58 +09:00
Luca Boccassi 0ec19b311b test: add link to Ubuntu autopkgtest status page in README
Known issues will be listed there by the team managing the infra
2025-01-16 14:50:55 +01:00
Lennart Poettering 8ce960a80d process-util: port pid_from_same_root_fs() to pidref + more (#35975)
Let's continue our move to PidRef.
2025-01-16 13:48:48 +01:00
Lennart Poettering 277255e814 process-util: slightly update comment in freeze() 2025-01-16 11:55:21 +01:00
Lennart Poettering d6267b9b18 process-util: port pid_from_same_root_fs() to pidref, and port three places over to it 2025-01-16 11:55:21 +01:00
Lennart Poettering a65de78d5c test-process-util: don't run rest of test suite in forked off child
We left the test suite running in the child after forking off a
temporary child for testing. That's bad. fix it.
2025-01-16 11:55:21 +01:00
Lennart Poettering 6eeeef9f66 process-util: introduce new FORK_FREEZE flag for safe_fork()
Often we want to fork off a process that just hangs until we kill it,
let's add a simple flag to create one of this type, and use it at
various places.
2025-01-16 11:55:21 +01:00
Lennart Poettering 8110b34b64 pidref: various shortcuts to pidref_equal()
This adds some shortcuts to pidref_equal(), so that we don't have to
query the pidfs id if there's no need.
2025-01-16 11:55:21 +01:00
Lennart Poettering 9ef559a036 tree-wide: drop support for kernels without pidfd_open() and pidfd_send_signal() (#35971) 2025-01-16 11:37:17 +01:00
Lennart Poettering 39706728e1 namespace-util: don't reset UID/GIDs in namespace_enter() unless we enter a userns
The reset of UID/GID only really makes sense if we enter a userns, hence
let#s restrict it to that.
2025-01-16 11:26:57 +01:00
Jan Macku ca97d48bd4 shared/bus-util: add missing set.h include
```
In file included from ../src/shared/bus-get-properties.c:4:
../src/shared/bus-message-util.h:22:60: error: unknown type name ‘Set’
   22 | int bus_message_append_string_set(sd_bus_message *m, const Set *s);
      |                                                            ^~~
../src/shared/bus-get-properties.c: In function ‘bus_property_get_string_set’:
../src/shared/bus-get-properties.c:178:9: error: unknown type name ‘Set’
  178 |         Set **s = ASSERT_PTR(userdata);
      |         ^~~
```

follow-up to https://github.com/systemd/systemd/commit/91080bc9733b5b2478bfc0ed58f6a7ae5da7e639
2025-01-16 10:49:04 +01:00