summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2013-10-22 14:47:51 -0600
committerTodd C. Miller <Todd.Miller@courtesan.com>2013-10-22 14:47:51 -0600
commit29ca3bae96566673ab1c38a17fe92be878214f15 (patch)
treedd2397416770f4c8cd6acd68f3c0f2b9f11ca63e
parentbc54afcf0a398b8e9b5a7c72661d1dae24041a12 (diff)
downloadsudo-29ca3bae96566673ab1c38a17fe92be878214f15.tar.gz
If pam_open_session() fails don't call pam_getenvlist() with a NULL
pam handle.
-rw-r--r--plugins/sudoers/auth/pam.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c
index eec9f474f..36ee05646 100644
--- a/plugins/sudoers/auth/pam.c
+++ b/plugins/sudoers/auth/pam.c
@@ -246,6 +246,7 @@ sudo_pam_begin_session(struct passwd *pw, char **user_envp[], sudo_auth *auth)
(void) pam_end(pamh, *pam_status | PAM_DATA_SILENT);
pamh = NULL;
status = AUTH_FAILURE;
+ goto done;
}
}