* Checks whether the password satisfies a set of character class rules.
*
* Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2016 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2016, 2023 Russ Allbery <eagle@eyrie.org>
* Copyright 2013-2014
* The Board of Trustees of the Leland Stanford Junior University
*
*/
static krb5_error_code
check_rule(krb5_context ctx, struct class_rule *rule, size_t length,
- struct password_classes *classes)
+ const struct password_classes *classes)
{
if (length < rule->min || (rule->max > 0 && length > rule->max))
return 0;
*/
static int
heimdal_pwcheck(krb5_context ctx, krb5_principal principal,
- krb5_data *password, const char *tuning UNUSED,
- char *message, size_t length)
+ krb5_data *password, const char *tuning UNUSED, char *message,
+ size_t length)
{
krb5_pwqual_moddata data = NULL;
char *pastring;
{
size_t i;
- for (i = 0; a[i] == b[i] && a[i] != '\0' && b[i] != '\0'; i++)
+ for (i = 0; a[i] == b[i] && a[i] != '\0'; i++)
;
return i;
}
-// Suppressions file for cppcheck. -*- conf -*-
+// Suppressions file for cppcheck.
//
// This includes suppressions for all of my projects, including files that
// aren't in rra-c-util, for ease of sharing between projects. The ones that
// with the --xml flag and then add a suppression for the error id, file
// location, and line.
//
-// Copyright 2018-2022 Russ Allbery <eagle@eyrie.org>
+// Copyright 2018-2023 Russ Allbery <eagle@eyrie.org>
//
// Copying and distribution of this file, with or without modification, are
// permitted in any medium without royalty provided the copyright notice and
nullPointerRedundantCheck:portable/krb5-renew.c:82
nullPointerRedundantCheck:portable/krb5-renew.c:83
+// (krb5-strength) Bug in cppcheck 2.12.0.
+nullPointerRedundantCheck:tests/plugin/heimdal-t.c:81
+nullPointerRedundantCheck:tests/plugin/mit-t.c:91
+nullPointerRedundantCheck:tests/plugin/mit-t.c:97
+
// Setting the variable to NULL explicitly after deallocation.
redundantAssignment:tests/pam-util/options-t.c
* which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
*
* Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2017, 2022 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2017, 2022, 2023 Russ Allbery <eagle@eyrie.org>
* Copyright 2006-2007, 2009-2014
* The Board of Trustees of the Leland Stanford Junior University
*
char *path;
char principal[BUFSIZ], *command;
size_t i;
- int status;
+ int status = 0;
/* Read the principal corresponding to the keytab. */
path = test_file_path("config/principal");