From nobody Fri Nov 11 18:36:34 2022 X-Original-To: dev-commits-src-branches@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 4N86qR3Hjfz4dbQY; Fri, 11 Nov 2022 18:36:35 +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 4N86qR1xWPz3tp2; Fri, 11 Nov 2022 18:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191795; 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=PSEfgPPByyfDLmflFluSegmwokGhgXBJ4ViMJk857/s=; b=sogiiQROPYbC/NTx/yzqz3LrJDoXH2/20gWdCdcpKgo9M7LAdLA0XreMwpcfeTjHQEr9yH 6ZRMeRPdo0UWqAFyxemExR6FDzzuOCTPTjNd3J9nSg+PoqFuTutcirNk/PlIFzWdpYkBg4 FvnBfUwOkd2SBYwF9nCIfB5z1O5Ans+kPNw11WECn8iqBOZbHL56e0fQT645JePIcdOYrw PKFPqLXphl9aU2Eb9yBHEyRopetvyCCJAdmeSXLOqhIaybb6W+GwESO5cWazbCMT0+/0Q6 ASFHmfK6KpInQYecEeBAz43UTZ2HYyWk7BqcHLPverdu5/oz8rr05Dn4CG7JBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668191795; 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=PSEfgPPByyfDLmflFluSegmwokGhgXBJ4ViMJk857/s=; b=RP/DIm8btDgVUdve1wvpEoNkcCBA1uoW3B0xRpS5jbzFpb/KVn/xzCekMTE+f53NEkKMfT u7Wa8FsDNULcS4ZKqTnm9uOVzNGY0kPtPWiXylj6KJroJBgY0Ha7Bkd0qNuBhKIXTPYniM fuCHV1bzN22s48oVtoxb4ZecWz9H+28M0FXosi9syULYVkrGbbJLc35tONwQ/ppRHNu2Of wy71V0OQ7asFv4l19fac/CWttCXiohn5U000oQSDoywsHn8SMtd4xgCIz0Sa0TUO6TUaHL hBvL1rEHpH8ZP/L8Tq6JzfbTUoV6tkg4tcVyWwcrNSoLr26eeG5bqKCXT3f6hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668191795; a=rsa-sha256; cv=none; b=L2gDyYft4/WB+Cj8/2e2EqesdiGZQXYjhLZaogPKzrTCiXi2K1V/ieSzabH5ICPQh7pYK+ XlpUpFfsO2btOYZz/HAolCuWBkMMMQJeoP1VKr2JItkYptrSKJ0A9uE12PTLdfAapDAo9a zPlCxBWF919J1yH10k5UQ2IuAsjjTsBMO6EE5DXSEkatP5aZE7U71VEOzc5WpGX4khpWS+ PxmeWQ4QKujhXPOW6F163cstXQ64ZpjR1d81ziovxtnDoZXs8pYkSb2QJmPPf6LBHuRtav TnmZsCyhqLTME6I/CFxmxswC2h0RE3AofOaIbeM49td6dOP2GIxW9M4WC+mq2g== 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 4N86qR0cJgzt4x; Fri, 11 Nov 2022 18:36:35 +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 2ABIaYgN003776; Fri, 11 Nov 2022 18:36:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ABIaYxJ003775; Fri, 11 Nov 2022 18:36:34 GMT (envelope-from git) Date: Fri, 11 Nov 2022 18:36:34 GMT Message-Id: <202211111836.2ABIaYxJ003775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 35acd8db3484 - stable/13 - libc rpc: Fix mismatches in prototypes for array bounds. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35acd8db34842ee58f4d69a24948a133a31b8551 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=35acd8db34842ee58f4d69a24948a133a31b8551 commit 35acd8db34842ee58f4d69a24948a133a31b8551 Author: John Baldwin AuthorDate: 2022-09-28 21:01:36 +0000 Commit: John Baldwin CommitDate: 2022-11-11 18:18:52 +0000 libc rpc: Fix mismatches in prototypes for array bounds. Various RPC functions used a bare pointer in function prototypes to describe fixed-length buffer arguments but used a fixed-length array in the function definition. The manual page for these functions describes the parameters as being fixed-length buffers, so update the prototypes to match the definitions. Reviewed by: imp, emaste Reported by: GCC -Warray-parameter Differential Revision: https://reviews.freebsd.org/D36757 (cherry picked from commit a2e41a585b3a8a54e09831ea476ccaa56142c1ae) --- include/rpc/auth.h | 11 ++++++----- lib/libc/rpc/netnamer.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/rpc/auth.h b/include/rpc/auth.h index bf0d76c046c6..8773e7115d12 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -279,11 +279,12 @@ __END_DECLS * Netname manipulation routines. */ __BEGIN_DECLS -extern int getnetname(char *); -extern int host2netname(char *, const char *, const char *); -extern int user2netname(char *, const uid_t, const char *); -extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *); -extern int netname2host(char *, char *, const int); +extern int getnetname(char [MAXNETNAMELEN + 1]); +extern int host2netname(char [MAXNETNAMELEN + 1], const char *, const char *); +extern int user2netname(char [MAXNETNAMELEN + 1], const uid_t, const char *); +extern int netname2user(char [MAXNETNAMELEN + 1], uid_t *, gid_t *, int *, + gid_t *); +extern int netname2host(char [MAXNETNAMELEN + 1], char *, const int); extern void passwd2des ( char *, char * ); __END_DECLS diff --git a/lib/libc/rpc/netnamer.c b/lib/libc/rpc/netnamer.c index 591f6d5c91e5..8062c446dffe 100644 --- a/lib/libc/rpc/netnamer.c +++ b/lib/libc/rpc/netnamer.c @@ -64,7 +64,7 @@ static char *NETID = "netid.byname"; static char *NETIDFILE = "/etc/netid"; static int getnetid( char *, char * ); -static int _getgroups( char *, gid_t * ); +static int _getgroups( char *, gid_t [NGRPS] ); /* * Convert network-name into unix credential