mirror of
https://github.com/systemd/systemd
synced 2026-03-19 03:24:45 +01:00
Compare commits
5 Commits
30b9fa495c
...
3ae637c42a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ae637c42a | ||
|
|
4d6274a6f4 | ||
|
|
c8911b745c | ||
|
|
08c3010399 | ||
|
|
cb39d66ec8 |
@ -52,6 +52,12 @@ touchpad:usb:v05acp0324:*
|
||||
touchpad:usb:v044ep1221:*
|
||||
ID_INPUT_TOUCHPAD_INTEGRATION=external
|
||||
|
||||
###########################################################
|
||||
# Lenovo IdeaPad Duet3 10IGL5 (82AT)
|
||||
###########################################################
|
||||
touchpad:bluetooth:v17efp60fa:*
|
||||
ID_INPUT_TOUCHPAD_INTEGRATION=internal
|
||||
|
||||
###########################################################
|
||||
# Logitech
|
||||
###########################################################
|
||||
|
||||
@ -695,11 +695,20 @@ int dynamic_user_lookup_name(Manager *m, const char *name, uid_t *ret) {
|
||||
if (!d)
|
||||
return -ESRCH;
|
||||
|
||||
r = dynamic_user_current(d, ret);
|
||||
uid_t uid;
|
||||
r = dynamic_user_current(d, &uid);
|
||||
if (r == -EAGAIN) /* not realized yet? */
|
||||
return -ESRCH;
|
||||
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (!uid_is_dynamic(uid))
|
||||
return -ESRCH;
|
||||
|
||||
if (ret)
|
||||
*ret = uid;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dynamic_creds_make(Manager *m, const char *user, const char *group, DynamicCreds **ret) {
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include "json-util.h"
|
||||
#include "manager.h"
|
||||
#include "string-util.h"
|
||||
#include "uid-classification.h"
|
||||
#include "user-util.h"
|
||||
#include "varlink-dynamic-user.h"
|
||||
|
||||
@ -91,6 +92,9 @@ int vl_method_get_user_record(sd_varlink *link, sd_json_variant *parameters, sd_
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (!uid_is_dynamic(uid))
|
||||
continue;
|
||||
|
||||
if (!user_match_lookup_parameters(&p, d->name, uid))
|
||||
continue;
|
||||
|
||||
@ -199,6 +203,9 @@ int vl_method_get_group_record(sd_varlink *link, sd_json_variant *parameters, sd
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (!gid_is_dynamic((gid_t) uid))
|
||||
continue;
|
||||
|
||||
if (!group_match_lookup_parameters(&p, d->name, (gid_t) uid))
|
||||
continue;
|
||||
|
||||
|
||||
@ -2730,7 +2730,7 @@ static MakeFileSystemFlags partition_mkfs_flags(const Partition *p) {
|
||||
if (arg_discard)
|
||||
flags |= MKFS_DISCARD;
|
||||
|
||||
if (streq(p->format, "erofs") && !DEBUG_LOGGING)
|
||||
if (streq(p->format, "erofs") && !DEBUG_LOGGING && !isatty_safe(STDERR_FILENO))
|
||||
flags |= MKFS_QUIET;
|
||||
|
||||
FOREACH_ARRAY(cf, p->copy_files, p->n_copy_files)
|
||||
|
||||
@ -857,7 +857,8 @@ int parse_elf_object(
|
||||
* bound since the core files have an upper size limit. It's also not doing any
|
||||
* system call or interacting with the system in any way, besides reading from
|
||||
* the file descriptor and writing into these four pipes. */
|
||||
r = pidref_safe_fork_full("(sd-parse-elf)",
|
||||
r = pidref_safe_fork_full(
|
||||
"(sd-parse-elf)",
|
||||
/* stdio_fds= */ NULL,
|
||||
(int[]) { fd, error_pipe[1], return_pipe[1], package_metadata_pipe[1], dlopen_metadata_pipe[1] },
|
||||
5,
|
||||
|
||||
@ -679,6 +679,8 @@ int make_filesystem(
|
||||
fork_flags |= FORK_NEW_MOUNTNS;
|
||||
}
|
||||
|
||||
log_info("Formatting %s as %s", node, fstype);
|
||||
|
||||
if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *j = NULL;
|
||||
|
||||
|
||||
@ -59,3 +59,13 @@ if [[ ! -v ASAN_OPTIONS ]]; then
|
||||
assert_rc 2 systemd-run -q -t --property SystemCallFilter=~open_tree getent group definitelynotarealgroup
|
||||
systemctl start systemd-userdbd.socket systemd-userdbd.service
|
||||
fi
|
||||
|
||||
# For issue 40228
|
||||
UNIT="sleep$RANDOM"
|
||||
DISK_GID=$(userdbctl -j group disk | jq .gid)
|
||||
systemd-run -p DynamicUser=yes -p Group=disk -u "$UNIT" sleep infinity
|
||||
userdbctl group disk | grep -F 'io.systemd.NameServiceSwitch' >/dev/null
|
||||
userdbctl group "$DISK_GID" | grep -F 'io.systemd.NameServiceSwitch' >/dev/null
|
||||
(! busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LookupDynamicUserByName "s" disk)
|
||||
(! busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LookupDynamicUserByUID "u" "$DISK_GID")
|
||||
systemctl stop "$UNIT"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user