mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-02 13:18:52 +00:00
Merge pull request #11465 from rgirada/pam_coverity
vtysh: Account validity should be verified when authenticating users with PAM
This commit is contained in:
commit
1f97f6839a
@ -71,6 +71,10 @@ static int vtysh_pam(const char *user)
|
|||||||
fprintf(stderr, "vtysh_pam: Failure to initialize pam: %s(%d)",
|
fprintf(stderr, "vtysh_pam: Failure to initialize pam: %s(%d)",
|
||||||
pam_strerror(pamh, ret), ret);
|
pam_strerror(pamh, ret), ret);
|
||||||
|
|
||||||
|
if (pam_acct_mgmt(pamh, 0) != PAM_SUCCESS)
|
||||||
|
fprintf(stderr, "%s: Failed in account validation: %s(%d)",
|
||||||
|
__func__, pam_strerror(pamh, ret), ret);
|
||||||
|
|
||||||
/* close Linux-PAM */
|
/* close Linux-PAM */
|
||||||
if (pam_end(pamh, ret) != PAM_SUCCESS) {
|
if (pam_end(pamh, ret) != PAM_SUCCESS) {
|
||||||
pamh = NULL;
|
pamh = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user