1
0
forked from rpms/rpcbind

Updated to latest upstream release 0.1.5

This commit is contained in:
Steve Dickson 2008-06-23 15:26:48 +00:00
parent 604a14b4a1
commit d85eb9a08d
11 changed files with 9 additions and 620 deletions

View File

@ -1 +1,2 @@
rpcbind-0.1.4.tar.bz2 rpcbind-0.1.4.tar.bz2
rpcbind-0.1.5.tar.bz2

View File

@ -1,21 +0,0 @@
--- rpcbind-0.1.4/man/Makefile.am.orig 2006-08-09 19:42:58.000000000 -0400
+++ rpcbind-0.1.4/man/Makefile.am 2006-08-09 19:45:01.000000000 -0400
@@ -0,0 +1,2 @@
+man8_MANS = rpcbind.8
+EXTRA_DIST = $(man8_MANS)
--- rpcbind-0.1.4/configure.in.orig 2005-01-03 09:03:29.000000000 -0500
+++ rpcbind-0.1.4/configure.in 2006-08-09 19:39:16.000000000 -0400
@@ -20,6 +20,6 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h ne
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([tirpc], [clnt_create])
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT()
--- rpcbind-0.1.4/Makefile.am.orig 2004-11-04 06:51:42.000000000 -0500
+++ rpcbind-0.1.4/Makefile.am 2006-08-09 19:43:57.000000000 -0400
@@ -1,2 +1,2 @@
-SUBDIRS= src
+SUBDIRS= src man

View File

@ -1,31 +0,0 @@
--- rpcbind-0.1.4/src/Makefile.am.debug 2004-11-15 08:38:02.000000000 -0500
+++ rpcbind-0.1.4/src/Makefile.am 2006-08-10 10:28:58.000000000 -0400
@@ -18,8 +18,10 @@ rpcbind_LDFLAGS = -lpthread -ltirpc
rpcbind_LDADD = $(LIB_TIRPC)
AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
-DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
-## -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL \
-## -DND_DEBUG -DBIND_DEBUG
+if DEBUG
+INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
+INCLUDES += -DND_DEBUG -DBIND_DEBUG
+endif
$(rpcbind_OBJECTS) : security.o util.o check_bound.o pmap_svc.o \
rpcb_svc.o rpcb_svc_com.o rpcb_svc_4.o \
--- rpcbind-0.1.4/configure.in.debug 2006-08-09 20:26:22.000000000 -0400
+++ rpcbind-0.1.4/configure.in 2006-08-10 10:33:31.000000000 -0400
@@ -10,6 +10,13 @@ AC_CONFIG_SRCDIR([src/rpcbind.c])
AC_HEADER_DIRENT
AC_PREFIX_DEFAULT(/usr)
+AC_ARG_ENABLE(debug,[ --enable-debug Turns on rpcbind debugging],
+ [case "${enableval}" in
+ yes) debug=true ;;
+ no) debug=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+ esac],[debug=false])
+AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
netinet/in.h stdlib.h string.h \

View File

@ -1,42 +0,0 @@
commit 29827c82fbb78725478eaf53b140e14a77fad42f
Author: Steve Dickson <steved@redhat.com>
Date: Sat Sep 15 11:32:57 2007 -0400
Added autoconf rules to turn on secure host checking via libwrap.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/configure.in b/configure.in
index dfe5907..2bdf830 100644
--- a/configure.in
+++ b/configure.in
@@ -52,6 +52,14 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([tirpc], [clnt_create])
+AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking],
+ [case "${enableval}" in
+ yes) libwarp=true
+ AC_CHECK_LIB([wrap], [hosts_access]) ;;
+ no) libwarp=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
+ esac],[libwarp=false])
+AM_CONDITIONAL(LIBWRAP, test x$libwarp = xtrue)
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT()
diff --git a/src/Makefile.am b/src/Makefile.am
index fd80847..d66b43f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,6 +9,10 @@ if WARMSTART
INCLUDES += -DWARMSTART
endif
+if LIBWRAP
+INCLUDES += -DLIBWRAP
+endif
+
bin_PROGRAMS = rpcbind rpcinfo

View File

@ -1,100 +0,0 @@
commit 913c1d3396ba57052054d6da0745b29f82ece4eb
Author: Steve Dickson <steved@redhat.com>
Date: Mon Dec 17 14:28:03 2007 -0500
Changed is_loopback() and check_access() see if the calling
address is an address on a local interface, just not a loopback
address.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/security.c b/src/security.c
index 7e6f3a9..b1a2b76 100644
--- a/src/security.c
+++ b/src/security.c
@@ -31,6 +31,7 @@
#ifdef LIBWRAP
# include <tcpd.h>
+# include <ifaddrs.h>
#ifndef LIBWRAP_ALLOW_FACILITY
# define LIBWRAP_ALLOW_FACILITY LOG_AUTH
#endif
@@ -61,6 +62,49 @@ int log_severity = PORTMAP_LOG_FACILITY|PORTMAP_LOG_SEVERITY;
extern int verboselog;
+#ifdef LIBWRAP
+static int localaddr(struct sockaddr *addr)
+{
+ static struct ifaddrs *ifp = NULL;
+ struct ifaddrs *ifa = NULL;
+ void *caller, *localip;
+ struct sockaddr_in *sin;
+ struct sockaddr_in6 *sin6;
+
+ if (ifp == NULL && getifaddrs (&ifp) < 0) {
+ perror ("getifaddrs");
+ return 0;
+ }
+
+ if (addr->sa_family == AF_INET)
+ caller = (void *)&((struct sockaddr_in *)addr)->sin_addr;
+ else
+ caller = (void *)&((struct sockaddr_in6 *)addr)->sin6_addr;
+
+ for (ifa = ifp; ifa; ifa = ifa->ifa_next) {
+ socklen_t salen;
+
+ if (ifa->ifa_addr == NULL)
+ continue;
+
+ if (ifa->ifa_addr->sa_family == AF_INET) {
+ salen = sizeof (struct sockaddr_in);
+ sin = (struct sockaddr_in *)ifa->ifa_addr;
+ localip = (void *)&sin->sin_addr;
+ } else if (ifa->ifa_addr->sa_family == AF_INET6) {
+ sin6 = (struct sockaddr_in6 *)ifa->ifa_addr;
+ localip = (void *)&sin6->sin6_addr;
+ } else
+ continue;
+
+ if (memcmp(localip, caller, salen) == 0)
+ return 1;
+ }
+
+ return 0;
+}
+#endif
+
int
check_access(SVCXPRT *xprt, rpcproc_t proc, void *args, unsigned int rpcbvers)
{
@@ -115,7 +159,7 @@ check_access(SVCXPRT *xprt, rpcproc_t proc, void *args, unsigned int rpcbvers)
}
#ifdef LIBWRAP
- if (addr->sa_family == AF_LOCAL)
+ if (addr->sa_family == AF_LOCAL || localaddr(addr))
return 1;
request_init(&req, RQ_DAEMON, "rpcbind", RQ_CLIENT_SIN, addr, 0);
sock_methods(&req);
@@ -147,13 +191,17 @@ is_loopback(struct netbuf *nbuf)
case AF_INET:
if (!oldstyle_local)
return 0;
+ if (localaddr(addr))
+ return 1;
sin = (struct sockaddr_in *)addr;
- return ((sin->sin_addr.s_addr == htonl(INADDR_LOOPBACK)) &&
+ return ((sin->sin_addr.s_addr == htonl(INADDR_LOOPBACK)) &&
(ntohs(sin->sin_port) < IPPORT_RESERVED));
#ifdef INET6
case AF_INET6:
if (!oldstyle_local)
return 0;
+ if (localaddr(addr))
+ return 1;
sin6 = (struct sockaddr_in6 *)addr;
return ((IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr) ||
(IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr) &&

View File

@ -1,21 +0,0 @@
commit 24bc988ad64b927c062f2464963151da70c0ce68
Author: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Thu Jan 24 13:34:58 2008 -0500
Fixed connectivity with Mac OS clients by making sure handle_reply()
sets the correct fromlen in its recvfrom() call
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
index 131c05c..8f6b4c7 100644
--- a/src/rpcb_svc_com.c
+++ b/src/rpcb_svc_com.c
@@ -1246,6 +1246,7 @@ handle_reply(int fd, SVCXPRT *xprt)
goto done;
do {
+ fromlen = sizeof(ss);
inlen = recvfrom(fd, buffer, RPC_BUF_MAX, 0,
(struct sockaddr *)&ss, &fromlen);
} while (inlen < 0 && errno == EINTR);

View File

@ -1,68 +0,0 @@
--- rpcbind-0.1.4/src/rpcbind.c.orig 2004-12-02 11:37:16.000000000 -0500
+++ rpcbind-0.1.4/src/rpcbind.c 2007-04-03 09:03:12.000000000 -0400
@@ -68,6 +68,7 @@
#include <pwd.h>
#include <string.h>
#include <errno.h>
+#include "config.h"
#include "rpcbind.h"
/*#define RPCBIND_DEBUG*/
@@ -79,6 +80,11 @@
rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */
+#ifdef RPCBIND_USER
+char *rpcbinduser = RPCBIND_USER;
+#else
+char *rpcbinduser = NULL;
+#endif
/* who to suid to if -s is given */
#define RUN_AS "daemon"
@@ -206,15 +212,16 @@
err(1, "fork failed");
}
- if (runasdaemon) {
+ if (runasdaemon || rpcbinduser) {
struct passwd *p;
+ char *id = runasdaemon ? RUN_AS : rpcbinduser;
- if((p = getpwnam(RUN_AS)) == NULL) {
- syslog(LOG_ERR, "cannot get uid of daemon: %m");
+ if((p = getpwnam(id)) == NULL) {
+ syslog(LOG_ERR, "cannot get uid of '%s': %m", id);
exit(1);
}
if (setuid(p->pw_uid) == -1) {
- syslog(LOG_ERR, "setuid to daemon failed: %m");
+ syslog(LOG_ERR, "setuid to '%s' failed: %m", id);
exit(1);
}
}
--- rpcbind-0.1.4/src/config.h.in.orig 2007-04-03 09:02:35.000000000 -0400
+++ rpcbind-0.1.4/src/config.h.in 2007-04-03 09:02:49.000000000 -0400
@@ -1,2 +1,6 @@
-/* this define where the state files live for warm starts */
+
+/* This defines where the state files live for warm starts */
#undef RPCBIND_STATEDIR
+
+/* This defines the uid to run as */
+#undef RPCBIND_USER
--- rpcbind-0.1.4/configure.in.orig 2007-04-03 09:02:35.000000000 -0400
+++ rpcbind-0.1.4/configure.in 2007-04-03 09:02:49.000000000 -0400
@@ -37,6 +37,12 @@
AC_SUBST(statedir)
AC_DEFINE_UNQUOTED(RPCBIND_STATEDIR, "$statedir", [This defines the location where the state files will be kept for warm starts])
fi
+AC_ARG_WITH(rpcuser,
+ [ --with-rpcuser=user uid to use [root]],
+ rpcuser=$withval,
+ rpcuser=root)
+ AC_SUBST(rpcuser)
+AC_DEFINE_UNQUOTED(RPCBIND_USER, "$rpcuser", [This defines the uid to run as])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
netinet/in.h stdlib.h string.h \

View File

@ -1,197 +0,0 @@
commit 40009ddc661a43883d0f7841f6bbd71e0c9b530a
Author: Steve Dickson <steved@redhat.com>
Date: Fri Feb 8 14:27:57 2008 -0500
Fixed a warning in pmap_svc.c
Cleaned up read_struct().
Signed-off-by: Steve Dickson <steved@redhat.com>
diff -up rpcbind-0.1.4/src/rpcbind.c.save rpcbind-0.1.4/src/rpcbind.c
--- rpcbind-0.1.4/src/rpcbind.c.save 2008-02-11 10:10:01.000000000 -0500
+++ rpcbind-0.1.4/src/rpcbind.c 2008-02-11 10:16:14.000000000 -0500
@@ -193,11 +193,7 @@ main(int argc, char *argv[])
(void) signal(SIGHUP, SIG_IGN);
(void) signal(SIGUSR1, SIG_IGN);
(void) signal(SIGUSR2, SIG_IGN);
-#ifdef WARMSTART
- if (warmstart) {
- read_warmstart();
- }
-#endif
+
if (debugging) {
#ifdef RPCBIND_DEBUG
printf("rpcbind debugging enabled.");
@@ -226,6 +222,12 @@ main(int argc, char *argv[])
}
}
+#ifdef WARMSTART
+ if (warmstart) {
+ read_warmstart();
+ }
+#endif
+
network_init();
my_svc_run();
diff -up rpcbind-0.1.4/src/warmstart.c.save rpcbind-0.1.4/src/warmstart.c
--- rpcbind-0.1.4/src/warmstart.c.save 2008-02-11 10:10:01.000000000 -0500
+++ rpcbind-0.1.4/src/warmstart.c 2008-02-11 10:16:14.000000000 -0500
@@ -45,22 +45,19 @@
#endif
#include <syslog.h>
#include <unistd.h>
+#include <errno.h>
#include "config.h"
#include "rpcbind.h"
-/*
- * XXX this code is unsafe and is not used. It should be made safe.
- */
-
#ifndef RPCBIND_STATEDIR
#define RPCBIND_STATEDIR "/tmp"
#endif
/* These files keep the pmap_list and rpcb_list in XDR format */
-#define RPCBFILE RPCBIND_STATEDIR "/rpcbind.file"
+#define RPCBFILE RPCBIND_STATEDIR "/rpcbind.xdr"
#ifdef PORTMAP
-#define PMAPFILE RPCBIND_STATEDIR "/portmap.file"
+#define PMAPFILE RPCBIND_STATEDIR "/portmap.xdr"
#endif
static bool_t write_struct __P((char *, xdrproc_t, void *));
@@ -92,7 +89,7 @@ write_struct(char *filename, xdrproc_t s
xdrstdio_create(&xdrs, fp, XDR_ENCODE);
if (structproc(&xdrs, list) == FALSE) {
- syslog(LOG_ERR, "rpcbind: xdr_%s: failed", filename);
+ syslog(LOG_ERR, "xdr_%s: failed", filename);
fclose(fp);
return (FALSE);
}
@@ -107,37 +104,39 @@ read_struct(char *filename, xdrproc_t st
FILE *fp;
XDR xdrs;
struct stat sbuf;
-
- if (stat(filename, &sbuf) != 0) {
- fprintf(stderr,
- "rpcbind: cannot stat file = %s for reading\n", filename);
- goto error;
- }
- if ((sbuf.st_uid != 0) || (sbuf.st_mode & S_IRWXG) ||
- (sbuf.st_mode & S_IRWXO)) {
- fprintf(stderr,
- "rpcbind: invalid permissions on file = %s for reading\n",
- filename);
- goto error;
- }
- fp = fopen(filename, "r");
- if (fp == NULL) {
- fprintf(stderr,
- "rpcbind: cannot open file = %s for reading\n", filename);
+
+ if (debugging)
+ fprintf(stderr, "rpcbind: using '%s' startup file\n", filename);
+
+ if ((fp = fopen(filename, "r")) == NULL) {
+ syslog(LOG_ERR,
+ "Cannot open '%s' file for reading, errno %d (%s)",
+ filename, errno, strerror(errno));
goto error;
}
- xdrstdio_create(&xdrs, fp, XDR_DECODE);
+ xdrstdio_create(&xdrs, fp, XDR_DECODE);
if (structproc(&xdrs, list) == FALSE) {
fprintf(stderr, "rpcbind: xdr_%s: failed\n", filename);
fclose(fp);
goto error;
}
XDR_DESTROY(&xdrs);
+
fclose(fp);
+ if (unlink(filename) < 0) {
+ syslog(LOG_ERR, "Cannot unlink '%s', errno %d (%s)",
+ filename, errno, strerror(errno));
+ }
return (TRUE);
-error: fprintf(stderr, "rpcbind: will start from scratch\n");
+error:
+ if (errno != ENOENT && unlink(filename) < 0) {
+ syslog(LOG_ERR, "Cannot unlink '%s', errno %d (%s)",
+ filename, errno, strerror(errno));
+ }
+ if (debugging)
+ fprintf(stderr, "rpcbind: will start from scratch\n");
return (FALSE);
}
@@ -145,9 +144,9 @@ void
write_warmstart()
{
(void) write_struct(RPCBFILE, (xdrproc_t)xdr_rpcblist_ptr, &list_rbl);
- #ifdef PORTMAP
- (void) write_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &list_pml);
- #endif
+#ifdef PORTMAP
+ (void) write_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &list_pml);
+#endif
}
@@ -158,22 +157,20 @@ read_warmstart()
#ifdef PORTMAP
struct pmaplist *tmp_pmapl = NULL;
#endif
- int ok1, ok2 = TRUE;
+ int rc;
+
+ rc = read_struct(RPCBFILE, (xdrproc_t)xdr_rpcblist_ptr, &tmp_rpcbl);
+ if (rc == TRUE) {
+ xdr_free((xdrproc_t) xdr_rpcblist_ptr, (char *)&list_rbl);
+ list_rbl = tmp_rpcbl;
+ }
+#ifdef PORTMAP
+ rc = read_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &tmp_pmapl);
+ if (rc == TRUE) {
+ xdr_free((xdrproc_t) xdr_pmaplist_ptr, (char *)&list_pml);
+ list_pml = tmp_pmapl;
+ }
+#endif
- ok1 = read_struct(RPCBFILE, (xdrproc_t)xdr_rpcblist_ptr, &tmp_rpcbl);
- if (ok1 == FALSE)
- return;
- #ifdef PORTMAP
- ok2 = read_struct(PMAPFILE, (xdrproc_t)xdr_pmaplist_ptr, &tmp_pmapl);
- #endif
- if (ok2 == FALSE) {
- xdr_free((xdrproc_t) xdr_rpcblist_ptr, (char *)&tmp_rpcbl);
- return;
- }
- xdr_free((xdrproc_t) xdr_rpcblist_ptr, (char *)&list_rbl);
- list_rbl = tmp_rpcbl;
- #ifdef PORTMAP
- xdr_free((xdrproc_t) xdr_pmaplist_ptr, (char *)&list_pml);
- list_pml = tmp_pmapl;
- #endif
+ return;
}
diff -up rpcbind-0.1.4/src/pmap_svc.c.save rpcbind-0.1.4/src/pmap_svc.c
--- rpcbind-0.1.4/src/pmap_svc.c.save 2008-02-11 10:15:34.000000000 -0500
+++ rpcbind-0.1.4/src/pmap_svc.c 2008-02-11 10:16:14.000000000 -0500
@@ -314,7 +314,7 @@ pmapproc_getport(struct svc_req *rqstp /
if ((pt2 = strrchr(ua, '.')) != NULL) {
*pt2 = 0;
snprintf(serveuaddr, sizeof serveuaddr,
- "%s.%d.%d", ua,
+ "%s.%ld.%ld", ua,
(fnd->pml_map.pm_port >> 8) & 0xff,
(fnd->pml_map.pm_port) & 0xff);
*pt2 = '.';

View File

@ -1,114 +0,0 @@
--- rpcbind-0.1.4/man/rpcbind.8.orig 2004-10-25 08:07:44.000000000 -0400
+++ rpcbind-0.1.4/man/rpcbind.8 2007-04-03 08:31:57.000000000 -0400
@@ -131,6 +131,14 @@
clients from using
.Nm
to connect to services from a privileged port.
+.It Fl w
+Cause
+.Nm
+to do a "warm start" by read a state file when
+.Nm
+starts up. The state file is created when
+.Nm
+terminates.
.El
.Sh NOTES
All RPC servers must be restarted if
--- rpcbind-0.1.4/src/warmstart.c.orig 2004-10-25 08:07:42.000000000 -0400
+++ rpcbind-0.1.4/src/warmstart.c 2007-04-03 08:32:21.000000000 -0400
@@ -46,17 +46,21 @@
#include <syslog.h>
#include <unistd.h>
+#include "config.h"
#include "rpcbind.h"
/*
* XXX this code is unsafe and is not used. It should be made safe.
*/
+#ifndef RPCBIND_STATEDIR
+#define RPCBIND_STATEDIR "/tmp"
+#endif
/* These files keep the pmap_list and rpcb_list in XDR format */
-#define RPCBFILE "/tmp/rpcbind.file"
+#define RPCBFILE RPCBIND_STATEDIR "/rpcbind.file"
#ifdef PORTMAP
-#define PMAPFILE "/tmp/portmap.file"
+#define PMAPFILE RPCBIND_STATEDIR "/portmap.file"
#endif
static bool_t write_struct __P((char *, xdrproc_t, void *));
--- /dev/null 2007-04-02 10:04:26.771658626 -0400
+++ rpcbind-0.1.4/src/config.h.in 2007-04-03 08:31:57.000000000 -0400
@@ -0,0 +1,2 @@
+/* this define where the state files live for warm starts */
+#undef RPCBIND_STATEDIR
--- rpcbind-0.1.4/src/Makefile.am.orig 2007-04-03 08:31:44.000000000 -0400
+++ rpcbind-0.1.4/src/Makefile.am 2007-04-03 08:31:57.000000000 -0400
@@ -1,5 +1,14 @@
INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \
-D_GNU_SOURCE -Wall -pipe
+if DEBUG
+INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
+INCLUDES += -DND_DEBUG -DBIND_DEBUG
+endif
+
+if WARMSTART
+INCLUDES += -DWARMSTART
+endif
+
bin_PROGRAMS = rpcbind rpcinfo
@@ -18,10 +27,6 @@
rpcbind_LDADD = $(LIB_TIRPC)
AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
-DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
-if DEBUG
-INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
-INCLUDES += -DND_DEBUG -DBIND_DEBUG
-endif
$(rpcbind_OBJECTS) : security.o util.o check_bound.o pmap_svc.o \
rpcb_svc.o rpcb_svc_com.o rpcb_svc_4.o \
--- rpcbind-0.1.4/configure.in.orig 2007-04-03 08:31:44.000000000 -0400
+++ rpcbind-0.1.4/configure.in 2007-04-03 08:31:57.000000000 -0400
@@ -9,7 +9,10 @@
##AC_PROG_RANLIB
AC_HEADER_DIRENT
AC_PREFIX_DEFAULT(/usr)
-
+
+AC_CONFIG_SRCDIR([src/config.h.in])
+AC_CONFIG_HEADERS([src/config.h])
+
AC_ARG_ENABLE(debug,[ --enable-debug Turns on rpcbind debugging],
[case "${enableval}" in
yes) debug=true ;;
@@ -18,6 +21,23 @@
esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
+AC_ARG_ENABLE(warmstarts,[ --enable-warmstarts Enables Warm Starts],
+ [case "${enableval}" in
+ yes) warmstarts=true ;;
+ no) warmstarts=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-warmstarts) ;;
+ esac],[warmstarts=false])
+AM_CONDITIONAL(WARMSTART, test x$warmstarts = xtrue)
+
+if test "$warmstarts" = "true" ; then
+ AC_ARG_WITH(statedir,
+ [ --with-statedir=/foo use state dir /foo [/tmp]],
+ statedir=$withval,
+ statedir=/tmp)
+ AC_SUBST(statedir)
+ AC_DEFINE_UNQUOTED(RPCBIND_STATEDIR, "$statedir", [This defines the location where the state files will be kept for warm starts])
+fi
+
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
netinet/in.h stdlib.h string.h \
sys/param.h sys/socket.h \

View File

@ -1,15 +1,15 @@
%{!?_initdir:%define _initdir /etc/rc.d/init.d} %{!?_initdir:%define _initdir /etc/rc.d/init.d}
Name: rpcbind Name: rpcbind
Version: 0.1.4 Version: 0.1.5
Release: 14%{?dist} Release: 1%{?dist}
Summary: Universal Addresses to RPC Program Number Mapper Summary: Universal Addresses to RPC Program Number Mapper
Group: System Environment/Daemons Group: System Environment/Daemons
License: GPL License: GPL
URL: http://nfsv4.bullopensource.org URL: http://nfsv4.bullopensource.org
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
Source0: http://nfsv4.bullopensource.org/tarballs/rpcbind/rpcbind-0.1.4.tar.bz2 Source0: http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
Source1: rpcbind.init Source1: rpcbind.init
Requires: glibc-common >= 2.5.90-20 Requires: glibc-common >= 2.5.90-20
@ -25,15 +25,7 @@ Requires(post): /sbin/chkconfig
Provides: portmap = %{version}-%{release} Provides: portmap = %{version}-%{release}
Obsoletes: portmap <= 4.0-65.3 Obsoletes: portmap <= 4.0-65.3
Patch1: rpcbind-0.1.4-compile.patch Patch1: rpcbind-0.1.4-iff_up.patch
Patch2: rpcbind-0.1.4-debug.patch
Patch3: rpcbind-0.1.4-warmstarts.patch
Patch4: rpcbind-0.1.4-rpcuser.patch
Patch5: rpcbind-0.1.4-iff_up.patch
Patch6: rpcbind-0.1.4-libwrap.patch
Patch7: rpcbind-0.1.4-localaddr.patch
Patch8: rpcbind-0.1.4-recvfrom-fix.patch
Patch9: rpcbind-0.1.4-warmstarts-cleanup.patch
%description %description
The rpcbind utility is a server that converts RPC program numbers into The rpcbind utility is a server that converts RPC program numbers into
@ -44,19 +36,6 @@ RPC calls on a server on that machine.
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# 240873: rpcbind segfaults on startup - ipv6 related
%patch5 -p1
# 248284: rpcbind ignores libwrap files
%patch6 -p1
# 358621: rpcbind-0.1.4-8.fc7 breaks NFS
%patch7 -p1
# 244492: New rpcbind breaks connectivity with some NIS clients
%patch8 -p1
#428496: rpcbind-0.1.4-12.fc8.x86_64.rpm does not update properly
%patch9 -p1
%build %build
%ifarch s390 s390x %ifarch s390 s390x
@ -136,6 +115,9 @@ fi
%dir %attr(700,rpc,rpc) /var/lib/rpcbind %dir %attr(700,rpc,rpc) /var/lib/rpcbind
%changelog %changelog
* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
- Updated to latest upstream release 0.1.5
* Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14 * Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
- Fixed a warning in pmap_svc.c - Fixed a warning in pmap_svc.c
- Cleaned up warmstarts so uid are longer needed, also - Cleaned up warmstarts so uid are longer needed, also

View File

@ -1 +1 @@
280539aa1f8975b1318690cd903f858a rpcbind-0.1.4.tar.bz2 adcf17feb72d942f38f91a9a90205a74 rpcbind-0.1.5.tar.bz2