nsresource: add constants for the only supported UID range size allocations

As requested: https://github.com/systemd/systemd/pull/39322#discussion_r2447366728
This commit is contained in:
Lennart Poettering
2025-10-21 23:09:50 +02:00
parent b3e5e00d45
commit bcafa70974
3 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -6007,7 +6007,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
userns_fd = nsresource_allocate_userns(userns_name, UINT64_C(0x10000));
userns_fd = nsresource_allocate_userns(userns_name, NSRESOURCE_UIDS_64K); /* allocate 64K UIDs */
if (userns_fd < 0) {
r = log_error_errno(userns_fd, "Failed to allocate user namespace with 64K users: %m");
goto finish;
@@ -6019,7 +6019,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
arg_uid_range = UINT32_C(0x10000);
arg_uid_range = NSRESOURCE_UIDS_64K;
}
if (arg_directory) {