Fix 1000_configure_userns to avoid dropping a needed #endif Closes: #744877

This commit is contained in:
Christian Perrier
2014-04-16 06:27:01 +02:00
parent 68ee6e45ad
commit 25cba03d2d
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -47,6 +47,10 @@ shadow (1:4.2-1) UNRELEASED; urgency=low
* Switch to dpkg-source 3.0 (quilt) format
* Add build-dependency against bison
* Call dh-autoreconf since we need to regenerate all the autofoo files
[ Philippe Grégoire ]
* Fix 1000_configure_userns to avoid dropping a needed #endif
Closes: #744877
-- Christian Perrier <bubulle@debian.org> Sat, 27 Jul 2013 20:07:18 +0200
+2 -2
View File
@@ -51,17 +51,17 @@ Index: git/src/useradd.c
/*
* Get my name so that I can use it to report errors.
*/
@@ -2023,9 +2027,10 @@
@@ -2023,8 +2027,10 @@
is_shadow_grp = sgr_file_present ();
#endif
#ifdef ENABLE_SUBIDS
- is_sub_uid = sub_uid_file_present ();
- is_sub_gid = sub_gid_file_present ();
-#endif /* ENABLE_SUBIDS */
+ is_sub_uid = sub_uid_file_present () && !rflg &&
+ (!user_id || (user_id <= uid_max && user_id >= uid_min));
+ is_sub_gid = sub_gid_file_present () && !rflg &&
+ (!user_id || (user_id <= uid_max && user_id >= uid_min));
#endif /* ENABLE_SUBIDS */
get_defaults ();