beginning of a directory).
Openwall patch shadow-4.0.4.1-owl-userdel-path_prefix.diff.
+2007-11-17 Nicolas François <nicolas.francois@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@centraliens.net>
* src/newgrp.c: Do not give an indication that the group has no
#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