From nobody Fri Mar 10 13:29:16 2023 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 4PY6Mw5Db2z3xWwq; Fri, 10 Mar 2023 13:29:16 +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 4PY6Mw4SpGz3R22; Fri, 10 Mar 2023 13:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678454956; 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=tIA0IA9XEpPJdqQr1Blj8R7k8P/FYhQfoR+FCPna8Fw=; b=ApwbcnwXBzreg9P6ysBIUoFh6NfARXPMRZ/j+7b/KyjWQan4EyzIyJjYxXjBE5ZjL6RY2S fKaFiKht31nUVaQZ/7uVv6uXgeN4GdJGadExTH+8o6r+Bfe0amvsfjsUxPFHD529NVpAb6 4/g6kySplV1Mk3BJijMQiTfveS73i3KEXGE0e6/ntWzdCz/Zvp1RcSngyybR694YRDb11D m32/YOMyAtKnshlrvBtD1lLoBnZ8yTXaKROx5Ii72Uxc3FtzCBwNIZNhH/236QIyEsU0v4 8aiF4vt46rM0rymYUGt4Np6qAPsy+BBQghjDJjY+HAqf07SR2tKtLl67sHFr4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678454956; 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=tIA0IA9XEpPJdqQr1Blj8R7k8P/FYhQfoR+FCPna8Fw=; b=WWopttFOs5GKHohH/XsNyBJ4BA5vha+64jrPXU80UagvMglD10vfUnLb/XiduqgY+Bjd8P 41BEAF1rfmpHA7yLFAF2gRFr5GXIlo2mBhyWtG7QinTNS8eWXDMAhSHWNXz75HnDlkJ00y sO3unMgxPRHqeSPjn79KKHWhtjltrp1GtmjfetP3ryriljPvuROYrV/cr3+vCoKp+GuRqS ADBuUa+/qV78Ee5PKCyXf0FLr9PHn70t+6UUB4u9Q5i/n2iGaoUSc/x7wAujO17eNnpbuI i9+Oum9SJkAZ8TkNXmzvy0YE59Ep8exwxkcbIQ7e6IAYlzpmoTHmoUrWGqrKzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678454956; a=rsa-sha256; cv=none; b=EaWsdyutHu8tJoruUQfVFnixSBBTpHbZcyyCnYkHg9xHwK4sEJvQwxIzuXD+9fM7RatZLT fZDthKFgKSHMVHXdut1puo1ySOFhV75RQDj7s1GC9y3B2MVSpFEabMu2M8uFA00kSWtkrN zr6TUivi58NoW0s6FPbQ9CNL20LTLUuOm1Vc9kJBFrY9NDNlUflce8hntfQoibQAkHv1tR 2hjXfIc9b9dRGxNUqJq8RImOxcH3EVPzV86npXMlIP5AdAHe7qT3VHczKgo/dg+SHEGs2H xFOmaOXaxCodaukEJa4J/barif3wigWAoQdTIdNh6rNBvgKwAas8gFmGhgkGSQ== 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 4PY6Mw3VGBzqWP; Fri, 10 Mar 2023 13:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32ADTG0E090006; Fri, 10 Mar 2023 13:29:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32ADTGvi090005; Fri, 10 Mar 2023 13:29:16 GMT (envelope-from git) Date: Fri, 10 Mar 2023 13:29:16 GMT Message-Id: <202303101329.32ADTGvi090005@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 7c21545c46e1 - main - tftpd: Ensure that tftp_log() preserves errno. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c21545c46e1290e66fd9e9300165b4a381161b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7c21545c46e1290e66fd9e9300165b4a381161b9 commit 7c21545c46e1290e66fd9e9300165b4a381161b9 Author: Dag-Erling Smørgrav AuthorDate: 2023-03-10 13:24:19 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-03-10 13:25:16 +0000 tftpd: Ensure that tftp_log() preserves errno. Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38956 --- libexec/tftpd/tftp-utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/tftpd/tftp-utils.c b/libexec/tftpd/tftp-utils.c index 322b5ad9ae62..1647ad8be1c9 100644 --- a/libexec/tftpd/tftp-utils.c +++ b/libexec/tftpd/tftp-utils.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -148,8 +149,10 @@ void tftp_log(int priority, const char *message, ...) { va_list ap; + int serrno; char *s; + serrno = errno; va_start(ap, message); if (_tftp_logtostdout == 0) { vasprintf(&s, message, ap); @@ -159,6 +162,7 @@ tftp_log(int priority, const char *message, ...) printf("\n"); } va_end(ap); + errno = serrno; } /*