2007-11-10 Nicolas François <nicolas.francois@centraliens.net>
- * NEWS, src/useradd.c: allow non numerical group identifier to be
+ * NEWS, src/chgpasswd.c, src/chpasswd.c: Fix chpasswd and
+ chgpasswd stack overflow. Based on Fedora's
+ shadow-4.0.18.1-overflow.patch.
+
+2007-11-10 Nicolas François <nicolas.francois@centraliens.net>
+
+ * NEWS, src/useradd.c: Allow non numerical group identifier to be
specified with useradd's -g option. Applied Debian patch
397_non_numerical_identifier. Thanks also to Greg Schafer
<gschafer@zip.com.au>.
- useradd: Allow non numerical group identifier to be specified with
useradd's -g option. Applied Debian patch 397_non_numerical_identifier.
Thanks also to Greg Schafer <gschafer@zip.com.au>.
+- chgpasswd, chpasswd: Fix chpasswd and chgpasswd stack overflow. Based on
+ Fedora's shadow-4.0.18.1-overflow.patch.
shadow-4.0.18.1 -> shadow-4.0.18.2 28-10-2007
newpwd = cp;
if (!eflg) {
if (md5flg) {
- char salt[12] = "$1$";
+ char tmp[12];
+ char salt[15] = "";
- strcat (salt, crypt_make_salt ());
+ strcat (tmp, crypt_make_salt ());
+ if (!strncmp (tmp, "$1$", 3))
+ strcat (salt, "$1$");
+ strcat (salt, tmp);
cp = pw_encrypt (newpwd, salt);
} else
cp = pw_encrypt (newpwd, crypt_make_salt ());
newpwd = cp;
if (!eflg) {
if (md5flg) {
- char salt[12] = "$1$";
+ char tmp[12];
+ char salt[15] = "";
- strcat (salt, crypt_make_salt ());
+ strcat (tmp, crypt_make_salt ());
+ if (!strncmp (tmp, "$1$", 3))
+ strcat (salt, "$1$");
+ strcat (salt, tmp);
cp = pw_encrypt (newpwd, salt);
} else
cp = pw_encrypt (newpwd, crypt_make_salt ());