From nobody Sun May 26 05:36:19 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 4Vn6vl3y6xz4fjhC; Sun, 26 May 2024 05:36:19 +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 4Vn6vl1Zhhz4mH8; Sun, 26 May 2024 05:36:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716701779; 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=6Os9auUrjZqg6Pds1kwcNaYgRq9UeROGaoa61ptA/Qs=; b=PNmeDSvItvncNlw/WY9Tq3oVdY1CFBEoKqokG7f/1TNjV9/8B3HQVpqiDL/+YorldjC+EC cMYWQpRh8TZOSv64bii+QMCCL1uqhcIlwxehmEmfek0eYTVFeB8fiXILe70ACfp1808W/v 8oVfXf+s6Txt/mmhjncC5FPFQGprlmwVGrX1jIE/PRgqUDBXYrbHmI/6hrjqWT212JAnWA BYngt8laKLWBBZkxo6QEBPTCSwnDRDshtux7Uey67zfAIi1BipGwy7zcdNKuk5qjSvwtCi pjzIZLWNgNYWDQ0tL1hBrh9imx5X61M4WAFydcqpFSO5Oni1UIpTFnqdOYiM9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716701779; a=rsa-sha256; cv=none; b=q5L/sFjSDUF+R5FE78RrNGPwj9ZYYuzoniaxGjoiapr4EUOw9Pl/aG6GQYEQ/hEh/l4k22 Tu3csCq4eLDvOgQBdH3AtRUnMppZo4OODG5dBHZj5Qae03nUIViyBc7Fyw+CjKO15KrAzv p/Y/aOqA/ycj/6/C8mwduCVNFU8wh8QC91HetkF/hQCSz5yxQ/R8XJCm/X+4yrZ6ja74XI V7ZdND5aT3bWqcPy1pbKGrKOXkf81jD8AIzyyJfXt1jZJ3oB85K+L6k1sitvXjrBOfoTA8 Fw27rbPNKuOt1ktZbFjVGQt+kEd1f16aq8dXYnIh0lclCeZLg0ydrDp8UYX4dg== 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=1716701779; 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=6Os9auUrjZqg6Pds1kwcNaYgRq9UeROGaoa61ptA/Qs=; b=Z6aUjCMJazmPQKWS5H6h/jkcN1MUMuc593CXrZnXSvzsCmepopJbDDi1Vh3bKcEBZPiUFt xXkinBmAL4SQigMI4PEjg1lubGgXNryCoTAZ5KvyP0XKhdMfEAqjDATLGT4CqImsiKEvMV zeWpdtPFFn9OAuw1U+Y83LL5OLjDBB4a5rAAIPEP3xGCqB5hUKCLk+WoEzu8KGk4jog7/Y Ug9JpJjlBZgXYbLJMHyWrxzqC6mcNDn7jwVFhfwVCNx96sj+AlQ2cIZOKM5f/3lFVQ3m7d aygQmvq3Jc7cKulT9n8fIsYzm1J+fGak574OmmZKINk58RrsDos5972XG5DfNQ== 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 4Vn6vl1B3VzndK; Sun, 26 May 2024 05:36:19 +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 44Q5aJtf060710; Sun, 26 May 2024 05:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44Q5aJ4r060708; Sun, 26 May 2024 05:36:19 GMT (envelope-from git) Date: Sun, 26 May 2024 05:36:19 GMT Message-Id: <202405260536.44Q5aJ4r060708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wolfram Schneider Subject: git: 432c0128bd3d - stable/14 - man: the exists function needs to validate the first parameter 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: wosch X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 432c0128bd3da3f7800e9fa525d677f8fb99d7a1 Auto-Submitted: auto-generated The branch stable/14 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=432c0128bd3da3f7800e9fa525d677f8fb99d7a1 commit 432c0128bd3da3f7800e9fa525d677f8fb99d7a1 Author: Wolfram Schneider AuthorDate: 2024-05-20 16:02:21 +0000 Commit: Wolfram Schneider CommitDate: 2024-05-26 05:34:40 +0000 man: the exists function needs to validate the first parameter This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion) --- usr.bin/man/man.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index cd047862727d..a4d23ff52aef 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -195,6 +195,10 @@ decho() { # Returns true if glob resolves to a real file and store the first # found filename in the variable $found exists() { + if [ -z "$1" ]; then + return 1 + fi + local IFS # Don't accidentally inherit callers IFS (breaks perl manpages)