From nobody Thu Aug 31 07:51:03 2023 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 4RbtdN0rP9z4rsDZ; Thu, 31 Aug 2023 07:51:04 +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 4RbtdN0QNQz4SG6; Thu, 31 Aug 2023 07:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693468264; 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=+IDIG1Usg/m+c5s4YVkfSv1v5+zMTAhszeQ0MusRPCI=; b=PFMjrLUglhyi5I+naZyxLIG42gDepVb6zBNidh7/SprR29XZUwYGtXjCyBPlu4wZiQEqPP dk+mtVaj/8RoWmlHHNI2aFtbKkwxpUIDS7mLZdiZLFLR7WKJhoFb/sOeG6AYO+ShSkbCCY KfDE1dAMftSmdOZMQXdAu6khFOjb997F4v3GmzePidYlRwOtqghxGFedBMkB48QKl2muSl xlZlY4o4IN6cHVBippP349PHmfBrAGvKc/MPcf8IefeKZCl0CwxqJZgskkdckHz3tqBOH0 qrJ4AU6yMULf91Eyg7h+VVZCJezWPO5YwXZZfgrodyAu2Qx21hAcAU86e/amBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693468264; a=rsa-sha256; cv=none; b=KR/5YNeQ5qPPcdRN8MqtIgOIjP1qiX9bdogpyQ1o3q61+W2bFMp49iyq2gAbD1tvH+YsLL jZ8sU04/McgBgrM9LW2cTCr6u0I7rebxnULZvzks6eQnaqQyiLBFiBmPU4UVX3zQFiFTMo LQD0VaHX25RM/Ato7NGtLaSRfQWfNHVpEpTNfb8amvpB/PaZMyfaiuYUXXqt8vaS9qMuKs WR36We7iTBzI+uE7uafYmT91R7wPenBLDYLsJpnUiZu+bBD1PeS0oULEXKKQGynz4MIp9+ rYOHIg2x6HqcDzoxr8MMGRAaXu+ICl1vhNZSVujvnvQ621PqTUk7CigGjUxwnw== 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=1693468264; 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=+IDIG1Usg/m+c5s4YVkfSv1v5+zMTAhszeQ0MusRPCI=; b=sVGLH+f6m/4vgyooF/q5W8/HNsZfwPTpfqZ/vJ6TyzehX1cRwnTqDuqoz5b3w+F1dBM2tB OPHl5WtXITk3x7c4yk2gqSq7aB4mQ31I4Nby6tKNLRkYqM9t8ljGHXV7pt1rCg/rvx5Ktw QbF5m0PCh09D2ldwhftn+KOr/4EwYGOMbNMZVId7/Xt9JPPhpbpirGrdkSNR7SNBiyTIwb IUUrTutOAY6aHlPegfreiKrvFZCYc8oHHAfSnZ6cC1N3nXQEq7fFkbTHaVXMi1loPSIKii qCXKJvM1X12biqoEev0iCh972uxJ29BoEgtrGBjF3dUOxS8d17cN2IpFj5O47A== 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 4RbtdM6bwYz18PP; Thu, 31 Aug 2023 07:51:03 +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 37V7p3oF076840; Thu, 31 Aug 2023 07:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37V7p31M076837; Thu, 31 Aug 2023 07:51:03 GMT (envelope-from git) Date: Thu, 31 Aug 2023 07:51:03 GMT Message-Id: <202308310751.37V7p31M076837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 56b74a2d856c - main - nss_tacplus: Provide dummy setpwent(), getpwent_r(), endpwent(). 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56b74a2d856c4d65a4b5c72d1352067b6b469d3b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=56b74a2d856c4d65a4b5c72d1352067b6b469d3b commit 56b74a2d856c4d65a4b5c72d1352067b6b469d3b Author: Dag-Erling Smørgrav AuthorDate: 2023-08-31 07:49:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-31 07:49:57 +0000 nss_tacplus: Provide dummy setpwent(), getpwent_r(), endpwent(). These aren't really needed, since TACACS+ does not support enumeration, but providing placeholders keeps nsdispatch() from complaining that they're missing. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41658 --- lib/nss_tacplus/nss_tacplus.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/lib/nss_tacplus/nss_tacplus.c b/lib/nss_tacplus/nss_tacplus.c index e18ffe2315ce..238d7bf301ad 100644 --- a/lib/nss_tacplus/nss_tacplus.c +++ b/lib/nss_tacplus/nss_tacplus.c @@ -271,12 +271,43 @@ nss_tacplus_getpwnam_r(void *retval, void *mdata __unused, va_list ap) return (ret); } +static int +nss_tacplus_setpwent(void *retval __unused, void *mdata __unused, + va_list ap __unused) +{ + return (NS_SUCCESS); +} + +static int +nss_tacplus_getpwent_r(void *retval, void *mdata __unused, va_list ap) +{ + struct passwd *pwd __unused = va_arg(ap, struct passwd *); + char *buffer __unused = va_arg(ap, char *); + size_t bufsize __unused = va_arg(ap, size_t); + int *result = va_arg(ap, int *); + + *(void **)retval = NULL; + *result = 0; + return (NS_SUCCESS); + +} + +static int +nss_tacplus_endpwent(void *retval __unused, void *mdata __unused, + va_list ap __unused) +{ + return (NS_SUCCESS); +} + ns_mtab * nss_module_register(const char *name __unused, unsigned int *plen, nss_module_unregister_fn *unreg) { static ns_mtab mtab[] = { { "passwd", "getpwnam_r", &nss_tacplus_getpwnam_r, NULL }, + { "passwd", "setpwent", &nss_tacplus_setpwent, NULL }, + { "passwd", "getpwent_r", &nss_tacplus_getpwent_r, NULL }, + { "passwd", "endpwent", &nss_tacplus_endpwent, NULL }, }; *plen = nitems(mtab);