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:
parent
bc0768c964
commit
016bee95e3
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user