#include "pwio.h"
#include "shadowio.h"
#include "shadowlog.h"
+#include "strlcpy.h"
/*
* exit status values
pw->pw_name);
return -1;
}
- STRFCPY (orig, clear);
+ STRLCPY(orig, clear);
erase_pass (clear);
strzero (cipher);
} else {
if (warned && (strcmp (pass, cp) != 0)) {
warned = false;
}
- STRFCPY (pass, cp);
+ STRLCPY(pass, cp);
erase_pass (cp);
if (!amroot && (!obscure (orig, pass, pw) || reuse (pass, pw))) {
#ifdef HAVE_LIBCRACK_HIST
HistUpdate (pw->pw_name, crypt_passwd);
#endif /* HAVE_LIBCRACK_HIST */
- STRFCPY (crypt_passwd, cp);
+ STRLCPY(crypt_passwd, cp);
return 0;
}
* If there are no other flags, just change the password.
*/
if (!anyflag) {
- STRFCPY (crypt_passwd, cp);
+ STRLCPY(crypt_passwd, cp);
/*
* See if the user is permitted to change the password.