[Pkg-shadow-devel] Ubuntu shadow 1:4.1.5.1-1.1ubuntu2

Ubuntu Merge-o-Matic mom at ubuntu.com
Fri Jul 18 17:39:25 UTC 2014


This e-mail has been sent due to an upload to Ubuntu that contains Ubuntu
changes.  It contains the difference between the new version and the
previous version of the same source package in Ubuntu.
-------------- next part --------------
Format: 1.8
Date: Fri, 18 Jul 2014 10:00:44 -0400
Source: shadow
Binary: passwd login uidmap
Architecture: source
Version: 1:4.1.5.1-1.1ubuntu2
Distribution: utopic
Urgency: medium
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Changed-By: Michael Terry <mterry at ubuntu.com>
Description: 
 login      - system login tools
 passwd     - change and administer password and group data
 uidmap     - programs to help use subuids
Changes: 
 shadow (1:4.1.5.1-1.1ubuntu2) utopic; urgency=medium
 .
   * debian/patches/1010_extrausers.patch:
     - Add support to passwd for libnss-extrausers by falling back to the
       /var/lib/extrausers/ locations if it exists when updating
       passwd or shadow.
Checksums-Sha1: 
 e437251f246381095037df8ef179fecef6132684 1744 shadow_4.1.5.1-1.1ubuntu2.dsc
 91f1d5d17b180a8f3dc0b79cb2a65d4339da9fd0 113748 shadow_4.1.5.1-1.1ubuntu2.diff.gz
Checksums-Sha256: 
 47ca5f8bd810a5e5066a3a604ec9caf5eae7480b6088771c55952688917ad51c 1744 shadow_4.1.5.1-1.1ubuntu2.dsc
 1df43d8ed424107e0c45f9ded2e855338070d0123aeda943c64ff0d4f96440e1 113748 shadow_4.1.5.1-1.1ubuntu2.diff.gz
Files: 
 24a689e82642fdf78c7b62d13bac6b3b 1744 admin required shadow_4.1.5.1-1.1ubuntu2.dsc
 3384cf52de5596e48775763acf811c43 113748 admin required shadow_4.1.5.1-1.1ubuntu2.diff.gz
Original-Maintainer: Shadow package maintainers <pkg-shadow-devel at lists.alioth.debian.org>
-------------- next part --------------
diff -pruN 1:4.1.5.1-1.1ubuntu1/debian/changelog 1:4.1.5.1-1.1ubuntu2/debian/changelog
--- 1:4.1.5.1-1.1ubuntu1/debian/changelog	2014-07-18 17:36:59.000000000 +0000
+++ 1:4.1.5.1-1.1ubuntu2/debian/changelog	2014-07-18 17:36:58.000000000 +0000
@@ -1,3 +1,12 @@
+shadow (1:4.1.5.1-1.1ubuntu2) utopic; urgency=medium
+
+  * debian/patches/1010_extrausers.patch:
+    - Add support to passwd for libnss-extrausers by falling back to the
+      /var/lib/extrausers/ locations if it exists when updating
+      passwd or shadow.
+
+ -- Michael Terry <mterry at ubuntu.com>  Fri, 18 Jul 2014 10:00:44 -0400
+
 shadow (1:4.1.5.1-1.1ubuntu1) utopic; urgency=medium
 
   * Merge from Debian unstable.  Remaining changes:
diff -pruN 1:4.1.5.1-1.1ubuntu1/debian/patches/1010_extrausers.patch 1:4.1.5.1-1.1ubuntu2/debian/patches/1010_extrausers.patch
--- 1:4.1.5.1-1.1ubuntu1/debian/patches/1010_extrausers.patch	1970-01-01 00:00:00.000000000 +0000
+++ 1:4.1.5.1-1.1ubuntu2/debian/patches/1010_extrausers.patch	2014-07-18 17:36:58.000000000 +0000
@@ -0,0 +1,176 @@
+Description: Add support to passwd for updating libnss-extrausers locations
+Author: Michael Terry <michael.terry at canonical.com>
+
+Index: shadow-4.1.5.1/lib/defines.h
+===================================================================
+--- shadow-4.1.5.1.orig/lib/defines.h
++++ shadow-4.1.5.1/lib/defines.h
+@@ -316,6 +316,14 @@ char *strchr (), *strrchr (), *strtok ()
+ #endif
+ #endif
+ 
++#ifndef EXTRAUSERS_PASSWD_FILE
++#define EXTRAUSERS_PASSWD_FILE "/var/lib/extrausers/passwd"
++#endif
++
++#ifndef EXTRAUSERS_SHADOW_FILE
++#define EXTRAUSERS_SHADOW_FILE "/var/lib/extrausers/shadow"
++#endif
++
+ #ifndef NULL
+ #define NULL ((void *) 0)
+ #endif
+Index: shadow-4.1.5.1/src/passwd.c
+===================================================================
+--- shadow-4.1.5.1.orig/src/passwd.c
++++ shadow-4.1.5.1/src/passwd.c
+@@ -544,8 +544,15 @@ static void update_noshadow (void)
+ {
+ 	const struct passwd *pw;
+ 	struct passwd *npw;
++	bool try_extrausers = strcmp (pw_dbname (), EXTRAUSERS_PASSWD_FILE) != 0 &&
++	                      access (EXTRAUSERS_PASSWD_FILE, F_OK) == 0;
+ 
+ 	if (pw_lock () == 0) {
++		if (try_extrausers) {
++			pw_setdbname (EXTRAUSERS_PASSWD_FILE);
++			update_noshadow ();
++			return;
++		}
+ 		(void) fprintf (stderr,
+ 		                _("%s: cannot lock %s; try again later.\n"),
+ 		                Prog, pw_dbname ());
+@@ -553,6 +560,20 @@ static void update_noshadow (void)
+ 	}
+ 	pw_locked = true;
+ 	if (pw_open (O_RDWR) == 0) {
++		if (try_extrausers) {
++			if (pw_unlock () == 0) {
++				(void) fprintf (stderr,
++				                _("%s: failed to unlock %s\n"),
++				                Prog, pw_dbname ());
++				SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
++				/* continue */
++			}
++			pw_locked = false;
++
++			pw_setdbname (EXTRAUSERS_PASSWD_FILE);
++			update_noshadow ();
++			return;
++		}
+ 		(void) fprintf (stderr,
+ 		                _("%s: cannot open %s\n"),
+ 		                Prog, pw_dbname ());
+@@ -561,6 +582,21 @@ static void update_noshadow (void)
+ 	}
+ 	pw = pw_locate (name);
+ 	if (NULL == pw) {
++		if (try_extrausers) {
++			(void) pw_close ();
++			if (pw_unlock () == 0) {
++				(void) fprintf (stderr,
++				                _("%s: failed to unlock %s\n"),
++				                Prog, pw_dbname ());
++				SYSLOG ((LOG_ERR, "failed to unlock %s", pw_dbname ()));
++				/* continue */
++			}
++			pw_locked = false;
++
++			pw_setdbname (EXTRAUSERS_PASSWD_FILE);
++			update_noshadow ();
++			return;
++		}
+ 		(void) fprintf (stderr,
+ 		                _("%s: user '%s' does not exist in %s\n"),
+ 		                Prog, name, pw_dbname ());
+@@ -598,8 +634,15 @@ static void update_shadow (void)
+ {
+ 	const struct spwd *sp;
+ 	struct spwd *nsp;
++	bool try_extrausers = strcmp (spw_dbname (), EXTRAUSERS_SHADOW_FILE) != 0 &&
++	                      access (EXTRAUSERS_SHADOW_FILE, F_OK) == 0;
+ 
+ 	if (spw_lock () == 0) {
++		if (try_extrausers) {
++			spw_setdbname (EXTRAUSERS_SHADOW_FILE);
++			update_shadow ();
++			return;
++		}
+ 		(void) fprintf (stderr,
+ 		                _("%s: cannot lock %s; try again later.\n"),
+ 		                Prog, spw_dbname ());
+@@ -607,6 +650,20 @@ static void update_shadow (void)
+ 	}
+ 	spw_locked = true;
+ 	if (spw_open (O_RDWR) == 0) {
++		if (try_extrausers) {
++			if (spw_unlock () == 0) {
++				(void) fprintf (stderr,
++						        _("%s: failed to unlock %s\n"),
++						        Prog, spw_dbname ());
++				SYSLOG ((LOG_ERR, "failed to unlock %s", spw_dbname ()));
++				/* continue */
++			}
++			spw_locked = false;
++
++			spw_setdbname (EXTRAUSERS_SHADOW_FILE);
++			update_shadow ();
++			return;
++		}
+ 		(void) fprintf (stderr,
+ 		                _("%s: cannot open %s\n"),
+ 		                Prog, spw_dbname ());
+@@ -617,7 +674,9 @@ static void update_shadow (void)
+ 	if (NULL == sp) {
+ 		/* Try to update the password in /etc/passwd instead. */
+ 		(void) spw_close ();
+-		update_noshadow ();
++		if (!try_extrausers) {
++			update_noshadow ();
++		}
+ 		if (spw_unlock () == 0) {
+ 			(void) fprintf (stderr,
+ 			                _("%s: failed to unlock %s\n"),
+@@ -626,6 +685,10 @@ static void update_shadow (void)
+ 			/* continue */
+ 		}
+ 		spw_locked = false;
++		if (try_extrausers) {
++			spw_setdbname (EXTRAUSERS_SHADOW_FILE);
++			update_shadow ();
++		}
+ 		return;
+ 	}
+ 	nsp = __spw_dup (sp);
+Index: shadow-4.1.5.1/lib/commonio.c
+===================================================================
+--- shadow-4.1.5.1.orig/lib/commonio.c
++++ shadow-4.1.5.1/lib/commonio.c
+@@ -401,6 +401,7 @@ int commonio_lock_nowait (struct commoni
+ int commonio_lock (struct commonio_db *db)
+ {
+ #ifdef HAVE_LCKPWDF
++  if (strncmp(db->filename, "/etc/", 5) == 0) {
+ 	/*
+ 	 * only if the system libc has a real lckpwdf() - the one from
+ 	 * lockpw.c calls us and would cause infinite recursion!
+@@ -428,7 +429,9 @@ int commonio_lock (struct commonio_db *d
+ 
+ 	ulckpwdf ();
+ 	return 0;		/* failure */
+-#else				/* !HAVE_LCKPWDF */
++  } else /* strncmp(db->filename, "/etc/", 5) == 0 */
++#endif				/* HAVE_LCKPWDF */
++  {
+ 	int i;
+ 
+ 	/*
+@@ -456,7 +459,7 @@ int commonio_lock (struct commonio_db *d
+ 		}
+ 	}
+ 	return 0;		/* failure */
+-#endif				/* !HAVE_LCKPWDF */
++  }
+ }
+ 
+ static void dec_lock_count (void)
diff -pruN 1:4.1.5.1-1.1ubuntu1/debian/patches/series 1:4.1.5.1-1.1ubuntu2/debian/patches/series
--- 1:4.1.5.1-1.1ubuntu1/debian/patches/series	2014-07-18 17:36:59.000000000 +0000
+++ 1:4.1.5.1-1.1ubuntu2/debian/patches/series	2014-07-18 17:36:58.000000000 +0000
@@ -35,3 +35,4 @@ userns/manpagetypo
 userns/16_add-argument-sanity-checking.patch
 496_su_kill_process_group
 1000_configure_userns
+1010_extrausers.patch


More information about the Pkg-shadow-devel mailing list