1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

69923 Commits

Author SHA1 Message Date
Lennart Poettering
bd334c0ebb json: drop redundant check
The same check is done exactly one line later, because this is one of
the things that json_variant_is_regular() checks.

As per: fa9a6db478 (r1441792019)
2024-01-04 22:55:42 +01:00
Lennart Poettering
86e62e9e02
Merge pull request #30749 from poettering/tmpfiles-verb-fix
tmpfiles: correctly apply globbing when cleaning 'x' lines
2024-01-04 22:55:23 +01:00
Lennart Poettering
a1e5800a27
Merge pull request #30758 from YHNdnzj/vpick-not-ptr
vpick: trivial follow-up
2024-01-04 22:54:41 +01:00
Luca Boccassi
81a183800f tmpfiles: add --purge switch
Any file/directory created by a tmpfiles.d will be deleted. Useful for
purge/factory reset patterns.
2024-01-04 17:36:43 +01:00
Mike Yuan
1f233020dc
shared/vpick: don't say "ptr" for TAKE_PICK_RESULT (struct) 2024-01-04 23:35:37 +08:00
Mike Yuan
657febec97
vpick-tool: sort includes 2024-01-04 23:35:13 +08:00
Lennart Poettering
115d6abf87
Merge pull request #30744 from poettering/logind-trivial-tweaks
logind: 3 trivial cleanups
2024-01-04 16:02:20 +01:00
Lennart Poettering
20604ff219 logind: do TTY idle logic only for sessions marked as "tty"
Otherwise things might be weird, because background sessions might
become "idle", wich doesn#t really make much sense.

This shouldn't change much in 99% of the cases, but slightly corrects
behaviour as it ensures only "primary"/"foreground" sessions get the
idle logic, i.e. where a user exists that could actually make it
non-idle.
2024-01-04 15:40:27 +01:00
Lennart Poettering
c16167ea10 update TODO 2024-01-04 15:32:14 +01:00
Lennart Poettering
e20bfa5005 logind: don't make idle action timer accuracy more coarse than timeout
If we allow the timer accuracy to grow larger then the timeout itself
things are very confusing, because people might set a 1s time-out and we
turn that into 30s.

Hence, let's just cut off the 30s accuracy to the time-out itself, so
that we stay close to what users configured.
2024-01-04 23:29:09 +09:00
Yu Watanabe
4855d82348
Merge pull request #30739 from poettering/pam-util-many
pam-util: add pam_get_item_many() to shorten some code
2024-01-04 23:28:34 +09:00
Lennart Poettering
0e80e355b2 homed: when empty username is passed to bus calls, operate on client's UID 2024-01-04 23:28:02 +09:00
Lennart Poettering
cc943ab86e homed: fix home_count_bad_authentication() counting
We want to cover not only regular bad password entries, but also bad
recovery key entries. Hence let's move the list of errors into the
function, and add more.
2024-01-04 23:26:49 +09:00
Lennart Poettering
28b42199d0 homed: tone down log message about bad passwords a bit
We usually start out out authentication cycles with an "empty" password
attempt, to give homed the chance to authenticated via any plugged in
tokens. Hence frequently the first attempt will just fail, which is no
reason to complain about.
2024-01-04 23:26:38 +09:00
Yu Watanabe
7903567cb7
Merge pull request #30610 from YHNdnzj/logind-serialize-pidref
logind: serialize session leader pidfd to fdstore
2024-01-04 23:25:18 +09:00
Yu Watanabe
18c4c5d84f network/route: make the route section invalid when an invalid MTUBytes= is specified
We usually set the invalid flag for a section if a setting in the section has
an invalid value. Let's also do the same thing for MTUBytes= in [Route].
2024-01-04 23:18:28 +09:00
Lennart Poettering
96fc8cab2a
Merge pull request #30578 from bluca/polkit-varlink
varlink: add glue to allow authenticating varlink connections via polkit
2024-01-04 15:15:45 +01:00
Frantisek Sumsal
25cb4c1d53 update-man-rules: skip over standard-conf.xml
bc6fdcbf5d switched its doctype to refentry, so the script started
picking it up and complaining that it's missing required stuff. Since
this file is only included from other man pages, let's skip it when
putting together a list of valid targets.

Resolves: #30715
Follow-up for: bc6fdcbf5d
2024-01-04 15:02:28 +01:00
Lennart Poettering
7b223bdb6b
Merge pull request #30736 from YHNdnzj/loginctl-self
man/loginctl: some improvements
2024-01-04 15:02:05 +01:00
Lennart Poettering
72bbd740a0 homed: add missing bus call to homed access policy 2024-01-04 15:01:51 +01:00
Lennart Poettering
3d010bc53d pam_systemd: drop unnecessary strempty() of 'tty' variable
This probably predates our introduction of streq_ptr(). Let's drop this
now however, as we actually want this to be NULL, further down, and
handle that just fine. In particular as all the special cases we have
explicitly set this to NULL anyway.

No real change in behaviour, just some normalization of handling.
2024-01-04 15:01:38 +01:00
Lennart Poettering
9cb3204f43 tmpfiles: 'x' takes globs, hence clean it with globbing 2024-01-04 14:58:40 +01:00
Lennart Poettering
d88b65f66d tmpfiles: always list tmpfiles line types in same order
otherwise it just gets too confusing to follow.
2024-01-04 14:57:59 +01:00
Lennart Poettering
5863f1da42 execute: make sure Type=exec and PAMName= work together
If PAMName= is used we'll spawn a PAM session for the service, and leave
a process around that closes the PAM session eventually. That process
must close the "exec_fd" that we use to implement Type=exec. After all
the logic relies on the fact that execve() will implicitly close the
exec_fd, and the EOF seen on it is hence indication for the service
manager that execve() has worked. But if we keep an fd open in the PAM
service process, then this is not going to work.

Hence close the fd explicitly so that it definitely doesn't stay pinned
in the child.
2024-01-04 21:03:51 +08:00
Alberto Planas
59fe7e6ef1 Fix typo in verb_make_policy explanation
Signed-off-by: Alberto Planas <aplanas@suse.com>
2024-01-04 13:46:04 +01:00
Mike Yuan
17b1c60ccd
Merge pull request #30725 from YHNdnzj/string-util
string-util,strv: follow-ups
2024-01-04 20:34:41 +08:00
Yu Watanabe
f475584ebf network/netdev: call done() per netdev kind before freeing netdev name or so
Otherwise, log_netdev_xyz() does not provide netdev name if it is called
in done(). It is hard to debug.

This should not change any effective behavior, at least with the current
implementation of done() per netdev kind.
2024-01-04 20:34:14 +08:00
Mike Yuan
efc438d928 tpm2-generator: sort includes 2024-01-04 20:33:32 +08:00
Lennart Poettering
d38c0b105b logind: use FOREACH_ARRAY() where appropriate 2024-01-04 20:32:26 +08:00
Lennart Poettering
3dc8b2df12 pam_systemd_home: minor coding style adjustment 2024-01-04 12:49:25 +01:00
Lennart Poettering
faef9ba27f homed: add some function parameter assert()s 2024-01-04 12:47:15 +01:00
Lennart Poettering
5157b0d823 logind: cast various calls that return errors we ignore to (void) 2024-01-04 12:46:04 +01:00
Lennart Poettering
e1ccf6b2b5 pam_systemd_home: port over to pam_get_item_many() 2024-01-04 12:29:37 +01:00
Lennart Poettering
c0cb9e4ae9 pam_systemd: move over to pam_get_item_many() 2024-01-04 12:29:37 +01:00
Mike Yuan
5317451f12
man/loginctl: document "self" and "auto" special session IDs
session-status automatically uses "auto" if no ID is specified,
but show-session shows the manager's properties. Let's document
these special values so that users of show-session can benefit too.
2024-01-04 19:26:47 +08:00
Lennart Poettering
f47d75de51 pam-util: add pam_get_item_many() helper that gets many PAM items at once
Just to shorten a bit of code.
2024-01-04 12:26:40 +01:00
Mike Yuan
771240fa3d
man/loginctl: use <literal> to quote possible values of --kill-whom= 2024-01-04 18:59:38 +08:00
Mike Yuan
5446a52b39
TEST-35-LOGIN: enable FileDescriptorStorePreserve= for coldplug test 2024-01-04 17:14:23 +08:00
Lennart Poettering
6d5743c411
Merge pull request #30513 from rpigott/resolved-ede
resolved: support RFC 8914 EDE error codes
2024-01-04 09:59:19 +01:00
Mike Yuan
2e6f012bf0
strv: rename strv_endswith to endswith_strv and dedup ENDSWITH_SET 2024-01-04 16:51:57 +08:00
Mike Yuan
eba8b54130
string-util: move startswith_strv to strv 2024-01-04 16:49:05 +08:00
Mike Yuan
53190aa693
string-util: use strneq 2024-01-04 16:49:05 +08:00
Mike Yuan
3c1e6909d5
string-util-fundamental: postfix -> suffix, use streq 2024-01-04 16:30:10 +08:00
Mike Yuan
0ae9073f15
logind-session: watch pidfd in session_set_leader_consume 2024-01-04 16:19:20 +08:00
Mike Yuan
9d5b690100
logind: serialize session leader pidfd to fdstore 2024-01-04 16:19:20 +08:00
Mike Yuan
faf0dd4b29
process-util: ensure pidref_is_alive only return ESRCH if not set 2024-01-04 16:19:20 +08:00
Mike Yuan
fdbb56dc1f
logind-session: use one_zero where appropriate 2024-01-04 16:19:19 +08:00
Mike Yuan
889975bb00
logind-session: be tolerant if we failed to remove leader from hashmap
If something wrong happened before hashmap_put(), session_free()
may be called through gc logic, and the assertion is triggered.
2024-01-04 16:19:19 +08:00
Mike Yuan
af1a6c97b6
logind: use RET_GATHER more, return first error 2024-01-04 16:19:16 +08:00
Ronan Pigott
9ca133e97a resolved: add transaction result for upstream failures
This new transaction result is emitted when the upstream server
indicates a fatal error that we will not try to recover from.

Currently, it is emitted when a validating recursive resolver reports an
error validating dnssec records for a domain. The extended error message
should help give context to the admin.
2024-01-03 17:35:02 -07:00