]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: Improve log message
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Fri, 4 Jul 2025 19:21:25 +0000 (21:21 +0200)
committerDaanDeMeyer <daan.j.demeyer@gmail.com>
Thu, 10 Jul 2025 11:55:43 +0000 (13:55 +0200)
src/nspawn/nspawn-bind-user.c

index e7d976d1991da9de70ac179b83bab5b3cbffaf84..a17365d497f97eef498c2c838f73b877e42433b2 100644 (file)
@@ -269,7 +269,10 @@ int bind_user_prepare(
                         return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot bind user with no UID, refusing.");
 
                 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);
+                        return log_error_errno(
+                                        SYNTHETIC_ERRNO(EINVAL),
+                                        "UID "UID_FMT" of user '%s' to map is already in container UID range ("UID_FMT" - "UID_FMT"), refusing.",
+                                        u->uid, u->user_name, uid_shift, uid_shift + uid_range);
 
                 r = groupdb_by_gid(user_record_gid(u), /* match= */ NULL, USERDB_DONT_SYNTHESIZE_INTRINSIC|USERDB_DONT_SYNTHESIZE_FOREIGN, &g);
                 if (r < 0)