From nobody Tue Feb 27 07:06:34 2024 X-Original-To: dev-commits-src-main@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 4TkT6y4rDJz5Ccjy; Tue, 27 Feb 2024 07:06:34 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TkT6y3xFTz4Wmy; Tue, 27 Feb 2024 07:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709017594; 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=2DVqDP60MmBL9emluXw62YNJIa3p3e1cD1VwQO6BcOg=; b=GjTQ2ZG/JIveyeQQ7ORolT8bMjNB0XqQJemVTSIJt85c04zAFp+QfeuIqG+4S+/NlwCNRi wo9LRZPvYsJ2JkAE82toQJLwHbWUcL+MLDO/3U27snKe7YwbOf0ZOK3pCV26Flf6Sk3uk5 0WTZG+LnmZwHLbzvg5gLjwJSl1Am0K5chZkTq3/ELxaJ0e3rqBQcLP3R2hTX3ELi+7fJUj 7lRBsgoPKWswR2GhrF5bYr7iKCUHSaOdN2fAO9CFveDhBYRjp75agkST6rGZNMseRhdbFA BQjP9GeJTHiITNyaC/rGu/JTaoU6ZJjxv9ztRFQT9nrHcNGJyOO/HhbFHNJMUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709017594; a=rsa-sha256; cv=none; b=Bj07dMre8lzs/+cRAJUw8rb8d6dKHZpG7U0lhJKYFnrcjP/ZNW+pP/iTpwZcxxqEHFcL+P PIMyrFZJThPMDGCaugdL+ps6fK1ObfgEzW72frQPFrrjG98INQZLmu6nBLma4xS6wqjJpn G90ZUjXG9OEA8HP72UtMyqkhBTw20Ie9W3DOo+b6xoxGOy4CMdhke3j/OfZl+NnSBUvRFU JwNWkuRNpi56Zrwk0Ea5cXvQRzVYuPAUi9FedMrpZAjddedqy4VpFSveJ1va4JD6OEGB+a wbJYZNJmiQtJ398HbShPhozZ5Q6lXUtrD3uxBmbus6eiLl+aTYyQ+E1eaffrPA== 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=1709017594; 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=2DVqDP60MmBL9emluXw62YNJIa3p3e1cD1VwQO6BcOg=; b=Gx9XXkzTgEuWSGB6Qs9psWS3q8WF/FEck2v+ciDgSMmAMHngB62xms/coegpauIBXPAv3p eGGtvfq7uiGCU1X4204sfhsnmISZX3wvuaq80jaMY70NlV2duxYYdCU/k6o8yFJf6MEPx4 vh0vwW0gG/YyZYXW7NWtQl0N1T/cG0M8dQnh1j7ouh8olKFtN9PLfQ9V1WDLlHusFWlTLj fyUU4KGTzJbn4hcb6eAnips6wzltokvl2Nhlf9La46Qeoby3CpEyFatU6V+ZSabComUn/F a3PjZtN2JsC5iv7L2ULHvbQkha13zZ97jgg1yEJRLCwOPWDeY3i8BjeYRfY93A== 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 4TkT6y2vmtz12vv; Tue, 27 Feb 2024 07:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41R76Ylt010164; Tue, 27 Feb 2024 07:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R76YU4010161; Tue, 27 Feb 2024 07:06:34 GMT (envelope-from git) Date: Tue, 27 Feb 2024 07:06:34 GMT Message-Id: <202402270706.41R76YU4010161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 5acbe6d1fb55 - main - pam_xdg: Reset rv to 0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5acbe6d1fb552eeaf44955c2780f2e9d4a70cad3 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5acbe6d1fb552eeaf44955c2780f2e9d4a70cad3 commit 5acbe6d1fb552eeaf44955c2780f2e9d4a70cad3 Author: Emmanuel Vadot AuthorDate: 2024-02-27 07:05:00 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-27 07:06:02 +0000 pam_xdg: Reset rv to 0 Otherwise on success it ontain the return value of asprintf. Sponsored by: Beckhoff Automation GmbH & Co. KG Fixes: 2d2950c88933 ("pam_xdg: Check asprintf return value") --- lib/libpam/modules/pam_xdg/pam_xdg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c index d8ba6899da2f..f1a9b13d581c 100644 --- a/lib/libpam/modules/pam_xdg/pam_xdg.c +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c @@ -151,6 +151,7 @@ _pam_xdg_open(pam_handle_t *pamh, int flags __unused, rv = PAM_SESSION_ERR; goto out; } + rv = 0; session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE); free(xdg_session_file); if (session_file >= 0) @@ -272,6 +273,7 @@ _pam_xdg_close(pam_handle_t *pamh __unused, int flags __unused, rv = PAM_SESSION_ERR; goto out; } + rv = 0; session_file = openat(rt_dir_prefix, xdg_session_file, 0); if (session_file >= 0) { unlinkat(rt_dir_prefix, xdg_session_file, 0);