{
NTSTATUS status;
char *filter;
- char *error_string;
+ char *error_string = NULL;
const char *domain;
bool secrets_tdb_password_more_recent;
time_t secrets_tdb_lct = 0;
= talloc_asprintf(cred,
"Failed to fetch machine account password for %s from both "
"secrets.ldb (%s) and from %s",
- domain, error_string,
+ domain,
+ error_string == NULL ? "error" : error_string,
dbwrap_name(db_ctx));
} else {
char *secrets_tdb_path;
error_string = talloc_asprintf(cred,
"Failed to fetch machine account password from "
"secrets.ldb: %s and failed to open %s",
- error_string, secrets_tdb_path);
+ error_string == NULL ? "error" : error_string,
+ secrets_tdb_path);
}
- DEBUG(1, ("Could not find machine account in secrets database: %s: %s\n",
- error_string, nt_errstr(status)));
+ DEBUG(1, ("Could not find machine account in secrets database: %s: %s\n",
+ error_string == NULL ? "error" : error_string,
+ nt_errstr(status)));
/* set anonymous as the fallback, if the machine account won't work */
cli_credentials_set_anonymous(cred);
}