[Pkg-shadow-devel] [shadow] 02/02: Adapt userns patches to 4.2.0 (hopefully)

Christian Perrier bubulle at moszumanska.debian.org
Fri Mar 14 20:51:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

bubulle pushed a commit to branch master
in repository shadow.

commit 68fb7adaf7d9cfe12bac08332dfdf68f62ede52f
Author: Christian Perrier <bubulle at debian.org>
Date:   Fri Mar 14 21:51:03 2014 +0100

    Adapt userns patches to 4.2.0 (hopefully)
---
 debian/patches/1000_configure_userns | 74 +++++++++++++++---------------------
 debian/patches/series                | 32 ++++++++--------
 2 files changed, 47 insertions(+), 59 deletions(-)

diff --git a/debian/patches/1000_configure_userns b/debian/patches/1000_configure_userns
index a198cf9..0cddc99 100644
--- a/debian/patches/1000_configure_userns
+++ b/debian/patches/1000_configure_userns
@@ -1,8 +1,8 @@
 === modified file 'etc/login.defs'
-Index: shadow/etc/login.defs
+Index: git/etc/login.defs
 ===================================================================
---- shadow.orig/etc/login.defs	2014-02-16 19:31:38.934898148 -0500
-+++ shadow/etc/login.defs	2014-02-16 19:31:38.926898149 -0500
+--- git.orig/etc/login.defs
++++ git/etc/login.defs
 @@ -229,7 +229,7 @@
  # Extra per user uids
  SUB_UID_MIN		   100000
@@ -11,7 +11,7 @@ Index: shadow/etc/login.defs
 +SUB_UID_COUNT		    65536
  
  #
- # Min/max values for automatic gid selection in groupadd
+ # Min/max values for automatic gid selection in groupadd(8)
 @@ -242,7 +242,7 @@
  # Extra per user group ids
  SUB_GID_MIN		   100000
@@ -20,27 +20,27 @@ Index: shadow/etc/login.defs
 +SUB_GID_COUNT		    65536
  
  #
- # Max number of login retries if password is bad
-Index: shadow/src/newusers.c
+ # Max number of login(1) retries if password is bad
+Index: git/src/newusers.c
 ===================================================================
---- shadow.orig/src/newusers.c	2014-02-16 19:31:38.934898148 -0500
-+++ shadow/src/newusers.c	2014-02-16 19:31:38.926898149 -0500
-@@ -946,8 +946,8 @@
- #ifdef SHADOWGRP
+--- git.orig/src/newusers.c
++++ git/src/newusers.c
+@@ -988,8 +988,8 @@
  	is_shadow_grp = sgr_file_present ();
  #endif
+ #ifdef ENABLE_SUBIDS
 -	is_sub_uid = sub_uid_file_present ();
 -	is_sub_gid = sub_gid_file_present ();
 +	is_sub_uid = sub_uid_file_present () && !rflg;
 +	is_sub_gid = sub_gid_file_present () && !rflg;
+ #endif				/* ENABLE_SUBIDS */
  
  	open_files ();
- 
-Index: shadow/src/useradd.c
+Index: git/src/useradd.c
 ===================================================================
---- shadow.orig/src/useradd.c	2014-02-16 19:31:38.934898148 -0500
-+++ shadow/src/useradd.c	2014-02-16 19:31:38.926898149 -0500
-@@ -1978,6 +1978,10 @@
+--- git.orig/src/useradd.c
++++ git/src/useradd.c
+@@ -1994,6 +1994,10 @@
  #endif				/* USE_PAM */
  #endif				/* ACCT_TOOLS_SETUID */
  
@@ -51,55 +51,43 @@ Index: shadow/src/useradd.c
  	/*
  	 * Get my name so that I can use it to report errors.
  	 */
-@@ -2001,18 +2005,20 @@
- 	 */
- 	user_groups[0] = (char *) 0;
- 
--
- 	is_shadow_pwd = spw_file_present ();
- #ifdef SHADOWGRP
+@@ -2023,9 +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 ();
--
--	get_defaults ();
- 
- 	process_flags (argc, argv);
- 
+-#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));
-+
-+	get_defaults ();
-+
- #ifdef ACCT_TOOLS_SETUID
- #ifdef USE_PAM
- 	{
-Index: shadow/libmisc/find_new_sub_uids.c
+ 
+ 	get_defaults ();
+ 
+Index: git/libmisc/find_new_sub_uids.c
 ===================================================================
---- shadow.orig/libmisc/find_new_sub_uids.c	2014-02-16 19:31:38.934898148 -0500
-+++ shadow/libmisc/find_new_sub_uids.c	2014-02-16 19:31:38.926898149 -0500
-@@ -56,7 +56,7 @@
+--- git.orig/libmisc/find_new_sub_uids.c
++++ git/libmisc/find_new_sub_uids.c
+@@ -58,7 +58,7 @@
  
  	min = getdef_ulong ("SUB_UID_MIN", 100000UL);
  	max = getdef_ulong ("SUB_UID_MAX", 600100000UL);
 -	count = getdef_ulong ("SUB_UID_COUNT", 10000);
 +	count = getdef_ulong ("SUB_UID_COUNT", 65536);
  
- 	if (min >= max || count >= max || (min + count) >= max) {
+ 	if (min > max || count >= max || (min + count - 1) > max) {
  		(void) fprintf (stderr,
-Index: shadow/libmisc/find_new_sub_gids.c
+Index: git/libmisc/find_new_sub_gids.c
 ===================================================================
---- shadow.orig/libmisc/find_new_sub_gids.c	2014-02-16 19:32:21.298896382 -0500
-+++ shadow/libmisc/find_new_sub_gids.c	2014-02-16 19:32:34.462895834 -0500
-@@ -56,7 +56,7 @@
+--- git.orig/libmisc/find_new_sub_gids.c
++++ git/libmisc/find_new_sub_gids.c
+@@ -58,7 +58,7 @@
  
  	min = getdef_ulong ("SUB_GID_MIN", 100000UL);
  	max = getdef_ulong ("SUB_GID_MAX", 600100000UL);
 -	count = getdef_ulong ("SUB_GID_COUNT", 10000);
 +	count = getdef_ulong ("SUB_GID_COUNT", 65536);
  
- 	if (min >= max || count >= max || (min + count) >= max) {
+ 	if (min > max || count >= max || (min + count - 1) > max) {
  		(void) fprintf (stderr,
diff --git a/debian/patches/series b/debian/patches/series
index e3d5fee..539a3df 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,20 +16,20 @@
 523_su_arguments_are_no_more_concatenated_by_default
 508_nologin_in_usr_sbin
 505_useradd_recommend_adduser
-userns/01_userns_doc
-userns/02_userns_doc_login.defs
-userns/03_userns_implement_commonio_append
-userns/04_userns_add_backend_support
-userns/05_userns_implemend_find_new_sub_xids
-userns/06_userns_userdel
-userns/07_userns_useradd
-userns/08_userns_detect_busy_subids
-userns/09_userns_usermod
-userns/10_userns_newusers
-userns/11_userns_newxidmap
-userns/12_userns_selinuxlibs
-userns/13_subordinate_parse_static_buf
-userns/14_fix_getopt
-userns/manpagetypo
-userns/16_add-argument-sanity-checking.patch
+#userns/01_userns_doc
+#userns/02_userns_doc_login.defs
+#userns/03_userns_implement_commonio_append
+#userns/04_userns_add_backend_support
+#userns/05_userns_implemend_find_new_sub_xids
+#userns/06_userns_userdel
+#userns/07_userns_useradd
+#userns/08_userns_detect_busy_subids
+#userns/09_userns_usermod
+#userns/10_userns_newusers
+#userns/11_userns_newxidmap
+#userns/12_userns_selinuxlibs
+#userns/13_subordinate_parse_static_buf
+#userns/14_fix_getopt
+#userns/manpagetypo
+#userns/16_add-argument-sanity-checking.patch
 1000_configure_userns

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shadow/shadow.git



More information about the Pkg-shadow-devel mailing list