From nobody Fri Aug 30 14:08:53 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 4WwKkt1fKnz5Mf9T; Fri, 30 Aug 2024 14:08:54 +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 4WwKkt10vvz3wrF; Fri, 30 Aug 2024 14:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725026934; 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=UZ6vd1shil5mM6hPBA4+p9jxE+tMBiHIYm59VDj2nKE=; b=ujNnc6mMQNWp1WgvS2BQt8/hfYYqVQDStaGiYk9cmLZPIjGaBXzofOcoQIVbHoTBfuFZyp ak1YxfulZqEejC3d5puRy/J/+p70LN4l10g/FATU5tbJP1rkJFf7QEXpi9+aHhrQEB5tZm 8sMYQPXkmXV4AHGk4iTWstCaLoEtIUtb9fYbFdO2sDO/bmgDFXrpgXk1Z1uxOMx22md2s+ yEqdWq4r0Z/Nnymh/6Hvc6KEDNtD6yKiUJxZEf3bP/RplgYoOJBI8yHf0bMNKmggLGlQbW XXeyg3ehly8p0dkojLKwZsLIuAw1A8WSLiGwpDabsarfYkNpu6PeVxCSGBDByg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725026934; a=rsa-sha256; cv=none; b=MSnbZv7H3IS4zzxaz9NgZFPMXir2CIghVtlWWN16ZF5o+safbuQ5n5mooA8ceFPuIruxAK KZNCYkuRTlqSHhCUeM4kPSvYZTdN2DXQf6R6IVVhN/XCaASrTB17HrtYQpetZVl+KMbxSa 06fJd8FVgcsYPOUXa2NAL0d2+89V0mSRpKWHgeUwmJY372oHlb2WZHrm66CWIjdHpFWpF5 dm1fNYP3xdRwcalfhVDscs56Gbd7t6R1wg6B8jHVEic/ClUKAN0Y+bn+bF1Qun6FFCuca+ lhyb2XqAx/CICMQZnbuP0gvmgufGy9ePjhTj8fnf4zzquEKMdCPfBye7LrY+Kg== 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=1725026934; 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=UZ6vd1shil5mM6hPBA4+p9jxE+tMBiHIYm59VDj2nKE=; b=VKYzTgwREDvNtiCMAgBj/5zJfs0bFpjWd3fk9Xp2hcuaaPmvQATYd5l40bSYU3heTleXJm mykt1qYGF1CspKBRj9co8J0FDa0qQBsNRcGDZwlEWT8mXLNHacY6Ew9lKLTaSxbSSZ1tAX imA5nszP8fTFvsIgISL110aBA8bKj0xBT2xF+XPcelsOWpRfH+Xb7RPWjwcvApB24CDmaz 9iYSGp+mucWWWIYuJ8uww5aNwGTcpfpjvaWCi4f63wIypdRFSSpDcIoSy1EXoQCtDVGZDf uUdT0TygolDN+e6ZIwcrq4CtvQpcMKqoBP1Ew+HgxdrUwX4vQNvXns1KcuUeLw== 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 4WwKkt0YpGz144b; Fri, 30 Aug 2024 14:08:54 +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 47UE8r16023494; Fri, 30 Aug 2024 14:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47UE8rgh023491; Fri, 30 Aug 2024 14:08:53 GMT (envelope-from git) Date: Fri, 30 Aug 2024 14:08:53 GMT Message-Id: <202408301408.47UE8rgh023491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 06986e899972 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 06986e899972ac3a127ab2ab46196672d0e1e5b2 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=06986e899972ac3a127ab2ab46196672d0e1e5b2 commit 06986e899972ac3a127ab2ab46196672d0e1e5b2 Author: Olivier Certner AuthorDate: 2024-08-13 21:04:09 +0000 Commit: Olivier Certner CommitDate: 2024-08-30 14:08:14 +0000 pam_xdg: Fix user xdg runtime directory's descriptor leak Fixes: 6e69612d5df1 ("pam: Add pam_xdg module") MFC after: 3 days Sponsored by: The FreeBSD Foundation --- 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) {