* password is being changed, trying to detect and reject passwords based on
* components of the principal.
*
- * Developed by Derrick Brashear and Ken Hornstein of Sine Nomine Associates,
- * on behalf of Stanford University
- * Extensive modifications by Russ Allbery <rra@stanford.edu>
- * Copyright 2006, 2007, 2009, 2012, 2013
+ * Developed by Daria Phoebe Brashear and Ken Hornstein of Sine Nomine
+ * Associates, on behalf of Stanford University Extensive modifications by Russ
+ * Allbery <eagle@eyrie.org> Copyright 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006-2007, 2009, 2012-2014
* The Board of Trustees of the Leland Stanford Junior University
*
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
*/
#include <config.h>
copy[j] = c;
}
if (strcasecmp(copy, password) == 0) {
+ explicit_bzero(copy, strlen(copy));
free(copy);
return strength_error_generic(ctx, ERROR_USERNAME);
}
if (i != 0) {
code = check_component(ctx, copy + i, password);
if (code != 0) {
+ explicit_bzero(copy, strlen(copy));
free(copy);
return code;
}
/* Check the current component. */
code = check_component(ctx, start, password);
if (code != 0) {
+ explicit_bzero(copy, strlen(copy));
free(copy);
return code;
}
} while (i < length);
/* Password does not appear to be based on the principal. */
+ explicit_bzero(copy, strlen(copy));
free(copy);
return 0;
}