Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2024 14:02:06 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9e8d504bb5a1 - stable/14 - pam_xdg: Fix user xdg runtime directory's descriptor leak
Message-ID:  <202409031402.483E26V5084531@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=9e8d504bb5a1e7ede55814069e213d4702172b81

commit 9e8d504bb5a1e7ede55814069e213d4702172b81
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-08-13 21:04:09 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2024-09-03 13:28:58 +0000

    pam_xdg: Fix user xdg runtime directory's descriptor leak
    
    Approved by:    emaste (mentor)
    Fixes:          6e69612d5df1 ("pam: Add pam_xdg module")
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 06986e899972ac3a127ab2ab46196672d0e1e5b2)
    
    Approved by:    emaste (mentor)
---
 lib/libpam/modules/pam_xdg/pam_xdg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c
index 2c80f0a0332f..10c6467776a3 100644
--- a/lib/libpam/modules/pam_xdg/pam_xdg.c
+++ b/lib/libpam/modules/pam_xdg/pam_xdg.c
@@ -108,6 +108,7 @@ _pam_xdg_open(pam_handle_t *pamh, int flags __unused,
 			goto out;
 		}
 	} else {
+		close(rt_dir);
 		/* Check that the already create dir is correctly owned */
 		rv = fstatat(rt_dir_prefix, user, &sb, 0);
 		if (rv == -1) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409031402.483E26V5084531>