1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

s3-pam_smbpass: Check the return code of secrets_init().

This fixes a coverity warning.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andreas Schneider 2015-01-22 09:51:10 +01:00 committed by Jeremy Allison
parent bc0768c964
commit 016bee95e3

View File

@ -170,6 +170,7 @@ unsigned int set_ctrl(pam_handle_t *pamh,
int i = 0;
const char *service_file = NULL;
unsigned int ctrl;
bool ok;
ctrl = SMB_DEFAULTS; /* the default selection of options */
@ -210,7 +211,10 @@ unsigned int set_ctrl(pam_handle_t *pamh,
_log_err(pamh, LOG_ERR, "Error loading service file %s", service_file);
}
secrets_init();
ok = secrets_init();
if (!ok) {
_log_err(pamh, LOG_ERR, "Error loading secrets database");
}
if (lp_null_passwords()) {
set( SMB__NULLOK, ctrl );