]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount-util: add debug message to make_userns() failure
authorLennart Poettering <lennart@poettering.net>
Thu, 19 Dec 2024 13:27:03 +0000 (14:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 19 Dec 2024 14:33:52 +0000 (15:33 +0100)
src/shared/mount-util.c

index c8486b1b4a844d1b35950d3cda5e391a736352bd..756fb74c35426b0b69f38505ea3540630b8bc9cd 100644 (file)
@@ -1321,7 +1321,7 @@ int make_userns(uid_t uid_shift, uid_t uid_range, uid_t source_owner, uid_t dest
          * process whose only purpose is to give us a new user namespace. It's killed when we got it. */
 
         if (!userns_shift_range_valid(uid_shift, uid_range))
-                return -EINVAL;
+                return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid UID range for user namespace.");
 
         if (IN_SET(idmapping, REMOUNT_IDMAPPING_NONE, REMOUNT_IDMAPPING_HOST_ROOT)) {
                 if (asprintf(&line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0u, uid_shift, uid_range) < 0)