]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'PR/Benno-17Dec-25'
authorKarel Zak <kzak@redhat.com>
Mon, 5 Jan 2026 10:19:52 +0000 (11:19 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 5 Jan 2026 10:19:52 +0000 (11:19 +0100)
# Conflicts:
# sys-utils/unshare.c

1  2 
login-utils/login.c
sys-utils/unshare.c

Simple merge
index 6f82461b86cdb76cae50abfd12bbfd410d525ef9,7b177e618fb9ab1025c8dd72348d03c5f8bfbd29..dbf5d038eca10c43690eaaccdef7933da22fa724
@@@ -1194,14 -1206,14 +1194,14 @@@ int main(int argc, char *argv[]
  #endif
        }
  
-         if (mapuser != MAX_OF_UINT_TYPE(uid_t))
 -      if (mapuser != (uid_t) -1 && !usermap)
++      if (mapuser != MAX_OF_UINT_TYPE(uid_t) && !usermap)
                map_id(_PATH_PROC_UIDMAP, mapuser, real_euid);
  
-         /* Since Linux 3.19 unprivileged writing of /proc/self/gid_map
-          * has been disabled unless /proc/self/setgroups is written
-          * first to permanently disable the ability to call setgroups
-          * in that user namespace. */
-       if (mapgroup != MAX_OF_UINT_TYPE(gid_t)) {
+       /* Since Linux 3.19 unprivileged writing of /proc/self/gid_map
+        * has been disabled unless /proc/self/setgroups is written
+        * first to permanently disable the ability to call setgroups
+        * in that user namespace. */
 -      if (mapgroup != (gid_t) -1 && !groupmap) {
++      if (mapgroup != MAX_OF_UINT_TYPE(gid_t) && !groupmap) {
                if (setgrpcmd == SETGROUPS_ALLOW)
                        errx(EXIT_FAILURE, _("options --setgroups=allow and "
                                        "--map-group are mutually exclusive"));