[Pkg-shadow-commits] r1385 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Nov 17 21:24:06 UTC 2007


Author: nekral-guest
Date: 2007-11-17 21:24:06 +0000 (Sat, 17 Nov 2007)
New Revision: 1385

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/userdel.c
Log:
Make sure that the prefix is the name of a directory (not only the
beginning of a directory).
Openwall patch shadow-4.0.4.1-owl-userdel-path_prefix.diff.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2007-11-17 21:03:33 UTC (rev 1384)
+++ upstream/trunk/ChangeLog	2007-11-17 21:24:06 UTC (rev 1385)
@@ -1,5 +1,11 @@
 2007-11-17  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/userdel.c (path_prefix): Make sure that the prefix is the
+	name of a directory (not only the beginning of a directory).
+	Openwall patch shadow-4.0.4.1-owl-userdel-path_prefix.diff.
+
+2007-11-17  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/newgrp.c: Do not give an indication that the group has no
 	password.
 	* src/newgrp.c: Do not only bail on syslog if the password is not

Modified: upstream/trunk/src/userdel.c
===================================================================
--- upstream/trunk/src/userdel.c	2007-11-17 21:03:33 UTC (rev 1384)
+++ upstream/trunk/src/userdel.c	2007-11-17 21:24:06 UTC (rev 1385)
@@ -542,7 +542,8 @@
 #ifdef EXTRA_CHECK_HOME_DIR
 static int path_prefix (const char *s1, const char *s2)
 {
-	return (strncmp (s2, s1, strlen (s1)) == 0);
+	return (strncmp (s2, s1, strlen (s1)) == 0 &&
+		(s2[strlen (s1)] == '\0' || s2[strlen (s1)] == '/'));
 }
 #endif
 




More information about the Pkg-shadow-commits mailing list