mirror of
https://abf.rosa.ru/djam/pam.git
synced 2025-02-23 16:32:51 +00:00
23 lines
934 B
Diff
23 lines
934 B
Diff
From 4e8af9027dab25ebff3fa1b6e5542640611778c9 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
|
Date: Sat, 5 Aug 2023 17:44:29 +0200
|
|
Subject: [PATCH] pam_start: free handlers on handler init failure
|
|
|
|
If the pam handlers fail to initialize halfway, clean them up
|
|
afterwards. Since we set the handle to NULL callers can't clean them.
|
|
---
|
|
libpam/pam_start.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/libpam/pam_start.c b/libpam/pam_start.c
|
|
index 99dd03898..1fc36b3ed 100644
|
|
--- a/libpam/pam_start.c
|
|
+++ b/libpam/pam_start.c
|
|
@@ -143,6 +143,7 @@ static int _pam_start_internal (
|
|
|
|
if ( _pam_init_handlers(*pamh) != PAM_SUCCESS ) {
|
|
pam_syslog(*pamh, LOG_ERR, "pam_start: failed to initialize handlers");
|
|
+ _pam_free_handlers(*pamh);
|
|
_pam_drop_env(*pamh); /* purge the environment */
|
|
_pam_drop((*pamh)->pam_conversation);
|
|
_pam_drop((*pamh)->service_name);
|