Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 2025 14:49:02 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 79d0f4474653 - main - rpcbind: Ensure krpc is present.
Message-ID:  <aEbKLniIuHd4xuq7@kib.kiev.ua>
In-Reply-To: <202506091053.559ArJ8k043104@gitrepo.freebsd.org>
References:  <202506091053.559ArJ8k043104@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 09, 2025 at 10:53:19AM +0000, Dag-Erling Smørgrav wrote:
> The branch main has been updated by des:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=79d0f447465394fee8afa833dbdeb1a5f3ed52c3
> 
> commit 79d0f447465394fee8afa833dbdeb1a5f3ed52c3
> Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
> AuthorDate: 2025-06-09 10:52:21 +0000
> Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
> CommitDate: 2025-06-09 10:52:21 +0000
> 
>     rpcbind: Ensure krpc is present.
>     
>     MFC after:      1 week
>     Reviewed by:    rmacklem, glebius
>     Differential Revision:  https://reviews.freebsd.org/D50627
> ---
>  usr.sbin/rpcbind/rpcbind.c | 35 +++++++++++++++++++++--------------
>  1 file changed, 21 insertions(+), 14 deletions(-)
> 
> diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c
> index 1397a0222396..622e954f903b 100644
> --- a/usr.sbin/rpcbind/rpcbind.c
> +++ b/usr.sbin/rpcbind/rpcbind.c
> @@ -39,34 +39,38 @@
>   *
>   */
>  
> -#include <sys/types.h>
> -#include <sys/stat.h>
> -#include <sys/errno.h>
> -#include <sys/time.h>
> +#include <sys/param.h>
> +#include <sys/linker.h>
> +#include <sys/module.h>
>  #include <sys/resource.h>
> -#include <sys/wait.h>
>  #include <sys/signal.h>
>  #include <sys/socket.h>
> +#include <sys/stat.h>
> +#include <sys/time.h>
>  #include <sys/un.h>
> +#include <sys/wait.h>
> +
>  #include <rpc/rpc.h>
>  #include <rpc/rpc_com.h>
>  #ifdef PORTMAP
>  #include <netinet/in.h>
>  #endif
>  #include <arpa/inet.h>
> +
>  #include <assert.h>
> +#include <err.h>
> +#include <errno.h>
>  #include <fcntl.h>
> +#include <netconfig.h>
>  #include <netdb.h>
> +#include <pwd.h>
>  #include <stdbool.h>
>  #include <stdio.h>
> -#include <netconfig.h>
>  #include <stdlib.h>
> -#include <unistd.h>
> -#include <syslog.h>
> -#include <err.h>
> -#include <pwd.h>
>  #include <string.h>
> -#include <errno.h>
> +#include <syslog.h>
> +#include <unistd.h>
> +
>  #include "rpcbind.h"
>  
>  /* Global variables */
> @@ -148,12 +152,15 @@ main(int argc, char *argv[])
>  
>  	update_bound_sa();
>  
> +	/* Ensure krpc is loaded */
> +	if (modfind("krpc") < 0 && kldload("krpc") < 0)
> +		err(1, "krpc");
Why does rpcbind need krpc mod?
I understand that today most uses of Sun RPC are coming from nfs stuff.
But it is still not the only application.  E.g., NIS is still there.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aEbKLniIuHd4xuq7>