forked from rpms/rpcbind
74 lines
1.9 KiB
Diff
74 lines
1.9 KiB
Diff
diff --git a/configure.ac b/configure.ac
|
|
index 747a8bf..39181f0 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -23,7 +23,7 @@ AC_ARG_WITH([statedir],
|
|
AC_SUBST([statedir], [$with_statedir])
|
|
|
|
AC_ARG_WITH([rpcuser],
|
|
- AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]),
|
|
+ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@])
|
|
,, [with_rpcuser=root])
|
|
AC_SUBST([rpcuser], [$with_rpcuser])
|
|
|
|
diff --git a/man/rpcinfo.8 b/man/rpcinfo.8
|
|
index 5ece18f..750ffce 100644
|
|
--- a/man/rpcinfo.8
|
|
+++ b/man/rpcinfo.8
|
|
@@ -20,8 +20,7 @@
|
|
.Nm "rpcinfo"
|
|
.Fl l
|
|
.Op Fl T Ar transport
|
|
-.Ar host Ar prognum
|
|
-.Op Ar versnum
|
|
+.Ar host Ar prognum Ar versnum
|
|
.Nm "rpcinfo"
|
|
.Op Fl n Ar portnum
|
|
.Fl u
|
|
diff --git a/src/rpcbind.c b/src/rpcbind.c
|
|
index 83dbe93..924aca1 100644
|
|
--- a/src/rpcbind.c
|
|
+++ b/src/rpcbind.c
|
|
@@ -62,6 +62,7 @@
|
|
#include <netconfig.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
+#include <grp.h>
|
|
#include <syslog.h>
|
|
#include <err.h>
|
|
#include <pwd.h>
|
|
@@ -726,11 +727,9 @@ terminate(int dummy /*__unused*/)
|
|
unlink(_PATH_RPCBINDSOCK);
|
|
unlink(RPCBINDDLOCK);
|
|
#ifdef WARMSTART
|
|
- syslog(LOG_ERR,
|
|
- "rpcbind terminating on signal. Restart with \"rpcbind -w\"");
|
|
write_warmstart(); /* Dump yourself */
|
|
#endif
|
|
- exit(2);
|
|
+ exit(0); /* exit gracefully */
|
|
}
|
|
|
|
void
|
|
diff --git a/src/util.c b/src/util.c
|
|
index 9a5fb69..7d56479 100644
|
|
--- a/src/util.c
|
|
+++ b/src/util.c
|
|
@@ -101,12 +101,14 @@ static void
|
|
in6_fillscopeid(struct sockaddr_in6 *sin6)
|
|
{
|
|
u_int16_t ifindex;
|
|
+ u_int16_t *addr;
|
|
|
|
if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
|
|
- ifindex = ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]);
|
|
+ addr = (u_int16_t *)&sin6->sin6_addr.s6_addr[2];
|
|
+ ifindex = ntohs(*addr);
|
|
if (sin6->sin6_scope_id == 0 && ifindex != 0) {
|
|
sin6->sin6_scope_id = ifindex;
|
|
- *(u_int16_t *)&sin6->sin6_addr.s6_addr[2] = 0;
|
|
+ *addr = 0;
|
|
}
|
|
}
|
|
}
|