static /*@observer@*//*@null@*/const char *password_check (
/*@notnull@*/const char *old,
- /*@notnull@*/const char *new,
- /*@notnull@*/MAYBE_UNUSED const struct passwd *pwdp)
+ /*@notnull@*/const char *new)
{
const char *msg = NULL;
char *oldmono, *newmono, *wrapped;
static /*@observer@*//*@null@*/const char *obscure_msg (
/*@notnull@*/const char *old,
- /*@notnull@*/const char *new,
- /*@notnull@*/const struct passwd *pwdp)
+ /*@notnull@*/const char *new)
{
size_t maxlen, oldlen, newlen;
char *new1, *old1;
return NULL;
}
- msg = password_check (old, new, pwdp);
+ msg = password_check(old, new);
if (NULL != msg) {
return msg;
}
if (oldlen > maxlen)
stpcpy(&old1[maxlen], "");
- msg = password_check (old1, new1, pwdp);
+ msg = password_check(old1, new1);
freezero (new1, newlen);
freezero (old1, oldlen);
* check passwords.
*/
-bool obscure (const char *old, const char *new, const struct passwd *pwdp)
+bool
+obscure(const char *old, const char *new)
{
- const char *msg = obscure_msg (old, new, pwdp);
+ const char *msg = obscure_msg(old, new);
if (NULL != msg) {
printf (_("Bad password: %s. "), msg);
return -1;
}
- if (!amroot && !obscure(orig, pass, pw)) {
+ if (!amroot && !obscure(orig, pass)) {
(void) puts (_("Try again."));
continue;
}
* --marekm
*/
if (amroot && !warned && getdef_bool ("PASS_ALWAYS_WARN")
- && !obscure(orig, pass, pw)) {
+ && !obscure(orig, pass)) {
(void) puts (_("\nWarning: weak password (enter it again to use it anyway)."));
warned = true;
continue;