From nobody Mon May 20 16:08:27 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 4VjjCw1pZGz5LYCx; Mon, 20 May 2024 16:08:28 +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 4VjjCv6ddxz4sw6; Mon, 20 May 2024 16:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716221307; 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=Kh5IZm9+wnDWvX6+VwyDteZEtn+dbRrMj4YpH4IzdnQ=; b=FhOOK7IlPuTGbG9hhJXZYEHd/J3UTynFtRLyhm6cAJBrMepkcEDOqgEWiDNuT5XDS54QE4 X1Stmt0yDzqDDwtFQuB0TDpgnHy8bNd6BfVJANCJfrDB/k3Dlf9m9e7Bq5TYvQH8d1F58f LRFk5MLqDtOFuR1FjjjCEdtZnkLxtcuIVJrB7gtokqL7d8TqvZjpVWx5hRQtNcjO+8Oz5T O/S+AdVi+10hjCaxEju3fmNwqU0MA26zvLqE/m9aKctQrJpUdO9yD1EGTZdlTAAddHxPDR WW+3M9kU/vz79/vZFih27w8zm5VRUQe8fYwtjLBMXgntxxmQ/C3oiwb1OwCPzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716221307; a=rsa-sha256; cv=none; b=xP3I7f8LkSbuYvzUBBEY1FsjqUy/IbI263szDLi76nlW+V+H2+NlSVKtFUH/3zUKmAIrbm OAHV7eF+sSIJYhSEY/8C6RdHiytFyMdiWkJO2mkoNNVBJrymCx8EJld1TlTFTNneJBFtVU 3Ijj+ONBpXLw8bbg22ykyuMJna/WOd9//J8O6A3wjDYY3PIHd8tSb9PbB2gNhTZeLBB3X6 66Mgffix71EpDeY7q6U3kVVOppKojTXwY8qF0hqQMACDIXOcoyMMNkl/wdzonHKzbjVa1s DAj0ulVaES5vn4fNnLiPRqE9fXLJEYPZbAI5g/5flgj1J43Tz/IKpYiUS+TCDQ== 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=1716221307; 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=Kh5IZm9+wnDWvX6+VwyDteZEtn+dbRrMj4YpH4IzdnQ=; b=yUUAG82ziW7cDff927HJMU6WqfUDsBsKM0oT81uKN6SJPgDxVops3prvPVgyOXRCSQujWY 9qwFacygUmFc4P3Sx+rkcj7Nhgbe/ABOZxxBip1248iKQks18F+QuqYv+mVd1BeED45/f1 mz1NK3BiWxavabMZy+CJSxNDC1hQP91oKmDI05DmSQryhuFmLsNHdGWFv3GqJTA5Bh2Rd1 xL1zIle/lkhDqK0IYhOBbfC0KqeQEoZX/oKemd/FCBkb7Iw5DpxG3bUsM9MrAQbso6W52G Ag3Zi14fUxJKIF9rTkiHGsJSbNn8pTf817k0+rUE1yivAp4ilvPwhF0o+rng7g== 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 4VjjCv6CrJzknS; Mon, 20 May 2024 16:08:27 +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 44KG8R0T001725; Mon, 20 May 2024 16:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KG8R4k001722; Mon, 20 May 2024 16:08:27 GMT (envelope-from git) Date: Mon, 20 May 2024 16:08:27 GMT Message-Id: <202405201608.44KG8R4k001722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 37be4197f72a - main - 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/main X-Git-Reftype: branch X-Git-Commit: 37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 commit 37be4197f72ae3a61bd5e93d2ebdc9bd6d09ed21 Author: Wolfram Schneider AuthorDate: 2024-05-20 16:02:21 +0000 Commit: Wolfram Schneider CommitDate: 2024-05-20 16:02:21 +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 03803b777463..af638527f497 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -201,6 +201,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)