mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s3-pam_smbpass: Make sure variables are initialized.
This fixes cppcheck warnings. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
eb1bf816b6
commit
7bbf221cfd
@ -122,7 +122,7 @@ int converse( pam_handle_t * pamh, int ctrl, int nargs
|
||||
, struct pam_response **response )
|
||||
{
|
||||
int retval;
|
||||
struct pam_conv *conv;
|
||||
struct pam_conv *conv = NULL;
|
||||
|
||||
retval = _pam_get_item(pamh, PAM_CONV, &conv);
|
||||
if (retval == PAM_SUCCESS) {
|
||||
@ -370,7 +370,7 @@ int _smb_verify_password( pam_handle_t * pamh, struct samu *sampass,
|
||||
{ /* this means we've succeeded */
|
||||
return PAM_SUCCESS;
|
||||
} else {
|
||||
const char *service;
|
||||
const char *service = NULL;
|
||||
|
||||
_pam_get_item( pamh, PAM_SERVICE, &service );
|
||||
_log_err(pamh, LOG_NOTICE, "failed auth request by %s for service %s as %s",
|
||||
@ -402,7 +402,7 @@ int _smb_verify_password( pam_handle_t * pamh, struct samu *sampass,
|
||||
}
|
||||
} else {
|
||||
|
||||
const char *service;
|
||||
const char *service = NULL;
|
||||
|
||||
_pam_get_item( pamh, PAM_SERVICE, &service );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user