summaryrefslogtreecommitdiffstats
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-11-12 17:04:11 +0100
committerLennart Poettering <lennart@poettering.net>2025-01-08 21:41:03 +0100
commit44eb6b81db77216e4f34e1de37eda133d7db6945 (patch)
tree4dd37183b650f6ae079a60e102da2b4f229e0874 /src/nspawn
parentuser-classification: add new "foreign" UID range (diff)
downloadsystemd-44eb6b81db77216e4f34e1de37eda133d7db6945.tar.xz
systemd-44eb6b81db77216e4f34e1de37eda133d7db6945.zip
userdb: synthesize stub user records for the foreign UID
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn-bind-user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn-bind-user.c b/src/nspawn/nspawn-bind-user.c
index d64a89f161..749accdce8 100644
--- a/src/nspawn/nspawn-bind-user.c
+++ b/src/nspawn/nspawn-bind-user.c
@@ -231,7 +231,7 @@ int bind_user_prepare(
_cleanup_(group_record_unrefp) GroupRecord *g = NULL, *cg = NULL;
_cleanup_free_ char *sm = NULL, *sd = NULL;
- r = userdb_by_name(*n, USERDB_DONT_SYNTHESIZE, &u);
+ r = userdb_by_name(*n, USERDB_DONT_SYNTHESIZE_INTRINSIC|USERDB_DONT_SYNTHESIZE_FOREIGN, &u);
if (r < 0)
return log_error_errno(r, "Failed to resolve user '%s': %m", *n);
@@ -252,7 +252,7 @@ int bind_user_prepare(
if (u->uid >= uid_shift && u->uid < uid_shift + uid_range)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "UID of user '%s' to map is already in container UID range, refusing.", u->user_name);
- r = groupdb_by_gid(u->gid, USERDB_DONT_SYNTHESIZE, &g);
+ r = groupdb_by_gid(u->gid, USERDB_DONT_SYNTHESIZE_INTRINSIC|USERDB_DONT_SYNTHESIZE_FOREIGN, &g);
if (r < 0)
return log_error_errno(r, "Failed to resolve group of user '%s': %m", u->user_name);