From nobody Wed Jul 22 09:29:32 2026 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 4h4pqd1DmTz6lsXj for ; Wed, 22 Jul 2026 09:29:33 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h4pqd0gGwz3Dhx for ; Wed, 22 Jul 2026 09:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784712573; 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=LekwZ38ySSFKdOooFZytqPN7qk+zQopVJfoqx3aPWaE=; b=X2BlHMQUQniMGznd2XS0wO+s2PbjXFxRfo5uYUSMiCqLUK2BVk3kKrWSh0gJHtbnWDFCkP j4LsQNOcpRFenqhRTwWIYzgwFSkJycA4ioDpv2STVhrKJEh85Wh8/noX8ZpFkt8a2V+lqp OBUhqQsHrCF6jfk8Sbnj1IsEVMIMKDw5E2Ki21av7lwq1P7395aD2QBvCvfkqdkl037aCf E7a0VL272WtJOgOgr+s3AdRW+mQtNQe6dyr6o8AdnKJ5J2XNhtnYe4rd1Mm4qkqdcsnUT+ bzSHlzSmbaYm6ILAQm/2ie/JebzpkoyU2cFsP2WbPeWqaLWdaQpwGECs3y4R1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784712573; a=rsa-sha256; cv=none; b=PUKKPhRGObM+fYJ4a1peUNHGtM7gKZC5kuZx/dqgZdgS5C0TxeGCAb5FLG5Rqkmb4W4nyK fixVMIX+tuj69sUlveqv8KTUXr7Jzw+Xd7KkkhXtF0a5vbN9odvKYle0UMpXUer7Fus8vr 3VAUoeCRLxX+sH9mVeQUL4Twp/oSybkR4JMo6pAlwF6XVs4msREW17LwMclPjR4J0S+Isc lXiRmvb/MNneQd1EdF/uV9mvZa4LHVn7OP0orz/Hy1jDi1F4lCrOBwA9N0SnydMKGrgj7G qpBM8r8s6BHs0OzI4IyhKqV/dvZRWaw5aCbFQZnsBL4d6XIA5S5Dd8wN9sV++A== 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=1784712573; 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=LekwZ38ySSFKdOooFZytqPN7qk+zQopVJfoqx3aPWaE=; b=vDV7feab5NT3LEZR59sA1C7FOb/0grM0ZlQv4qISOQhAyP9KIyqIVBUwGsRU2loZhIaobu yi01ZP3GSJ/dikjwrc7e94K+VvZpgzbTaYAUXQAnGiGoT8du5Mb6JVAuYfuF2pQARAygPR 2Jq3iROIvOpV1aOVVFXSBi6coRjw7goGJQAhTyJexLaDOlgge4ZjnW1Ws1osk2o3BBwUyt AO4GYUCnqEgNTplq5GlN2Q3BomsWs9xTPC88qJS9RnpGVKy/Qynr1D87RRtKmZYwDxgwvp wyO1M53Eu/6J2Ll3sGlwmBeEb3HarLrZ9lOaNsECxdUsY2u+0JeL8F/y/wETEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h4pqc6ckHz1QRv for ; Wed, 22 Jul 2026 09:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25c35 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Jul 2026 09:29:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 04f25ef716f7 - main - authpf(8) read_config() should chop off trailing white space 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04f25ef716f74d6bb7941750091c6cb4b51d0b4d Auto-Submitted: auto-generated Date: Wed, 22 Jul 2026 09:29:32 +0000 Message-Id: <6a608d7c.25c35.1805af92@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=04f25ef716f74d6bb7941750091c6cb4b51d0b4d commit 04f25ef716f74d6bb7941750091c6cb4b51d0b4d Author: Kristof Provost AuthorDate: 2026-07-21 13:10:16 +0000 Commit: Kristof Provost CommitDate: 2026-07-22 09:29:14 +0000 authpf(8) read_config() should chop off trailing white space if administrator mistakenly types into configuration file anchor=authpf_test where 'authpf_test' is followed by white space, the authpf(8) is going to use anchor 'authpf_test ' instead of the 'authpf_test' which is defined in pf.conf(5) as 'anchor authpf_test/*' issue kindly reported and patch submitted by Avinash Duduskar OK sashan@ PR: 296958 MFC after: 1 week Obtained from: OpenBSD, sashan , 2d12a8e44d Sponsored by: Rubicon Communications, LLC ("Netgate") --- contrib/pf/authpf/authpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 14d3d41b6e21..b835737c5ee2 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -404,8 +404,8 @@ read_config(FILE *f) if (ap != &pair[2]) goto parse_error; - tp = pair[1] + strlen(pair[1]); - while ((*tp == ' ' || *tp == '\t') && tp >= pair[1]) + tp = pair[1] + strlen(pair[1]) - 1; + while (tp >= pair[1] && (*tp == ' ' || *tp == '\t')) *tp-- = '\0'; if (strcasecmp(pair[0], "anchor") == 0) {