From nobody Tue Sep 03 14:02:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WynPB6SL3z5PZyM; Tue, 03 Sep 2024 14:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WynPB4R4zz4r4Z; Tue, 3 Sep 2024 14:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725372126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TH+wtYT9NQgbqBS3v0V2MnpwRhBGv2UUgR6+iA6P2eI=; b=ehhP/XfEULNahIIKt2xw3/BaCtuKINcDw9jHj34MGxL1ACR8b53DiJ84KD0RZmKNcuVOFJ DSQV/0DptALdvRa65XqvwksMZFdFLwYJZ/YkNM5IIzQ8Y85jqMwB5M9G9girFTTD4SK2yg /FAnYIe4Xcc+hXuDZLuDgvi51q1de/eE2y+pByMCBkmSxx02vx55FaGzjF1XqgbG6r4kdP uMnjDY30rVmg6D53NxDA28QBk+GrT2BoYAi75ByP0wtZg2OaS6lN4lEQWAtUgBEyxnDYYx WYz1eE+HaBZcuH9clTi2kk++NGfpaIUZmdDTIWdViMC5WprEnMovCaPe6VKXwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725372126; a=rsa-sha256; cv=none; b=Gi6F+b5W2cnB/gNi+j/5wESbY9bb+CEScCrQ+FqR+osoWPhb3CA3XfkPCuFXKchOuc+T8C puGEHuO8yB45pIdF467OmP4+mccTaQwqi+YIopbvLgk1Z5XFRTxzFsotxqduRIKb/SV1Fg 5B5Cgpc8KFaaoQ2Lpmcgrhz4Fgm6WLM5JbdxblooHZV0iGTtHA8UnnYyeE2EYeB41BRlgx ULpMAPTODuf6C5JgCnz0Cf6WqJ9H12esG6PWpnQ9dy8gL9N8x/xbGzAfAIXX2IPi641+ky fmCdfILSsGekZz3jlrd/mm3az3vWsrCjhj1bh6pOXgK0ykdAXSaxcsUdJX97KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725372126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TH+wtYT9NQgbqBS3v0V2MnpwRhBGv2UUgR6+iA6P2eI=; b=NHzu32Vd525xuoZ4+ulrpVTzBCTeUWIoJSRlfSDUZd5DZhLNnkOV9zPGoImhtU47XaD849 MySmlfOpYcHcv8hChoGQNwJvOrLLfnel84yCfCKwpOqKAIVgAQ42yyVDdL1XhL5AFFXxNZ ml01EH+47Mlak2CtG5zRin9yhAo+BpLvSeRVNwzX8un0oCjSDjtOdkF7YiaFudZsMYViqa kGvG4dheQuGLDw4QZbqvjd2rKrtxPeBx8DR+r9UBZFTDqXBoTf+zcjDZQwlt8S6zAmlrAf exnE4V7QPafzh5/or04VA9GeUUwcbLdQxerLFeDWttMvcnfQlwgHxYqgA8EOMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WynPB427LzjlY; Tue, 3 Sep 2024 14:02:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 483E26EI084534; Tue, 3 Sep 2024 14:02:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483E26V5084531; Tue, 3 Sep 2024 14:02:06 GMT (envelope-from git) Date: Tue, 3 Sep 2024 14:02:06 GMT Message-Id: <202409031402.483E26V5084531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 9e8d504bb5a1 - stable/14 - pam_xdg: Fix user xdg runtime directory's descriptor leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e8d504bb5a1e7ede55814069e213d4702172b81 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9e8d504bb5a1e7ede55814069e213d4702172b81 commit 9e8d504bb5a1e7ede55814069e213d4702172b81 Author: Olivier Certner AuthorDate: 2024-08-13 21:04:09 +0000 Commit: Olivier Certner 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) {