From nobody Thu Oct 16 16:58:25 2025 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 4cnZ0L23kkz6CntG; Thu, 16 Oct 2025 16:58:26 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cnZ0L0Nm5z3k8R; Thu, 16 Oct 2025 16:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633906; 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=vkqZlNVVJ7UGw3eGK0d5x/yPe3/JmN9NSwhJ70cll1A=; b=vKBLOCSE4SlE5IEot3yfJKed11L+Ur7/QfGL2mSLWwCUvCUPv+qmxWsrnIc307ybQSHfYX 05zGdA5BoeELvP3MaqPIEO0cukbG8p1aJLMpe9EiL6a+p9It6xEUZAhBjHruMG+tT8MTGv n68zKhJ4HL1M0MBqmvk/7tkarmwUSg21CIX5xCwHWy+9SX8FZTQHjIRsfui07X9zXM+xPn ZmeNYf4ws0oaQGa8Y8EKM+BNjNkcVmEkRpyTQjFdFtYag23TzpOGEEmR7aDcOc/riGy1yq /liMSYDPETbvkYzmXzmJz2/bduig3gh7tecdVGv1sc3ZkU0k+lgBduO4zd2JiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760633906; 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=vkqZlNVVJ7UGw3eGK0d5x/yPe3/JmN9NSwhJ70cll1A=; b=f2Js+9Af/ZSMbX2RBOTZyD2YuOx1xsFVBnNRwwDiuQ0RiflfUNVzlE1QNd42zR5XKXEPRL INWOSZ8ERNf+oCUTIwkRho/Up7MBJnlzNyaH3vhi8yMA+BVkCebe5FjasGJZ66b1R5DbHv 67eATR1HXRiwbNbnIUTOgSpkrOmF3CA+kHCu96Ca6DBuUj3JqcFEMoAtDt2wvVJfFRCs9K oxsbnV8+hivT1egbCdnRVFkS92v8IaTaQKxlJ+4g3CAYtMGYsa319PkbPIlhjZir8vzh/Y Sha1OYJP6JAQmSiF5WSa/R1LRn3AnuWE15A7i5gTs+urxi84AaWPYPmW1vfzSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760633906; a=rsa-sha256; cv=none; b=b82PeS5LGEgA6ctHoBteEV+vSVy4ncMgrJcuEQHJksBDzFIRE5hqfs/XLFYAE7Eb9mGVi5 XsNnEVkoJgQ8+STQYeOW2P2vbA2QX3gIPPDYQ4a22ZYe3BNFHzHsAg0jQBWhO5ubUvHSBG D4Wy6dTeKUESe8umhIEpWlK5NBwQZumwWNovaBQ80yddpSuYOLCLAwB7SpUSDFg/OIYUep 2TlzranLExL5BBBBqphXSbdSoUEzfS/9L8JYvxLuKThN3qBfs7YBlewVyxdS9jBKYP3R+U jppGhD4xrMBJfMJV+pK95h1Ui6VeEDICNq1Q8LOoA5sSe532AeimeTg1AZODIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cnZ0K6NpNz2Gd; Thu, 16 Oct 2025 16:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59GGwPcr055914; Thu, 16 Oct 2025 16:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59GGwPB6055911; Thu, 16 Oct 2025 16:58:25 GMT (envelope-from git) Date: Thu, 16 Oct 2025 16:58:25 GMT Message-Id: <202510161658.59GGwPB6055911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: b27688a8b5dc - stable/15 - sys/rpc: UNIX auth: Support XDR_FREE 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b27688a8b5dc92c87e74c40f3702484f5e2e329c Auto-Submitted: auto-generated The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b27688a8b5dc92c87e74c40f3702484f5e2e329c commit b27688a8b5dc92c87e74c40f3702484f5e2e329c Author: Olivier Certner AuthorDate: 2025-10-13 15:13:09 +0000 Commit: Olivier Certner CommitDate: 2025-10-16 16:57:46 +0000 sys/rpc: UNIX auth: Support XDR_FREE xdr_authunix_parms() does not allocate any auxiliary memory, so we can simply support XDR_FREE by just returning TRUE. Although there are currently no callers passing XDR_FREE, this makes us immune to such a change in a way that doesn't cost more but is more constructive than a mere KASSERT(). Suggested by: rmacklem MFC after: 2 days Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ae70c3ea498e06676040ee99254d261e29ae82e) --- sys/rpc/authunix_prot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index c1a9f90bbe28..0274a713ff2b 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -61,6 +61,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) uint32_t junk; char hostbuf[MAXHOSTNAMELEN]; + if (xdrs->x_op == XDR_FREE) + /* This function does not allocate auxiliary memory. */ + return (TRUE); + if (xdrs->x_op == XDR_ENCODE) { getcredhostname(NULL, hostbuf, sizeof(hostbuf)); namelen = strlen(hostbuf);