rpms/nfs-utils/devel nfs-utils-1.0.7-037-svcgssd_closeall_lib.dif, NONE, 1.1 nfs-utils-1.0.7-040-idmapd_fix_error_reporting.dif, NONE, 1.1 nfs-utils-1.0.7-041-svcgssd_error_reporting.dif, NONE, 1.1 nfs-utils-1.0.7-042-spkm3_lucid_context.dif, NONE, 1.1 nfs-utils-1.0.7-043-svcgssd_continue_init.dif, NONE, 1.1 nfs-utils-1.0.7-044-gssd_continue_init.dif, NONE, 1.1 nfs-utils-1.0.7-045-gssd_clnt_create_error.dif, NONE, 1.1 nfs-utils-1.0.7-046-gssd_error_messages.dif, NONE, 1.1 nfs-utils-1.0.7-post5.patch, NONE, 1.1 nfs-utils-1.0.7-post6.patch, NONE, 1.1 nfs-utils-1.0.6-mountd.patch, 1.3, 1.4 nfs-utils-1.0.7-compile.patch, 1.6, 1.7 nfs-utils-1.0.7-nfsd-ctlbits.patch, 1.1, 1.2 nfs-utils.spec, 1.70, 1.71 nfs-utils-1.0.6-expwarn.patch, 1.1, NONE nfs-utils-1.0.6-fd-sig-cleanup.patch, 1.3, NONE nfs-utils-1.0.6-rquotad-overflow.patch, 1.1, NONE nfs-utils-1.0.6-statd-notify-hostname.patch, 1.2, NONE nfs-utils-1.0.7-idmap-reopen.patch, 1.1, NONE nfs-utils-1.0.7-sgi-statd-fixes.patch, 1.1, NONE nfs-utils-1.0.7-xlog-logi! nfo.patch,1.2,NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Oct 24 19:15:05 UTC 2005


Author: steved

Update of /cvs/dist/rpms/nfs-utils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1357

Modified Files:
	nfs-utils-1.0.6-mountd.patch nfs-utils-1.0.7-compile.patch 
	nfs-utils-1.0.7-nfsd-ctlbits.patch nfs-utils.spec 
Added Files:
	nfs-utils-1.0.7-037-svcgssd_closeall_lib.dif 
	nfs-utils-1.0.7-040-idmapd_fix_error_reporting.dif 
	nfs-utils-1.0.7-041-svcgssd_error_reporting.dif 
	nfs-utils-1.0.7-042-spkm3_lucid_context.dif 
	nfs-utils-1.0.7-043-svcgssd_continue_init.dif 
	nfs-utils-1.0.7-044-gssd_continue_init.dif 
	nfs-utils-1.0.7-045-gssd_clnt_create_error.dif 
	nfs-utils-1.0.7-046-gssd_error_messages.dif 
	nfs-utils-1.0.7-post5.patch nfs-utils-1.0.7-post6.patch 
Removed Files:
	nfs-utils-1.0.6-expwarn.patch 
	nfs-utils-1.0.6-fd-sig-cleanup.patch 
	nfs-utils-1.0.6-rquotad-overflow.patch 
	nfs-utils-1.0.6-statd-notify-hostname.patch 
	nfs-utils-1.0.7-idmap-reopen.patch 
	nfs-utils-1.0.7-sgi-statd-fixes.patch 
	nfs-utils-1.0.7-xlog-loginfo.patch 
Log Message:
- Updated to latest code in SourceForge CVS
- Updated to latest CITI patches (1.0.7-4)
- Fix bug in nfsdreopen by compiling in server defaults



--- NEW FILE nfs-utils-1.0.7-037-svcgssd_closeall_lib.dif ---

From: Kevin Coffman <kwc at citi.umich.edu>

svcgssd needs -lnfs when using new function closeall().


---

 nfs-utils-1.0.7-kwc/utils/svcgssd/Makefile  |    3 ++-
 nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -puN utils/svcgssd/Makefile~svcgssd_closeall_lib utils/svcgssd/Makefile
--- nfs-utils-1.0.7/utils/svcgssd/Makefile~svcgssd_closeall_lib	2005-10-17 09:26:12.059418000 -0400
+++ nfs-utils-1.0.7-kwc/utils/svcgssd/Makefile	2005-10-17 09:26:12.078418000 -0400
@@ -7,7 +7,8 @@ PROGRAM	= svcgssd
 PREFIX	= rpc.
 OBJS	= svcgssd.o svcgssd_main_loop.o svcgssd_proc.o err_util.o gss_util.o \
 	  gss_oids.o context.o context_heimdal.o cacheio.o svcgssd_mech2file.o
-LIBS	= -Wl,-rpath=$(KRBDIR)/lib -lrpcsecgss -lgssapi -ldl $(KRBLIB) -lnfsidmap
+LIBS	= -lnfs -lrpcsecgss -lgssapi -lnfsidmap -ldl \
+	  -Wl,-rpath=$(KRBDIR)/lib $(KRBLIB)
 MAN8	= svcgssd
 
 LINKED	= err_util.c gss_util.c gss_oids.c context.c context_heimdal.c
diff -puN utils/svcgssd/svcgssd.c~svcgssd_closeall_lib utils/svcgssd/svcgssd.c
--- nfs-utils-1.0.7/utils/svcgssd/svcgssd.c~svcgssd_closeall_lib	2005-10-17 09:39:38.233727000 -0400
+++ nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd.c	2005-10-17 09:40:50.397318000 -0400
@@ -54,6 +54,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <signal.h>
+#include "nfslib.h"
 #include "svcgssd.h"
 #include "gss_util.h"
 #include "err_util.h"
@@ -69,7 +70,7 @@ int pipefds[2] = { -1, -1};
 static void
 mydaemon(int nochdir, int noclose)
 {
-	int pid, status, tempfd, fdmax, filedes;
+	int pid, status, tempfd;
 
 	if (pipe(pipefds) < 0) {
 		printerr(1, "mydaemon: pipe() failed: errno %d (%s)\n",

_


--- NEW FILE nfs-utils-1.0.7-040-idmapd_fix_error_reporting.dif ---

From: Kevin Coffman <kwc at citi.umich.edu>

After call to mydaemon(), calls to err[x] and warn[x] result
in the message going nowhere.  Change to using idmapd_*
versions of these routines which write to syslog.
Original problem reported by Vincent Roqueta <vincent.roqueta at ext.bull.net>
with a different patch.


---

 nfs-utils-1.0.7-kwc/utils/idmapd/idmapd.c |  155 ++++++++++++++++++++++--------
 1 files changed, 117 insertions(+), 38 deletions(-)

diff -puN utils/idmapd/idmapd.c~idmapd_fix_error_reporting utils/idmapd/idmapd.c
--- nfs-utils-1.0.7/utils/idmapd/idmapd.c~idmapd_fix_error_reporting	2005-10-17 09:41:17.747168000 -0400
+++ nfs-utils-1.0.7-kwc/utils/idmapd/idmapd.c	2005-10-17 09:41:17.770168000 -0400
@@ -54,6 +54,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdarg.h>
+#include <syslog.h>
 #include <pwd.h>
 #include <grp.h>
 #include <limits.h>
@@ -169,6 +171,71 @@ flush_nfsd_idmap_cache(void)
 	return ret;
 }
 
+static void
+msg_format(char *rtnbuff, int rtnbuffsize, int errval,
+	   const char *fmt, va_list args)
+{
+	char buff[1024];
+	int n;
+
+	vsnprintf(buff, sizeof(buff), fmt, args);
+
+	if ((n = strlen(buff)) > 0 && buff[n-1] == '\n')
+		buff[--n] = '\0';
+
+	snprintf(rtnbuff, rtnbuffsize, "%s: %s", buff, strerror(errval));
+}
+
+static void
+idmapd_warn(const char *fmt, ...)
+{
+	int errval = errno;	/* save this! */
+	char buff[1024];
+	va_list args;
+
+	va_start(args, fmt);
+	msg_format(buff, sizeof(buff), errval, fmt, args);
+	va_end(args);
+
+	syslog(LOG_WARNING, "%s", buff);
+}
+
+static void
+idmapd_warnx(const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	vsyslog(LOG_WARNING, fmt, args);
+	va_end(args);
+}
+
+static void
+idmapd_err(int eval, const char *fmt, ...)
+{
+	int errval = errno;	/* save this! */
+	char buff[1024];
+	va_list args;
+
+	va_start(args, fmt);
+	msg_format(buff, sizeof(buff), errval, fmt, args);
+	va_end(args);
+
+	syslog(LOG_ERR, "%s", buff);
+	exit(eval);
+}
+
+static void
+idmapd_errx(int eval, const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	vsyslog(LOG_ERR, fmt, args);
+	va_end(args);
+	exit(eval);
+}
+
 int
 main(int argc, char **argv)
 {
@@ -182,12 +249,19 @@ main(int argc, char **argv)
 	char *xpipefsdir = NULL;
 	int serverstart = 1, clientstart = 1;
 	int ret;
+	char *progname;
 
 	conf_path = _PATH_IDMAPDCONF;
 	nobodyuser = NFS4NOBODY_USER;
 	nobodygroup = NFS4NOBODY_GROUP;
 	strlcpy(pipefsdir, PIPEFS_DIR, sizeof(pipefsdir));
 
+	if ((progname = strrchr(argv[0], '/')))
+		progname++;
+	else
+		progname = argv[0];
+	openlog(progname, LOG_PID, LOG_DAEMON);
+
 #define GETOPTSTR "vfd:p:U:G:c:CS"
 	opterr=0; /* Turn off error messages */
 	while ((opt = getopt(argc, argv, GETOPTSTR)) != -1) {
@@ -264,7 +338,8 @@ main(int argc, char **argv)
 		if (nfsdret == 0) {
 			ret = flush_nfsd_idmap_cache();
 			if (ret)
-				errx(1, "Failed to flush nfsd idmap cache\n");
+				idmapd_errx(1,
+					"Failed to flush nfsd idmap cache\n");
 		}
 	}
 
@@ -275,13 +350,14 @@ main(int argc, char **argv)
 		};
 
 		if ((fd = open(pipefsdir, O_RDONLY)) == -1)
-			err(1, "open(%s)", pipefsdir);
+			idmapd_err(1, "main: open(%s)", pipefsdir);
 
 		if (fcntl(fd, F_SETSIG, SIGUSR1) == -1)
-			err(1, "fcntl(%s)", pipefsdir);
+			idmapd_err(1, "main: fcntl(%s)", pipefsdir);
+
 		if (fcntl(fd, F_NOTIFY,
 			DN_CREATE | DN_DELETE | DN_MODIFY | DN_MULTISHOT) == -1)
-			err(1, "fcntl(%s)", pipefsdir);
+			idmapd_err(1, "main: fcntl(%s)", pipefsdir);
 
 		TAILQ_INIT(&icq);
 
@@ -301,12 +377,13 @@ main(int argc, char **argv)
 	}
 
 	if (nfsdret != 0 && fd == 0)
-		errx(1, "Neither NFS client nor NFSd found");
+		idmapd_errx(1, "Neither NFS client nor NFSd found");
 
 	release_parent();
 
 	if (event_dispatch() < 0)
-		errx(1, "event_dispatch: returns errno %d (%s)", errno, strerror(errno));
+		idmapd_errx(1, "event_dispatch: returns errno %d (%s)",
+			    errno, strerror(errno));
 	/* NOTREACHED */
 	return 1;
 }
@@ -322,7 +399,7 @@ dirscancb(int fd, short which, void *dat
 
 	nent = scandir(pipefsdir, &ents, NULL, alphasort);
 	if (nent == -1) {
-		warn("scandir(%s)", pipefsdir);
+		idmapd_warn("scandir(%s)", pipefsdir);
 		return;
 	}
 
@@ -344,7 +421,7 @@ dirscancb(int fd, short which, void *dat
 			    pipefsdir, ents[i]->d_name);
 
 			if ((ic->ic_dirfd = open(path, O_RDONLY, 0)) == -1) {
-				warn("open(%s)", path);
+				idmapd_warn("open(%s)", path);
 				free(ic);
 				return;
 			}
@@ -353,7 +430,7 @@ dirscancb(int fd, short which, void *dat
 			strlcpy(ic->ic_path, path, sizeof(ic->ic_path));
 
 			if (verbose > 0)
-				warnx("New client: %s", ic->ic_clid);
+				idmapd_warnx("New client: %s", ic->ic_clid);
 
 			if (nfsopen(ic) == -1) {
 				close(ic->ic_dirfd);
@@ -377,8 +454,8 @@ dirscancb(int fd, short which, void *dat
 			close(ic->ic_dirfd);
 			TAILQ_REMOVE(icq, ic, ic_next);
 			if (verbose > 0) {
-				warnx("Stale client: %s", ic->ic_clid);
-				warnx("\t-> closed %s", ic->ic_path);
+				idmapd_warnx("Stale client: %s", ic->ic_clid);
+				idmapd_warnx("\t-> closed %s", ic->ic_path);
 			}
 			free(ic);
 		} else
@@ -421,8 +498,8 @@ nfsdcb(int fd, short which, void *data)
 		goto out;
 
 	if ((len = read(ic->ic_fd, buf, sizeof(buf))) == -1) {
-		warnx("nfsdcb: read(%s) failed: errno %d (%s)",
-			ic->ic_path, errno, strerror(errno));
+		idmapd_warnx("nfsdcb: read(%s) failed: errno %d (%s)",
+			     ic->ic_path, errno, strerror(errno));
 		goto out;
 	}
 
@@ -434,15 +511,16 @@ nfsdcb(int fd, short which, void *data)
 
 	/* Authentication name -- ignored for now*/
 	if (getfield(&bp, authbuf, sizeof(authbuf)) == -1) {
-		warnx("nfsdcb: bad authentication name in upcall\n");
+		idmapd_warnx("nfsdcb: bad authentication name in upcall\n");
 		return;
 	}
 	if (getfield(&bp, typebuf, sizeof(typebuf)) == -1) {
-		warnx("nfsdcb: bad type in upcall\n");
+		idmapd_warnx("nfsdcb: bad type in upcall\n");
 		return;
 	}
 	if (verbose > 0)
-		warnx("nfsdcb: authbuf=%s authtype=%s", authbuf, typebuf);
+		idmapd_warnx("nfsdcb: authbuf=%s authtype=%s",
+			     authbuf, typebuf);
 
 	im.im_type = strcmp(typebuf, "user") == 0 ?
 		IDMAP_TYPE_USER : IDMAP_TYPE_GROUP;
@@ -451,25 +529,25 @@ nfsdcb(int fd, short which, void *data)
 	case IC_NAMEID:
 		im.im_conv = IDMAP_CONV_NAMETOID;
 		if (getfield(&bp, im.im_name, sizeof(im.im_name)) == -1) {
-			warnx("nfsdcb: bad name in upcall\n");
+			idmapd_warnx("nfsdcb: bad name in upcall\n");
 			return;
 		}
 		break;
 	case IC_IDNAME:
 		im.im_conv = IDMAP_CONV_IDTONAME;
 		if (getfield(&bp, buf1, sizeof(buf1)) == -1) {
-			warnx("nfsdcb: bad id in upcall\n");
+			idmapd_warnx("nfsdcb: bad id in upcall\n");
 			return;
 		}
 		if ((im.im_id = strtoul(buf1, (char **)NULL, 10)) == ULONG_MAX &&
 		    errno == ERANGE) {
-			warnx("nfsdcb: id '%s' too big!\n", buf1);
+			idmapd_warnx("nfsdcb: id '%s' too big!\n", buf1);
 			return;
 		}
 
 		break;
 	default:
-		warnx("Unknown which type %d", ic->ic_which);
+		idmapd_warnx("Unknown which type %d", ic->ic_which);
 		return;
 	}
 
@@ -519,15 +597,15 @@ nfsdcb(int fd, short which, void *data)
 
 		break;
 	default:
-		warnx("Unknown which type %d", ic->ic_which);
+		idmapd_warnx("Unknown which type %d", ic->ic_which);
 		return;
 	}
 
 	bsiz = sizeof(buf) - bsiz;
 
 	if (atomicio(write, ic->ic_fd, buf, bsiz) != bsiz)
-		warnx("nfsdcb: write(%s) failed: errno %d (%s)",
-			ic->ic_path, errno, strerror(errno));
+		idmapd_warnx("nfsdcb: write(%s) failed: errno %d (%s)",
+			     ic->ic_path, errno, strerror(errno));
 
 out:
 	event_add(&ic->ic_event, NULL);
@@ -540,7 +618,7 @@ imconv(struct idmap_client *ic, struct i
 	case IDMAP_CONV_IDTONAME:
 		idtonameres(im);
 		if (verbose > 1)
-			warnx("%s %s: (%s) id \"%d\" -> name \"%s\"",
+			idmapd_warnx("%s %s: (%s) id \"%d\" -> name \"%s\"",
 			    ic->ic_id, ic->ic_clid,
 			    im->im_type == IDMAP_TYPE_USER ? "user" : "group",
 			    im->im_id, im->im_name);
@@ -552,13 +630,14 @@ imconv(struct idmap_client *ic, struct i
 		}
 		nametoidres(im);
 		if (verbose > 1)
-			warnx("%s %s: (%s) name \"%s\" -> id \"%d\"",
+			idmapd_warnx("%s %s: (%s) name \"%s\" -> id \"%d\"",
 			    ic->ic_id, ic->ic_clid,
 			    im->im_type == IDMAP_TYPE_USER ? "user" : "group",
 			    im->im_name, im->im_id);
 		break;
 	default:
-		warnx("Invalid conversion type (%d) in message", im->im_conv);
+		idmapd_warnx("Invalid conversion type (%d) in message",
+			     im->im_conv);
 		im->im_status |= IDMAP_STATUS_INVALIDMSG;
 		break;
 	}
@@ -575,7 +654,7 @@ nfscb(int fd, short which, void *data)
 
 	if (atomicio(read, ic->ic_fd, &im, sizeof(im)) != sizeof(im)) {
 		if (verbose > 0)
-			warn("read(%s)", ic->ic_path);
+			idmapd_warn("read(%s)", ic->ic_path);
 		if (errno == EPIPE)
 			return;
 		goto out;
@@ -584,7 +663,7 @@ nfscb(int fd, short which, void *data)
 	imconv(ic, &im);
 
 	if (atomicio(write, ic->ic_fd, &im, sizeof(im)) != sizeof(im))
-		warn("write(%s)", ic->ic_path);
+		idmapd_warn("write(%s)", ic->ic_path);
 out:
 	event_add(&ic->ic_event, NULL);
 }
@@ -595,7 +674,7 @@ nfsdreopen_one(struct idmap_client *ic)
 	int fd;
 
 	if (verbose > 0)
-		warnx("ReOpening %s", ic->ic_path);
+		idmapd_warnx("ReOpening %s", ic->ic_path);
 	if ((fd = open(ic->ic_path, O_RDWR, 0)) != -1) {
 		if (ic->ic_fd != -1)
 			close(ic->ic_fd);
@@ -605,7 +684,7 @@ nfsdreopen_one(struct idmap_client *ic)
 			event_add(&ic->ic_event, NULL);
 		}
 	} else {
-		warnx("nfsdreopen: Opening '%s' failed: errno %d (%s)",
+		idmapd_warnx("nfsdreopen: Opening '%s' failed: errno %d (%s)",
 			ic->ic_path, errno, strerror(errno));
 	}
 }
@@ -642,7 +721,7 @@ nfsdopenone(struct idmap_client *ic, sho
 
 	if ((ic->ic_fd = open(ic->ic_path, O_RDWR, 0)) == -1) {
 		if (verbose > 0)
-			warnx("Opening %s failed: errno %d (%s)",
+			idmapd_warnx("Opening %s failed: errno %d (%s)",
 				ic->ic_path, errno, strerror(errno));
 		return (-1);
 	}
@@ -651,7 +730,7 @@ nfsdopenone(struct idmap_client *ic, sho
 	event_add(&ic->ic_event, NULL);
 
 	if (verbose > 0)
-		warnx("Opened %s", ic->ic_path);
+		idmapd_warnx("Opened %s", ic->ic_path);
 
 	return (0);
 }
@@ -667,7 +746,7 @@ nfsopen(struct idmap_client *ic)
 			    DN_CREATE | DN_DELETE | DN_MULTISHOT);
 			break;
 		default:
-			warn("open(%s)", ic->ic_path);
+			idmapd_warn("open(%s)", ic->ic_path);
 			return (-1);
 		}
 	} else {
@@ -676,7 +755,7 @@ nfsopen(struct idmap_client *ic)
 		fcntl(ic->ic_dirfd, F_SETSIG, 0);
 		fcntl(ic->ic_dirfd, F_NOTIFY, 0);
 		if (verbose > 0)
-			warnx("Opened %s", ic->ic_path);
+			idmapd_warnx("Opened %s", ic->ic_path);
 	}
 
 	return (0);
@@ -851,10 +930,10 @@ mydaemon(int nochdir, int noclose)
 	int pid, status, tempfd;
 
 	if (pipe(pipefds) < 0)
-		err(1, "mydaemon: pipe() failed: errno %d (%s)\n", errno, strerror(errno));
+		err(1, "mydaemon: pipe() failed: errno %d", errno);
 
 	if ((pid = fork ()) < 0)
-		err(1, "mydaemon: fork() failed: errno %d (%s)\n", errno, strerror(errno));
+		err(1, "mydaemon: fork() failed: errno %d", errno);
 
 	if (pid != 0) {
 		/*
@@ -870,13 +949,13 @@ mydaemon(int nochdir, int noclose)
 	setsid ();
 	if (nochdir == 0) {
 		if (chdir ("/") == -1)
-			err(1, "mydaemon: chdir() failed: errno %d (%s)\n", errno, strerror(errno));
+			err(1, "mydaemon: chdir() failed: errno %d", errno);
 	}
 
 	while (pipefds[1] <= 2) {
 		pipefds[1] = dup(pipefds[1]);
 		if (pipefds[1] < 0)
-			err(1, "mydaemon: dup() failed: errno %d (%s)\n", errno, strerror(errno));
+			err(1, "mydaemon: dup() failed: errno %d", errno);
 	}
 
 	if (noclose == 0) {

_


--- NEW FILE nfs-utils-1.0.7-041-svcgssd_error_reporting.dif ---

>From Kevin Coffman <kwc at citi.umich.edu>

Initialize mech to null to avoid segfault if an error occurs
and mech is never returned from gss_accept_sec_context.


---

 nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_proc.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN utils/svcgssd/svcgssd_proc.c~svcgssd_error_reporting utils/svcgssd/svcgssd_proc.c
--- nfs-utils-1.0.7/utils/svcgssd/svcgssd_proc.c~svcgssd_error_reporting	2005-10-17 09:41:19.310268000 -0400
+++ nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_proc.c	2005-10-17 11:15:18.654125000 -0400
@@ -275,7 +275,7 @@ handle_nullreq(FILE *f) {
 	u_int32_t		ret_flags;
 	gss_ctx_id_t		ctx = GSS_C_NO_CONTEXT;
 	gss_name_t		client_name;
-	gss_OID			mech;
+	gss_OID			mech = GSS_C_NO_OID;
 	u_int32_t		maj_stat = GSS_S_FAILURE, min_stat = 0;
 	struct svc_cred		cred;
 	static char		*lbuf = NULL;

_


--- NEW FILE nfs-utils-1.0.7-042-spkm3_lucid_context.dif ---

From: Kevin Coffman <kwc at citi.umich.edu>

Update gssd and svcgssd to use the new gss mech glue lucid context calls.

Signed-off-by: Andy Adamson <andros at citi.umich.edu>


---

 nfs-utils-1.0.7-kwc/utils/gssd/context.c  |  182 ++++++++++++++++--------------
 nfs-utils-1.0.7-kwc/utils/gssd/gss_util.h |    6 
 2 files changed, 106 insertions(+), 82 deletions(-)

diff -puN utils/gssd/context.c~spkm3_lucid_context utils/gssd/context.c
--- nfs-utils-1.0.7/utils/gssd/context.c~spkm3_lucid_context	2005-10-17 09:41:20.718818000 -0400
+++ nfs-utils-1.0.7-kwc/utils/gssd/context.c	2005-10-17 09:41:20.749818000 -0400
@@ -42,6 +42,24 @@
 #include "err_util.h"
 #include "context.h"
 
+/* this stuff is in spkm/spkm3_lucid.h */
+typedef struct gss_spkm3_lucid_key_t {
+        int version;                    /* version = 1 */
+        gss_buffer_desc ctx_id;
+        int qop;
+        gss_buffer_desc mech_used;
+        OM_uint32 ret_flags;
+        OM_uint32 req_flags;
+        gss_buffer_desc share_key;
+        gss_buffer_desc derived_conf_key;
+        gss_buffer_desc derived_integ_key;
+        /* openssl NID's of the negotiated algorithms */
+        int keyestb_alg;
+        int owf_alg;
+        int intg_alg;
+        int conf_alg;
+} gss_spkm3_lucid_key_t;
+
 /* spkm3 seems to actually want it this big, yipes. */
 #define MAX_CTX_LEN 4096
 
@@ -133,49 +151,6 @@ typedef struct _krb5_gss_ctx_id_rec {
 #endif /* KRB5_VERSION */
 #endif /* HAVE_KRB5 */
 
-/* XXX We have the same issue as above.  We can require SPKM-3 source
- * at the time we compile gssd, or copy the context structure definitions
- * here.
- */
-
-/* structure typedefs */
-
-typedef struct spkm3_ctx_id_t {
-    int length;
-    unsigned char *data;
-} spkm3_ctx_id,
- *spkm3_ctx_id_t;
-
-/* first pass at spkm3 context. will add a bunch of stuff .... */
-
-typedef struct spkm3_gss_ctx_id_desc_t {
-    spkm3_ctx_id ctx_id;        /* per spkm token contextid */
-    int established;
-    int qop;                    /* negotiated qop */
-    gss_OID mech_used;
-    OM_uint32 ret_flags;
-    OM_uint32 req_flags;
-    /* DH should be abstracted to an EVP_ struct able to hold
-     * various kalg results */
-    /* XXX The following is defined as "DH *dh" in the original
-     * header we're gonna cheat and use "void *dh" here. */
-    void *dh;
-    gss_buffer_desc share_key;
-    /* derived keys are result from applying the owf_alg to the
-     * shared key - see spkm3_derive_supkey */
-    gss_buffer_desc derived_conf_key;
-    gss_buffer_desc derived_integ_key;
-    /* openssl NID's of the negotiated algorithms */
-    int keyestb_alg;            /* key establishment */
-    int owf_alg;                /* one way function */
-    int intg_alg;               /* integrity */
-    int conf_alg;               /* privacy */
-    /* der encoded REQ_TOKEN reqcontets and length */
-    unsigned char *der_reqcontents;
-    int der_req_len;
-} spkm3_gss_ctx_id_desc;
-
-
 /* adapted from mit kerberos 5 ../lib/gssapi/mechglue/mglueP.h
  * this is what gets passed around when the mechglue code is enabled : */
 typedef struct gss_union_ctx_id_t {
@@ -292,6 +267,7 @@ prepare_krb5_rfc_cfx_buffer(gss_krb5_luc
 	return -1;
 }
 
+
 static int
 serialize_krb5_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf)
 {
@@ -303,7 +279,7 @@ serialize_krb5_ctx(gss_ctx_id_t ctx, gss
 
 	printerr(2, "DEBUG: serialize_krb5_ctx: lucid version!\n");
 	maj_stat = gss_krb5_export_lucid_sec_context(&min_stat, &ctx,
-						     1, &return_ctx);
+							1, &return_ctx);
 	if (maj_stat != GSS_S_COMPLETE)
 		goto out_err;
 
@@ -392,61 +368,103 @@ out_err:
 #endif /* HAVE_KRB5 */
 
 
-/* ANDROS: need to determine which fields of the spkm3_gss_ctx_id_desc_t
- * are needed in the kernel for get_mic, validate, wrap, unwrap, and destroy
- * and only export those fields to the kernel.
- */
+/*
+ * Function: prepare_spkm3_ctx_buffer()
+ *
+ * Prepare spkm3 lucid context for the kernel
+ *
+ *	buf->length should be:
+ *
+ *	ctx_id 4 + 12
+ *	qop 4
+ *	mech_used 4 + 7
+ *	ret_fl  4
+ *	req_fl  4
+ *	share   4 + 16
+ *	conf_alg 4
+ *	d_conf_key 4 + 0
+ *	intg_alg 4
+ *	d_intg_key 4 + 0
+ *	kyestb 4
+ *	owl alg 4
+*/
 static int
-serialize_spkm3_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf)
+prepare_spkm3_ctx_buffer(gss_spkm3_lucid_key_t *key, gss_buffer_desc *buf)
 {
-	spkm3_gss_ctx_id_desc      *sctx = (spkm3_gss_ctx_id_desc *)ctx;
-	char *p, *end;
-
-	printerr(1, "serialize_spkm3_ctx called\n");
+        char *p, *end;
 
 	if (!(buf->value = calloc(1, MAX_CTX_LEN)))
 		goto out_err;
 	p = buf->value;
 	end = buf->value + MAX_CTX_LEN;
-/* buf->length
-ctx_id 4 + 12
-qop 4
-mech_used 4 + 7
-ret_fl  4
-req_fl  4
-share   4 + 16
-conf_alg 4
-d_conf_key 4 + 0
-intg_alg 4
-d_intg_key 4 + 0
-kyestb 4
-owl alg 4
-*/
-	if (write_buffer(&p, end, (gss_buffer_desc *)&sctx->ctx_id))
+
+	if (write_buffer(&p, end, &key->ctx_id))
 		goto out_err;
-	if (WRITE_BYTES(&p, end, sctx->qop)) goto out_err;
-	if (write_buffer(&p, end, (gss_buffer_desc *)sctx->mech_used)) goto out_err;
-	if (WRITE_BYTES(&p, end, sctx->ret_flags)) goto out_err;
-	if (WRITE_BYTES(&p, end, sctx->req_flags)) goto out_err;
-	if (write_buffer(&p, end, &sctx->share_key))
+	if (WRITE_BYTES(&p, end, key->qop)) goto out_err;
+	if (write_buffer(&p, end, &key->mech_used)) goto out_err;
+	if (WRITE_BYTES(&p, end, key->ret_flags)) goto out_err;
+	if (WRITE_BYTES(&p, end, key->req_flags)) goto out_err;
+	if (write_buffer(&p, end, &key->share_key))
 		goto out_err;
 
-	if (WRITE_BYTES(&p, end, sctx->conf_alg)) goto out_err;
-	if (write_buffer(&p, end, &sctx->derived_conf_key))
+	if (WRITE_BYTES(&p, end, key->conf_alg)) goto out_err;
+	if (write_buffer(&p, end, &key->derived_conf_key))
 		goto out_err;
 
-	if (WRITE_BYTES(&p, end, sctx->intg_alg)) goto out_err;
-	if (write_buffer(&p, end, &sctx->derived_integ_key))
+	if (WRITE_BYTES(&p, end, key->intg_alg)) goto out_err;
+	if (write_buffer(&p, end, &key->derived_integ_key))
 		goto out_err;
 
-	if (WRITE_BYTES(&p, end, sctx->keyestb_alg)) goto out_err;
-	if (WRITE_BYTES(&p, end, sctx->owf_alg)) goto out_err;
+	if (WRITE_BYTES(&p, end, key->keyestb_alg)) goto out_err;
+	if (WRITE_BYTES(&p, end, key->owf_alg)) goto out_err;
 
 	buf->length = p - (char *)buf->value;
 	return 0;
 out_err:
-	if (buf->value) free(buf->value);
-	buf->length = 0;
+        printerr(0, "ERROR: failed serializing spkm3 context for kernel\n");
+        if (buf->value) free(buf->value);
+        buf->length = 0;
+
+	return -1;
+}
+
+/* ANDROS: need to determine which fields of the spkm3_gss_ctx_id_desc_t
+ * are needed in the kernel for get_mic, validate, wrap, unwrap, and destroy
+ * and only export those fields to the kernel.
+ */
+static int
+serialize_spkm3_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf)
+{
+	OM_uint32 vers, ret, maj_stat, min_stat;
+	void *ret_ctx = 0;
+	gss_spkm3_lucid_key_t     *key;
+
+	printerr(1, "serialize_spkm3_ctx called\n");
+
+        printerr(2, "DEBUG: serialize_spkm3_ctx: lucid version!\n");
+        maj_stat = gss_export_lucid_sec_context(&min_stat, ctx, 1, &ret_ctx);
+        if (maj_stat != GSS_S_COMPLETE)
+                goto out_err;
+
+	key = (gss_spkm3_lucid_key_t *)ret_ctx;
+
+	vers = key->version;
+	if (vers != 1) {
+		printerr(0, "ERROR: unsupported spkm3 context version %d\n",
+			vers);
+		goto out_err;
+	}
+	ret = prepare_spkm3_ctx_buffer(key, buf);
+
+        maj_stat = gss_free_lucid_sec_context(&min_stat, ctx, ret_ctx);
+
+        if (maj_stat != GSS_S_COMPLETE)
+                printerr(0, "WARN: failed to free lucid sec context\n");
+        if (ret)
+                goto out_err;
+	return 0;
+
+out_err:
 	return -1;
 }
 
@@ -458,7 +476,7 @@ serialize_context_for_kernel(gss_ctx_id_
 	if (g_OID_equal(&krb5oid, uctx->mech_type))
 		return serialize_krb5_ctx(uctx->internal_ctx_id, buf);
 	else if (g_OID_equal(&spkm3oid, uctx->mech_type))
-		return serialize_spkm3_ctx(uctx->internal_ctx_id, buf);
+		return serialize_spkm3_ctx(uctx, buf);
 	else {
 		printerr(0, "ERROR: attempting to serialize context with "
 				"unknown mechanism oid\n");
diff -puN utils/gssd/gss_util.h~spkm3_lucid_context utils/gssd/gss_util.h
--- nfs-utils-1.0.7/utils/gssd/gss_util.h~spkm3_lucid_context	2005-10-17 09:41:20.729818000 -0400
+++ nfs-utils-1.0.7-kwc/utils/gssd/gss_util.h	2005-10-17 09:41:20.765818000 -0400
@@ -41,4 +41,10 @@ int gssd_acquire_cred(char *server_name)
 void pgsserr(char *msg, u_int32_t maj_stat, u_int32_t min_stat,
 	const gss_OID mech);
 
+u_int32_t gss_export_lucid_sec_context (u_int32_t *minor_status, void *ctx,
+	u_int32_t version, void *internal_buffer);
+
+u_int32_t gss_free_lucid_sec_context (u_int32_t *minor_status, void *ctx,
+	void *internal_buffer);
+
 #endif /* _GSS_UTIL_H_ */

_


--- NEW FILE nfs-utils-1.0.7-043-svcgssd_continue_init.dif ---

From: Kevin Coffman <kwc at citi.umich.edu>

Add CONTINUE_INIT handling to svcgssd. Store the partially complete spkm
context handle in the out_handle of CONTINUE_INIT messages so that it is
returned in the in_handle of subsequent messages.

Signed-off-by: Andy Adamson <andros at citi.umich.edu>
Signed-off-by: Kevin Coffman <kwc at citi.umich.edu>


---

 nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_proc.c |   49 ++++++++++++++++-------
 1 files changed, 36 insertions(+), 13 deletions(-)

diff -puN utils/svcgssd/svcgssd_proc.c~svcgssd_continue_init utils/svcgssd/svcgssd_proc.c
--- nfs-utils-1.0.7/utils/svcgssd/svcgssd_proc.c~svcgssd_continue_init	2005-10-17 09:41:22.676918000 -0400
+++ nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_proc.c	2005-10-17 09:41:22.697918000 -0400
@@ -56,6 +56,8 @@ extern char * mech2file(gss_OID mech);
 #define SVCGSSD_CONTEXT_CHANNEL "/proc/net/rpc/auth.rpcsec.context/channel"
 #define SVCGSSD_INIT_CHANNEL    "/proc/net/rpc/auth.rpcsec.init/channel"
 
+#define TOKEN_BUF_SIZE		8192
+
 struct svc_cred {
 	uid_t	cr_uid;
 	gid_t	cr_gid;
@@ -111,7 +113,7 @@ send_response(FILE *f, gss_buffer_desc *
 	      u_int32_t maj_stat, u_int32_t min_stat,
 	      gss_buffer_desc *out_handle, gss_buffer_desc *out_token)
 {
-	char buf[2 * 4096];
+	char buf[2 * TOKEN_BUF_SIZE];
 	char *bp = buf;
 	int blen = sizeof(buf);
 	/* XXXARG: */
@@ -262,7 +264,7 @@ handle_nullreq(FILE *f) {
 	/* XXX initialize to a random integer to reduce chances of unnecessary
 	 * invalidation of existing ctx's on restarting svcgssd. */
 	static u_int32_t	handle_seq = 0;
-	char			in_tok_buf[8192];
+	char			in_tok_buf[TOKEN_BUF_SIZE];
 	char			in_handle_buf[15];
 	char			out_handle_buf[15];
 	gss_buffer_desc		in_tok = {.value = in_tok_buf},
@@ -296,9 +298,6 @@ handle_nullreq(FILE *f) {
 					      sizeof(in_handle_buf));
 	printerr(2, "in_handle: \n");
 	print_hexl(2, in_handle.value, in_handle.length);
-	handle_seq++;
-	out_handle.length = sizeof(handle_seq);
-	memcpy(out_handle.value, &handle_seq, sizeof(handle_seq));
 
 	in_tok.length = (size_t) qword_get(&cp, in_tok.value,
 					   sizeof(in_tok_buf));
@@ -312,15 +311,30 @@ handle_nullreq(FILE *f) {
 	}
 
 	if (in_handle.length != 0) { /* CONTINUE_INIT case */
-		printerr(0, "WARNING: handle_nullreq: "
-			    "CONTINUE_INIT unsupported\n");
-		goto out_err;
+		if (in_handle.length != sizeof(ctx)) {
+			printerr(0, "WARNING: handle_nullreq: "
+				    "input handle has unexpected length %d\n",
+				    in_handle.length);
+			goto out_err;
+		}
+		/* in_handle is the context id stored in the out_handle
+		 * for the GSS_S_CONTINUE_NEEDED case below.  */
+		memcpy(&ctx, in_handle.value, in_handle.length);
 	}
 
 	maj_stat = gss_accept_sec_context(&min_stat, &ctx, gssd_creds,
 			&in_tok, GSS_C_NO_CHANNEL_BINDINGS, &client_name,
 			&mech, &out_tok, &ret_flags, NULL, NULL);
-	if (maj_stat != GSS_S_COMPLETE) {
+
+	if (maj_stat == GSS_S_CONTINUE_NEEDED) {
+		printerr(1, "gss_accept_sec_context GSS_S_CONTINUE_NEEDED\n");
+
+		/* Save the context handle for future calls */
+		out_handle.length = sizeof(ctx);
+		memcpy(out_handle.value, &ctx, sizeof(ctx));
+		goto continue_needed;
+	}
+	else if (maj_stat != GSS_S_COMPLETE) {
 		printerr(0, "WARNING: gss_accept_sec_context failed\n");
 		pgsserr("handle_nullreq: gss_accept_sec_context",
 			maj_stat, min_stat, mech);
@@ -332,6 +346,13 @@ handle_nullreq(FILE *f) {
 		goto out_err;
 	}
 
+
+	/* Context complete. Pass handle_seq in out_handle to use
+	 * for context lookup in the kernel. */
+	handle_seq++;
+	out_handle.length = sizeof(handle_seq);
+	memcpy(out_handle.value, &handle_seq, sizeof(handle_seq));
+
 	/* kernel needs ctx to calculate verifier on null response, so
 	 * must give it context before doing null call: */
 	if (serialize_context_for_kernel(ctx, &ctx_token)) {
@@ -341,15 +362,17 @@ handle_nullreq(FILE *f) {
 		goto out_err;
 	}
 	do_svc_downcall(&out_handle, &cred, mech, &ctx_token);
+continue_needed:
 	send_response(f, &in_handle, &in_tok, maj_stat, min_stat,
 			&out_handle, &out_tok);
-	goto out;
-out_err:
-	send_response(f, &in_handle, &in_tok, maj_stat, min_stat,
-			&null_token, &null_token);
 out:
 	if (ctx_token.value != NULL)
 		free(ctx_token.value);
 	printerr(1, "finished handling null request\n");
 	return;
+
+out_err:
+	send_response(f, &in_handle, &in_tok, maj_stat, min_stat,
+			&null_token, &null_token);
+	goto out;
 }

_


--- NEW FILE nfs-utils-1.0.7-044-gssd_continue_init.dif ---

From: Kevin Coffman <kwc at citi.umich.edu>

Switch the hard-coded GSS_C_ANON_FLAG with a hard-coded GSS_C_MUTUAL_FLAG.
NOTE: we need a way to pass the switch.

Signed-off-by: Andy Adamson <andros at citi.umich.edu>


---

 nfs-utils-1.0.7-kwc/utils/gssd/gssd_proc.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -puN utils/gssd/gssd_proc.c~gssd_continue_init utils/gssd/gssd_proc.c
--- nfs-utils-1.0.7/utils/gssd/gssd_proc.c~gssd_continue_init	2005-10-17 09:41:24.389018000 -0400
+++ nfs-utils-1.0.7-kwc/utils/gssd/gssd_proc.c	2005-10-17 11:15:15.746476000 -0400
@@ -435,7 +435,10 @@ int create_auth_rpc_client(struct clnt_i
 	}
 	else if (authtype == AUTHTYPE_SPKM3) {
 		sec.mech = (gss_OID)&spkm3oid;
-		sec.req_flags = GSS_C_ANON_FLAG;
+		/* XXX sec.req_flags = GSS_C_ANON_FLAG;
+		 * Need a way to switch....
+		 */
+		sec.req_flags = GSS_C_MUTUAL_FLAG;
 	}
 	else {
 		printerr(0, "ERROR: Invalid authentication type (%d) "
@@ -485,8 +488,9 @@ int create_auth_rpc_client(struct clnt_i
 	auth = authgss_create_default(rpc_clnt, clp->servicename, &sec);
 	if (!auth) {
 		/* Our caller should print appropriate message */
-		printerr(2, "WARNING: Failed to create krb5 context for "
+		printerr(2, "WARNING: Failed to create %s context for "
 			    "user with uid %d for server %s\n",
+			(authtype == AUTHTYPE_KRB5 ? "krb5":"spkm3"),
 			 uid, clp->servername);
 		goto out_fail;
 	}

_


--- NEW FILE nfs-utils-1.0.7-045-gssd_clnt_create_error.dif ---

From: Kevin Coffman <kwc at citi.umich.edu>

Print a better error message if rpc routine clnt_create() fails.


---

 nfs-utils-1.0.7-kwc/utils/gssd/gssd_proc.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -puN utils/gssd/gssd_proc.c~gssd_clnt_create_error utils/gssd/gssd_proc.c
--- nfs-utils-1.0.7/utils/gssd/gssd_proc.c~gssd_clnt_create_error	2005-10-17 09:41:26.346118000 -0400
+++ nfs-utils-1.0.7-kwc/utils/gssd/gssd_proc.c	2005-10-17 09:41:26.366118000 -0400
@@ -424,6 +424,7 @@ int create_auth_rpc_client(struct clnt_i
 	uid_t			save_uid = -1;
 	int			retval = -1;
 	OM_uint32		min_stat;
+	char			rpc_errmsg[1024];
 
 	sec.qop = GSS_C_QOP_DEFAULT;
 	sec.svc = RPCSEC_GSS_SVC_NONE;
@@ -478,9 +479,10 @@ int create_auth_rpc_client(struct clnt_i
 			clp->servername);
 	if ((rpc_clnt = clnt_create(clp->servername, clp->prog, clp->vers,
 					clp->protocol)) == NULL) {
-		printerr(0, "WARNING: can't create rpc_clnt for server "
-			    "%s for user with uid %d\n",
-			clp->servername, uid);
+		snprintf(rpc_errmsg, sizeof(rpc_errmsg),
+			 "WARNING: can't create rpc_clnt for server "
+			 "%s for user with uid %d", clp->servername, uid);
+		printerr(0, "%s\n", clnt_spcreateerror(rpc_errmsg));
 		goto out_fail;
 	}
 

_


--- NEW FILE nfs-utils-1.0.7-046-gssd_error_messages.dif ---

From: Kevin Coffman <kwc at citi.umich.edu>

Print gss error messages after calls to gss functions, even if they
are for Kerberos only.


---

 nfs-utils-1.0.7-kwc/utils/gssd/krb5_util.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff -puN utils/gssd/krb5_util.c~gssd_error_messages utils/gssd/krb5_util.c
--- nfs-utils-1.0.7/utils/gssd/krb5_util.c~gssd_error_messages	2005-10-17 09:41:27.912609000 -0400
+++ nfs-utils-1.0.7-kwc/utils/gssd/krb5_util.c	2005-10-17 10:42:35.103391000 -0400
@@ -288,18 +288,16 @@ limit_krb5_enctypes(struct rpc_gss_sec *
 				    &credh, NULL, NULL);
 
 	if (maj_stat != GSS_S_COMPLETE) {
-		printerr(0, "WARNING: error from gss_acquire_cred "
-			"for user with uid %d (%s)\n",
-			uid, error_message(min_stat));
+		pgsserr("gss_acquire_cred",
+			maj_stat, min_stat, &krb5oid);
 		return -1;
 	}
 
 	maj_stat = gss_set_allowable_enctypes(&min_stat, credh, &krb5oid,
 					     num_enctypes, &enctypes);
 	if (maj_stat != GSS_S_COMPLETE) {
-		printerr(0, "WARNING: error from gss_set_allowable_enctypes "
-			"for user with uid %d (%s)\n",
-			uid, error_message(min_stat));
+		pgsserr("gss_set_allowable_enctypes",
+			maj_stat, min_stat, &krb5oid);
 		return -1;
 	}
 	sec->cred = credh;

_

nfs-utils-1.0.7-post5.patch:
 ChangeLog                     |    5 +++++
 utils/rquotad/rquota_server.c |   15 ++++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)

--- NEW FILE nfs-utils-1.0.7-post5.patch ---
--- nfs-utils-1-0-7-post4/ChangeLog	2005-08-25 22:04:40.000000000 -0400
+++ nfs-utils-1-0-7-post5/ChangeLog	2005-10-06 00:24:06.000000000 -0400
@@ -1,3 +1,8 @@
+2005-09-02 Mike Frysinger <vapier at gentoo.org>
+	* utils/rquotad/rquota_server.c(getquotainfo): use explicit
+	struture-member copying rather than memcpy, as the element
+	sizes are the same on all architectures.
+
 2005-08-26 Kevin Coffman <kwc at citi.umich.edu>
 	Add option to set rpcsec_gss debugging level (if available)
 
--- nfs-utils-1-0-7-post4/utils/rquotad/rquota_server.c	2001-06-27 12:45:56.000000000 -0400
+++ nfs-utils-1-0-7-post5/utils/rquotad/rquota_server.c	2005-09-02 02:29:07.000000000 -0400
@@ -76,6 +76,7 @@ getquota_rslt *getquotainfo(int flags, c
    char *pathname, *qfpathname;
    int fd, err, id, type;
    struct stat stm, stn;
+   struct rquota *rquota;
 
    /*
     * First check authentication.
@@ -166,10 +167,18 @@ getquota_rslt *getquotainfo(int flags, c
          result.getquota_rslt_u.gqr_rquota.rq_active = (err == 0) ? TRUE : FALSE;
          /*
           * Make a copy of the info into the last part of the remote quota
-          * struct which is exactly the same.
+          * struct might not be exactly the same on all architectures...
           */
-         memcpy((caddr_t *)&result.getquota_rslt_u.gqr_rquota.rq_bhardlimit,
-                (caddr_t *)&dq_dqb, sizeof(struct dqblk));
+
+         rquota = &result.getquota_rslt_u.gqr_rquota;
+         rquota->rq_bhardlimit = dq_dqb.dqb_bhardlimit;
+         rquota->rq_bsoftlimit = dq_dqb.dqb_bsoftlimit;;
+         rquota->rq_curblocks = dq_dqb.dqb_curblocks;
+         rquota->rq_fhardlimit = dq_dqb.dqb_ihardlimit;
+         rquota->rq_fsoftlimit = dq_dqb.dqb_isoftlimit;
+         rquota->rq_curfiles = dq_dqb.dqb_curinodes;
+         rquota->rq_btimeleft = dq_dqb.dqb_btime;
+         rquota->rq_ftimeleft = dq_dqb.dqb_itime;
 
          return(&result);
       }

nfs-utils-1.0.7-post6.patch:
 ChangeLog                |   40 +++++++++++++++++++++++++++++++
 support/include/nfslib.h |    2 +
 support/nfs/Makefile     |    2 -
 support/nfs/closeall.c   |   31 ++++++++++++++++++++++++
 support/nfs/exports.c    |    2 -
 support/nfs/xlog.c       |    2 -
 utils/idmapd/Makefile    |    2 -
 utils/idmapd/idmapd.c    |   21 +++++++---------
 utils/mountd/mountd.c    |   35 +++++++++++++--------------
 utils/nfsd/nfsd.c        |    4 ---
 utils/statd/monitor.c    |    3 +-
 utils/statd/rmtcall.c    |   60 +++++++++++++++++++++++++++++++++++++++++++++--
 utils/statd/statd.c      |   20 ++++++++-------
 utils/statd/statd.h      |    1 
 utils/statd/svc_run.c    |    3 +-
 utils/svcgssd/svcgssd.c  |   11 +++-----
 16 files changed, 182 insertions(+), 57 deletions(-)

--- NEW FILE nfs-utils-1.0.7-post6.patch ---
--- nfs-utils-1.0.7/support/include/nfslib.h.post6	2004-09-14 21:58:40.000000000 -0400
+++ nfs-utils-1.0.7/support/include/nfslib.h	2005-10-23 17:08:39.000000000 -0400
@@ -137,6 +137,8 @@ int qword_get_int(char **bpp, int *anint
 void cache_flush(int force);
 int check_new_cache(void);
 
+void closeall(int min);
+
 /* lockd. */
 int			lockdsvc();
 
--- nfs-utils-1.0.7/support/nfs/Makefile.post6	2005-10-23 17:08:38.000000000 -0400
+++ nfs-utils-1.0.7/support/nfs/Makefile	2005-10-23 17:08:39.000000000 -0400
@@ -6,7 +6,7 @@ LIBNAME	= libnfs.a
 OBJS	= exports.o rmtab.o xio.o \
 	  rpcmisc.o rpcdispatch.o xlog.o xmalloc.o wildmat.o \
 	  nfssvc.o nfsclient.o nfsexport.o getfh.o nfsctl.o \
-	  lockdsvc.o svc_socket.o cacheio.o
+	  lockdsvc.o svc_socket.o cacheio.o closeall.o
 
 include $(TOP)rules.mk
 
--- /dev/null	2005-10-05 00:47:04.439457960 -0400
+++ nfs-utils-1.0.7/support/nfs/closeall.c	2005-10-23 17:08:39.000000000 -0400
@@ -0,0 +1,31 @@
+/*
+ * support/nfs/closeall.c
+ * Close all file descriptors greater than some limit,
+ * Use readdir "/proc/self/fd" to avoid excess close(2) calls.
+ */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <dirent.h>
+
+void
+closeall(int min)
+{
+	DIR *dir = opendir("/proc/self/fd");
+	if (dir != NULL) {
+		int dfd = dirfd(dir);
+		struct dirent *d;
+
+		while ((d = readdir(dir)) != NULL) {
+			char *endp;
+			long n = strtol(d->d_name, &endp, 10);
+			if (*endp != '\0' && n >= min && n != dfd)
+				(void) close(n);
+		}
+		closedir(dir);
+	} else {
+		int fd = sysconf(_SC_OPEN_MAX);
+		while (--fd >= min)
+			(void) close(fd);
+	}
+}
--- nfs-utils-1.0.7/support/nfs/exports.c.post6	2005-10-23 17:08:38.000000000 -0400
+++ nfs-utils-1.0.7/support/nfs/exports.c	2005-10-23 17:08:39.000000000 -0400
@@ -448,7 +448,7 @@ bad_option:
 	ep->e_nsqgids = nsqgids;
 
 out:
-	if (warn && !had_sync_opt)
+	if (warn && !had_sync_opt && !(ep->e_flags & NFSEXP_READONLY))
 		xlog(L_WARNING, "%s [%d]: No 'sync' or 'async' option specified for export \"%s:%s\".\n"
 				"  Assuming default behaviour ('sync').\n"
 		     		"  NOTE: this default has changed from previous versions\n",
--- nfs-utils-1.0.7/support/nfs/xlog.c.post6	2005-10-23 17:08:38.000000000 -0400
+++ nfs-utils-1.0.7/support/nfs/xlog.c	2005-10-23 17:08:39.000000000 -0400
@@ -161,7 +161,7 @@ xlog(int kind, const char *fmt, ...)
 			break;
 		default:
 			if (!log_stderr)
-				syslog(LOG_DEBUG, "%s", buff);
+				syslog(LOG_INFO, "%s", buff);
 			break;
 		}
 	}
--- nfs-utils-1.0.7/utils/idmapd/Makefile.post6	2005-10-23 17:08:38.000000000 -0400
+++ nfs-utils-1.0.7/utils/idmapd/Makefile	2005-10-23 17:08:39.000000000 -0400
@@ -6,7 +6,7 @@ TOP	= ../../
 PROGRAM	= idmapd
 PREFIX	= rpc.
 OBJS	= atomicio.o cfg.o idmapd.o setproctitle.o strlcat.o strlcpy.o
-LIBS	= -levent -lnfsidmap
+LIBS	= -levent -lnfsidmap -lnfs
 MAN8	= idmapd
 MAN5	= idmapd.conf
 
--- nfs-utils-1.0.7/utils/idmapd/idmapd.c.post6	2005-10-23 17:08:39.000000000 -0400
+++ nfs-utils-1.0.7/utils/idmapd/idmapd.c	2005-10-23 17:08:39.000000000 -0400
@@ -91,8 +91,8 @@
 		(w) = p;			\
 } while (0)
 
-#define IC_IDNAME 1
-#define IC_NAMEID 2
+#define IC_IDNAME 0
+#define IC_NAMEID 1
 struct idmap_client {
 	int                        ic_fd;
 	int                        ic_dirfd;
@@ -622,8 +622,8 @@ nfsdreopen()
 static int
 nfsdopen(char *path)
 {
-	return ((nfsdopenone(&nfsd_ic[0], IC_NAMEID, path) == 0 &&
-		    nfsdopenone(&nfsd_ic[1], IC_IDNAME, path) == 0) ? 0 : -1);
+	return ((nfsdopenone(&nfsd_ic[IC_NAMEID], IC_NAMEID, path) == 0 &&
+		    nfsdopenone(&nfsd_ic[IC_IDNAME], IC_IDNAME, path) == 0) ? 0 : -1);
 }
 
 static int
@@ -846,7 +846,7 @@ int pipefds[2] = { -1, -1};
 void
 mydaemon(int nochdir, int noclose)
 {
-	int pid, status, tempfd, fdmax, filedes;
+	int pid, status, tempfd;
 
 	if (pipe(pipefds) < 0)
 		err(1, "mydaemon: pipe() failed: errno %d (%s)\n", errno, strerror(errno));
@@ -879,13 +879,10 @@ mydaemon(int nochdir, int noclose)
 
 	if (noclose == 0) {
 		tempfd = open("/dev/null", O_RDWR);
-		close(0); dup2(tempfd, 0);
-		close(1); dup2(tempfd, 1);
-		close(2); dup2(tempfd, 2);
-		fdmax = sysconf (_SC_OPEN_MAX);
-		for (filedes = 3; filedes < fdmax; filedes++)
-			if (filedes != pipefds[1])
-				close (filedes);
+		dup2(tempfd, 0);
+		dup2(tempfd, 1);
+		dup2(tempfd, 2);
+		closeall(3);
 	}
 
 	return;
--- nfs-utils-1.0.7/utils/mountd/mountd.c.post6	2005-10-23 17:08:39.000000000 -0400
+++ nfs-utils-1.0.7/utils/mountd/mountd.c	2005-10-23 17:10:43.000000000 -0400
@@ -104,10 +104,11 @@ mount_dump_1_svc(struct svc_req *rqstp, 
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "dump request from %s",
-		inet_ntoa(addr->sin_addr));
 
-	*res = mountlist_list();
+	if ((*res = mountlist_list()) == NULL)
+		xlog(L_WARNING, "dump request from %s failed.",
+			inet_ntoa(addr->sin_addr));
+
 	return 1;
 }
 
@@ -157,9 +158,11 @@ mount_export_1_svc(struct svc_req *rqstp
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "export request from %s",
-		inet_ntoa(addr->sin_addr));
-	*resp = get_exportlist();
+
+	if ((*resp = get_exportlist()) == NULL)
+		xlog(L_WARNING, "export request from %s failed.",
+			inet_ntoa(addr->sin_addr));
+		
 	return 1;
 }
 
@@ -168,9 +171,10 @@ mount_exportall_1_svc(struct svc_req *rq
 {
 	struct sockaddr_in *addr =
 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-	xlog(L_NOTICE, "exportall request from %s",
-		inet_ntoa(addr->sin_addr));
-	*resp = get_exportlist();
+
+	if ((*resp = get_exportlist()) == NULL)
+		xlog(L_WARNING, "exportall request from %s failed.",
+			inet_ntoa(addr->sin_addr));
 	return 1;
 }
 
@@ -421,11 +425,9 @@ get_exportlist(void)
 				xfree(c->gr_name);
 				xfree(c);
 				xfree (hp);
-				if ((c = *cp) == NULL)
-				  break;
+				continue;
 			      }
-			      else
-				xfree (hp);
+			      xfree (hp);
 			    }
 			    cp = &(c->gr_next);
 			  }
@@ -557,11 +559,8 @@ main(int argc, char **argv)
 	sigaction(SIGCHLD, &sa, NULL);
 
 	/* Daemons should close all extra filehandles ... *before* RPC init. */
-	if (!foreground) {
-		int fd = sysconf (_SC_OPEN_MAX);
-		while (--fd > 2)
-			(void) close(fd);
-	}
+	if (!foreground)
+		closeall(3);
 
 	new_cache = check_new_cache();
 	if (new_cache)
--- nfs-utils-1.0.7/utils/nfsd/nfsd.c.post6	2002-09-12 17:08:42.000000000 -0400
+++ nfs-utils-1.0.7/utils/nfsd/nfsd.c	2005-10-23 17:08:39.000000000 -0400
@@ -80,9 +80,7 @@ main(int argc, char **argv)
 		(void) dup2(fd, 1);
 		(void) dup2(fd, 2);
 	}
-	fd = sysconf(_SC_OPEN_MAX);
-	while (--fd > 2)
-		(void) close(fd);
+	closeall(3);
 
 	if ((error = nfssvc(port, count)) < 0) {
 		int e = errno;
--- nfs-utils-1.0.7/utils/statd/monitor.c.post6	2004-09-14 23:08:01.000000000 -0400
+++ nfs-utils-1.0.7/utils/statd/monitor.c	2005-10-23 17:08:39.000000000 -0400
@@ -15,6 +15,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/stat.h>
+#include <errno.h>
 #include <arpa/inet.h>
 #include "misc.h"
 #include "statd.h"
@@ -172,7 +173,7 @@ sm_mon_1_svc(struct mon *argp, struct sv
 	sprintf(path, "%s/%s", SM_DIR, mon_name);
 	if ((fd = open(path, O_WRONLY|O_SYNC|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
 		/* Didn't fly.  We won't monitor. */
-		note(N_ERROR, "creat(%s) failed: %m", path);
+		note(N_ERROR, "creat(%s) failed: %s", path, strerror (errno));
 		nlist_free(NULL, clnt);
 		free(path);
 		goto failure;
--- nfs-utils-1.0.7/utils/statd/rmtcall.c.post6	2005-10-23 17:08:39.000000000 -0400
+++ nfs-utils-1.0.7/utils/statd/rmtcall.c	2005-10-23 17:08:39.000000000 -0400
@@ -26,6 +26,7 @@
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <netinet/in.h>
+#include <net/if.h>
 #include <arpa/inet.h>
 #include <rpc/rpc.h>
 #include <rpc/pmap_prot.h>
@@ -34,6 +35,7 @@
 #include <netdb.h>
 #include <string.h>
 #include <unistd.h>
+#include <ifaddrs.h>
 #include "sm_inter.h"
 #include "statd.h"
 #include "notlist.h"
@@ -90,7 +92,50 @@ statd_get_socket(int port)
 out_success:
 	return sockfd;
 }
-
+/*
+ * Using the NL_ADDR(lp), reset (if needed) the hostname
+ * that will be put in the SM_NOTIFY to the hostname
+ * that is associated with the network interface 
+ * that was monitored
+ */
+static void
+reset_my_name(notify_list *lp)
+{
+	struct ifaddrs *ifa = NULL, *ifap;
+	struct in_addr netaddr, tmp;
+	struct sockaddr_in *sin, *nsin;
+	struct hostent *hp;
+
+	netaddr.s_addr = inet_netof(NL_ADDR(lp));
+	if (getifaddrs(&ifa) >= 0) {
+		for (ifap = ifa; ifap != NULL; ifap = ifap->ifa_next) {
+			if (!(ifap->ifa_flags & IFF_UP))
+				continue;
+
+			note(N_DEBUG, "ifa_name %s\n", ifap->ifa_name);
+			if (ifap->ifa_addr == NULL)
+				continue;
+			if (ifap->ifa_addr->sa_family != AF_INET)
+				continue;
+
+			sin = (struct sockaddr_in *)ifap->ifa_addr;
+			nsin = (struct sockaddr_in *)ifap->ifa_netmask;
+			tmp.s_addr = sin->sin_addr.s_addr & nsin->sin_addr.s_addr;
+			if (memcmp(&tmp.s_addr, &netaddr.s_addr, sizeof(netaddr.s_addr)))
+				continue;
+			hp = gethostbyaddr((char *)&sin->sin_addr, 
+				sizeof(sin->sin_addr), AF_INET);
+			if (hp == NULL)
+				continue;
+			if (strcmp(NL_MY_NAME(lp), hp->h_name)) {
+				free(NL_MY_NAME(lp));
+				NL_MY_NAME(lp)= strdup(hp->h_name);
+				note(N_DEBUG, "NL_MY_NAME %s\n", NL_MY_NAME(lp));
+			}
+		}
+	}
+	return;
+}
 /*
  * Try to resolve host name for notify/callback request
  *
@@ -300,6 +345,7 @@ process_entry(int sockfd, notify_list *l
 {
 	struct sockaddr_in	sin;
 	struct status		new_status;
+	stat_chge		new_stat;
 	xdrproc_t		func;
 	void			*objp;
 	u_int32_t		proc, vers, prog;
@@ -326,9 +372,19 @@ process_entry(int sockfd, notify_list *l
 
 		/* Use source address for notify replies */
 		sin.sin_addr   = lp->addr;
+		/* 
+		 * Unless a static hostname has been defined
+		 * set the NL_MY_NAME(lp) hostname to the 
+		 * one associated with the network interface
+		 */
+		if (!(run_mode & STATIC_HOSTNAME))
+			reset_my_name(lp);
 
 		func = (xdrproc_t) xdr_stat_chge;
-		objp = &SM_stat_chge;
+		new_stat.state = MY_STATE;
+		new_stat.mon_name = NL_MY_NAME(lp);
+
+		objp = &new_stat;
 		break;
 	case NOTIFY_CALLBACK:
 		prog = NL_MY_PROG(lp);
--- nfs-utils-1.0.7/utils/statd/statd.c.post6	2004-12-05 20:25:27.000000000 -0500
+++ nfs-utils-1.0.7/utils/statd/statd.c	2005-10-23 17:08:39.000000000 -0400
@@ -22,6 +22,7 @@
 #include <grp.h>
 #include "statd.h"
 #include "version.h"
+#include "nfslib.h"
 
 /* Socket operations */
 #include <sys/types.h>
@@ -194,8 +195,10 @@ static void drop_privs(void)
 	struct stat st;
 
 	if (stat(SM_DIR, &st) == -1 &&
-	    stat(DIR_BASE, &st) == -1)
+	    stat(DIR_BASE, &st) == -1) {
 		st.st_uid = 0;
+		st.st_gid = 0;
+	}
 
 	if (st.st_uid == 0) {
 		note(N_WARNING, "statd running as root. chown %s to choose different user\n",
@@ -285,6 +288,7 @@ int main (int argc, char **argv)
 			}
 			break;
 		case 'n':	/* Specify local hostname */
+			run_mode |= STATIC_HOSTNAME;
 			MY_NAME = xstrdup(optarg);
 			break;
 		case 'P':
@@ -400,14 +404,12 @@ int main (int argc, char **argv)
 			}
 		}
 		tempfd = open("/dev/null", O_RDWR);
-		close(0); dup2(tempfd, 0);
-		close(1); dup2(tempfd, 1);
-		close(2); dup2(tempfd, 2);
-		fdmax = sysconf (_SC_OPEN_MAX);
-		for (filedes = 3; filedes < fdmax; filedes++) 
-			if (filedes != pipefds[1])
-				close (filedes);
-
+		dup2(tempfd, 0);
+		dup2(tempfd, 1);
+		dup2(tempfd, 2);
+		dup2(pipefds[1], 3);
+		pipefds[1] = 3;
+		closeall(4);
 	}
 
 	/* Child. */
--- nfs-utils-1.0.7/utils/statd/statd.h.post6	2004-09-05 22:15:51.000000000 -0400
+++ nfs-utils-1.0.7/utils/statd/statd.h	2005-10-23 17:08:39.000000000 -0400
@@ -78,6 +78,7 @@ extern int run_mode;
 /* LH - notify_only mode would be for notifying hosts on an IP alias
  * that just came back up, for ex, when failing over a HA service to
  * another host.... */
+#define STATIC_HOSTNAME 8	/* Always use the hostname set by -n */
 
 /*
  * Program name and version pointers -- See statd.c for the reasoning
--- nfs-utils-1.0.7/utils/statd/svc_run.c.post6	2004-12-05 20:25:28.000000000 -0500
+++ nfs-utils-1.0.7/utils/statd/svc_run.c	2005-10-23 17:08:39.000000000 -0400
@@ -123,7 +123,8 @@ my_svc_run(void)
 			if (errno == EINTR || errno == ECONNREFUSED
 			 || errno == ENETUNREACH || errno == EHOSTUNREACH)
 				continue;
-			note(N_ERROR, "my_svc_run() - select: %m");
+			note(N_ERROR, "my_svc_run() - select: %s",
+				strerror (errno));
 			return;
 
 		case 0:
--- nfs-utils-1.0.7/utils/svcgssd/svcgssd.c.post6	2005-10-23 17:08:39.000000000 -0400
+++ nfs-utils-1.0.7/utils/svcgssd/svcgssd.c	2005-10-23 17:08:39.000000000 -0400
@@ -113,13 +113,10 @@ mydaemon(int nochdir, int noclose)
 
 	if (noclose == 0) {
 		tempfd = open("/dev/null", O_RDWR);
-		close(0); dup2(tempfd, 0);
-		close(1); dup2(tempfd, 1);
-		close(2); dup2(tempfd, 2);
-		fdmax = sysconf (_SC_OPEN_MAX);
-		for (filedes = 3; filedes < fdmax; filedes++)
-			if (filedes != pipefds[1])
-				close (filedes);
+		dup2(tempfd, 0);
+		dup2(tempfd, 1);
+		dup2(tempfd, 2);
+		closeall(3);
 	}
 
 	return;
--- nfs-utils-1.0.7/ChangeLog.post6	2005-10-23 17:08:39.000000000 -0400
+++ nfs-utils-1.0.7/ChangeLog	2005-10-23 17:10:43.000000000 -0400
@@ -0,0 +1,40 @@
+2005-10-07 Olaf Kirch <okir at suse.de>
+	* utils/mountd/mountd.c(get_exportlist): Without this patch,
+	showmount -e would sometimes display host names that should really
+	have been subsumed under a wildcard entry.
+
+	The problem was that the code in get_exportlist would always
+	skip the next group entry after removing one FQDN.
+
+2005-10-06 Steve Dickson <SteveD at redhat.com> NeilBrown <neilb at suse.de>
+	* support/nfs/export.c: don't warn about sync/async for readonly
+	exports
+	* support/nfs/closeall.c: new file with function to close all 
+	file descriptors from a give minimum upwards.
+	* nfsd/mountd/statd/idmapd/gsssvcd: use closeall.
+	* utils/mountd/mountd.c: Eliminate 3 syslog message that are
+	logged for successful events. 
+	* utils/mountd/mountd.c: make sure the correct hostname is used in
+	the SM_NOTIFY message that is sent from a rebooted server which
+	has multiple network interfaces. (bz 139101)
+
+	Details can be found in:
+	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139101
+
+	*utils/idmapd/idmapd.c:Fixed subscripting problem in idmapd (bz
+	158188) This fixes the following problem: 
+         rpc.idmapd: nfsdreopen: Opening '' failed: errno 2 (No such file or directory)
+
+	 Details can be found in:
+	 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158188
+
+	*utils/statd/statd.c(drop_privs): clear st_gid as well as st_uid
+	of stat fails.
+	*utils/statd/svc_run.c(my_svc_run): remove usage of undocumented
+	%m format specifier.
+	*utils/statd/montor.c(sm_mon_1_svc): as above
+	*support/nfs/xlog.c(xlog): Changed xlog to use LOG_INFO instead of
+	LOG_DEBUG so debug messages will appear w/out any config changes
+	to syslog.conf. 
+
+	

nfs-utils-1.0.6-mountd.patch:
 cacheio.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

Index: nfs-utils-1.0.6-mountd.patch
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils-1.0.6-mountd.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nfs-utils-1.0.6-mountd.patch	9 Sep 2004 09:26:25 -0000	1.3
+++ nfs-utils-1.0.6-mountd.patch	24 Oct 2005 19:14:48 -0000	1.4
@@ -29,53 +29,3 @@
  }	
 
 
-#
-# Eliminate 3 syslog message that are logged for
-# successful events.
-#
---- src/utils/mountd/mountd.c.org	2003-09-12 18:14:16.000000000 -0400
-+++ src/utils/mountd/mountd.c	2004-06-16 09:31:06.000000000 -0400
-@@ -90,10 +90,11 @@ mount_dump_1_svc(struct svc_req *rqstp, 
- {
- 	struct sockaddr_in *addr =
- 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
--	xlog(L_NOTICE, "dump request from %s",
--		inet_ntoa(addr->sin_addr));
- 
--	*res = mountlist_list();
-+	if ((*res = mountlist_list()) == NULL)
-+		xlog(L_WARNING, "dump request from %s failed.",
-+			inet_ntoa(addr->sin_addr));
-+
- 	return 1;
- }
- 
-@@ -143,9 +144,11 @@ mount_export_1_svc(struct svc_req *rqstp
- {
- 	struct sockaddr_in *addr =
- 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
--	xlog(L_NOTICE, "export request from %s",
--		inet_ntoa(addr->sin_addr));
--	*resp = get_exportlist();
-+
-+	if ((*resp = get_exportlist()) == NULL)
-+		xlog(L_WARNING, "export request from %s failed.",
-+			inet_ntoa(addr->sin_addr));
-+		
- 	return 1;
- }
- 
-@@ -154,9 +157,10 @@ mount_exportall_1_svc(struct svc_req *rq
- {
- 	struct sockaddr_in *addr =
- 		(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
--	xlog(L_NOTICE, "exportall request from %s",
--		inet_ntoa(addr->sin_addr));
--	*resp = get_exportlist();
-+
-+	if ((*resp = get_exportlist()) == NULL)
-+		xlog(L_WARNING, "exportall request from %s failed.",
-+			inet_ntoa(addr->sin_addr));
- 	return 1;
- }
- 

nfs-utils-1.0.7-compile.patch:
 Makefile                      |    2 +-
 config.mk.in                  |    6 +++---
 configure.in                  |   24 +++++++++++++++---------
 support/Makefile              |    2 +-
 support/event/Makefile.in     |   10 ++++++++--
 support/gssapi/Makefile.in    |    9 +++++++--
 support/gssapi/configure      |    2 ++
 support/include/Makefile      |   10 ++++++++--
 support/lib/Makefile          |   12 +++++++++++-
 support/nfsidmap/Makefile.in  |    9 ++++++++-
 support/rpcsecgss/Makefile.in |   10 ++++++++--
 support/rpcsecgss/configure   |    2 ++
 utils/gssd/Makefile           |    4 +++-
 utils/idmapd/Makefile         |    2 +-
 utils/svcgssd/Makefile        |    9 ++++++---
 15 files changed, 84 insertions(+), 29 deletions(-)

Index: nfs-utils-1.0.7-compile.patch
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils-1.0.7-compile.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- nfs-utils-1.0.7-compile.patch	23 Sep 2005 16:37:08 -0000	1.6
+++ nfs-utils-1.0.7-compile.patch	24 Oct 2005 19:14:49 -0000	1.7
@@ -1,124 +1,32 @@
---- nfs-utils-1.0.7/config.mk.in.compile	2005-09-23 12:27:45.288539568 -0400
-+++ nfs-utils-1.0.7/config.mk.in	2005-09-23 12:28:20.082250120 -0400
-@@ -6,9 +6,9 @@ VERSION		= nfs-utils @VERSION@
- 
- prefix		= $(install_prefix)@prefix@
- exec_prefix	= $(install_prefix)@prefix@
--BINDIR		= @bindir@
--SBINDIR		= @sbindir@
--MANDIR		= @mandir@
-+BINDIR		= $(install_prefix)@bindir@
-+SBINDIR		= $(install_prefix)@sbindir@
-+MANDIR		= $(install_prefix)@mandir@
- STATEDIR	= $(install_prefix)@statedir@
- STATDUSER	= @statduser@
- 
---- nfs-utils-1.0.7/Makefile.compile	2003-09-14 20:06:15.000000000 -0400
-+++ nfs-utils-1.0.7/Makefile	2005-09-23 12:28:20.081250272 -0400
-@@ -33,4 +33,4 @@ install:: installman
- 	mkdir -p $(STATEDIR)/sm $(STATEDIR)/sm.bak
- 	touch $(STATEDIR)/state
- 	chmod go-rwx $(STATEDIR)/sm $(STATEDIR)/sm.bak $(STATEDIR)/state
--	chown $(STATDUSER) $(STATEDIR)/sm $(STATEDIR)/sm.bak $(STATEDIR)/state
-+	#chown $(STATDUSER) $(STATEDIR)/sm $(STATEDIR)/sm.bak $(STATEDIR)/state
---- nfs-utils-1.0.7/utils/idmapd/Makefile.compile	2005-09-23 12:27:45.303537288 -0400
-+++ nfs-utils-1.0.7/utils/idmapd/Makefile	2005-09-23 12:28:20.079250576 -0400
-@@ -6,7 +6,7 @@ TOP	= ../../
- PROGRAM	= idmapd
- PREFIX	= rpc.
- OBJS	= atomicio.o cfg.o idmapd.o setproctitle.o strlcat.o strlcpy.o
--LIBS	= -levent -lnfsidmap
-+LIBS	= -levent -lnfsidmap -lldap
- MAN8	= idmapd
- MAN5	= idmapd.conf
- 
---- nfs-utils-1.0.7/utils/svcgssd/Makefile.compile	2005-09-23 12:27:45.316535312 -0400
-+++ nfs-utils-1.0.7/utils/svcgssd/Makefile	2005-09-23 12:28:20.080250424 -0400
-@@ -7,7 +7,7 @@ PROGRAM	= svcgssd
- PREFIX	= rpc.
- OBJS	= svcgssd.o svcgssd_main_loop.o svcgssd_proc.o err_util.o gss_util.o \
- 	  gss_oids.o context.o context_heimdal.o cacheio.o svcgssd_mech2file.o
--LIBS	= -Wl,-rpath=$(KRBDIR)/lib -lrpcsecgss -lgssapi -ldl $(KRBLIB) -lnfsidmap
-+LIBS	= -Wl,-rpath=$(KRBDIR)/lib -lrpcsecgss -lgssapi -ldl $(KRBLIB) -lnfsidmap -lldap
- MAN8	= svcgssd
- 
- LINKED	= err_util.c gss_util.c gss_oids.c context.c context_heimdal.c
-@@ -27,5 +27,8 @@ distclean ::
- 
- include $(TOP)rules.mk
- 
--CFLAGS += -I../gssd -DKRB5_VERSION=$(KRB5_VERSION) \
--	-I$(TOP)support/rpc/include/ -I$(KRBDIR)/include
-+CFLAGS += -DHAVE_KRB5 -DKRB5_VERSION=$(KRB5_VERSION) \
-+	-I../gssd \
-+	-I$(TOP)/support/gssapi/include \
-+	-I$(TOP)/support/rpcsecgss/include \
-+	-I$(KRBDIR)/include
---- nfs-utils-1.0.7/utils/gssd/Makefile.compile	2005-09-23 12:27:45.314535616 -0400
-+++ nfs-utils-1.0.7/utils/gssd/Makefile	2005-09-23 12:28:20.079250576 -0400
-@@ -12,5 +12,7 @@ MAN8	= gssd
- 
- include $(TOP)rules.mk
- 
--CFLAGS += -DKRB5_VERSION=$(KRB5_VERSION) -I$(TOP)support/rpc/include/ \
-+CFLAGS += -DKRB5_VERSION=$(KRB5_VERSION) -I. \
-+	-I$(TOP)/support/gssapi/include \
-+	-I$(TOP)/support/rpcsecgss/include \
-  	-I$(KRBDIR)/include
---- nfs-utils-1.0.7/support/Makefile.compile	2005-09-23 12:27:45.326533792 -0400
-+++ nfs-utils-1.0.7/support/Makefile	2005-09-23 12:28:20.075251184 -0400
-@@ -3,7 +3,7 @@
- #
- 
-     TOP = ../
--SUBDIRS	= include nfs export lib misc
-+SUBDIRS	= include nfs export lib misc nfsidmap event gssapi rpcsecgss
- .DEFAULT: all
- 
- include $(TOP)rules.mk
---- nfs-utils-1.0.7/support/gssapi/Makefile.in.compile	2005-09-21 13:19:48.000000000 -0400
-+++ nfs-utils-1.0.7/support/gssapi/Makefile.in	2005-09-23 12:28:20.073251488 -0400
-@@ -83,7 +83,7 @@ AUTOMAKE = @AUTOMAKE@
- AWK = @AWK@
- CC = @CC@
- CCDEPMODE = @CCDEPMODE@
--CFLAGS = @CFLAGS@
-+CFLAGS = @CFLAGS@ -I../include ../../rpcsecgss/include -I../../include
- CPP = @CPP@
- CPPFLAGS = @CPPFLAGS@
- CXX = @CXX@
-@@ -503,12 +503,17 @@ distcleancheck: distclean
- 	  || { echo "ERROR: files left in build directory after distclean:" ; \
- 	       $(distcleancheck_listfiles) ; \
- 	       exit 1; } >&2
+--- nfs-utils-1.0.7/support/nfsidmap/Makefile.in.compile	2005-09-21 12:56:29.000000000 -0400
++++ nfs-utils-1.0.7/support/nfsidmap/Makefile.in	2005-10-23 18:01:47.000000000 -0400
+@@ -264,8 +264,14 @@ clean-libLTLIBRARIES:
+ 	  echo "rm -f \"$${dir}/so_locations\""; \
+ 	  rm -f "$${dir}/so_locations"; \
+ 	done
++
 +predep::
 +depend dep:: predep
-+	cd ./src ; $(CC) $(CFLAGS) -M *.c > .depend
- check-am: all-am
- check: check-recursive
- all-am: Makefile
- installdirs: installdirs-recursive
- installdirs-am:
--install: install-recursive
-+#install: install-recursive
-+install:
-+installman:
- install-exec: install-exec-recursive
- install-data: install-data-recursive
- uninstall: uninstall-recursive
---- nfs-utils-1.0.7/support/gssapi/configure.compile	2005-08-15 14:56:37.000000000 -0400
-+++ nfs-utils-1.0.7/support/gssapi/configure	2005-09-23 12:28:53.741133192 -0400
-@@ -22927,6 +22927,8 @@ _ACEOF
- 
-     if test -f $dir/include/gssapi/gssapi_krb5.h -a \
-             \( -f $dir/lib/libgssapi_krb5.a -o \
-+			-f $dir/lib64/libgssapi_krb5.a -o \
-+			-f $dir/lib64/libgssapi_krb5.so -o \
-             -f $dir/lib/libgssapi_krb5.so \) ; then
++	$(CC) $(CFLAGS) -M $(SOURCES) > .depend
++
+ libnfsidmap.la: $(libnfsidmap_la_OBJECTS) $(libnfsidmap_la_DEPENDENCIES) 
+ 	$(LINK) -rpath $(libdir) $(libnfsidmap_la_LDFLAGS) $(libnfsidmap_la_OBJECTS) $(libnfsidmap_la_LIBADD) $(LIBS)
++	rm -f libnfsidmap.a ; ln -s .libs/libnfsidmap.a || exit 1
  
- cat >>confdefs.h <<\_ACEOF
---- nfs-utils-1.0.7/support/include/Makefile.compile	2005-09-23 12:27:45.296538352 -0400
-+++ nfs-utils-1.0.7/support/include/Makefile	2005-09-23 12:28:20.074251336 -0400
+ mostlyclean-compile:
+ 	-rm -f *.$(OBJEXT)
+@@ -556,7 +562,8 @@ installdirs:
+ 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \
+ 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ 	done
+-install: install-am
++install: 
++installman:
+ install-exec: install-exec-am
+ install-data: install-data-am
+ uninstall: uninstall-am
+--- nfs-utils-1.0.7/support/include/Makefile.compile	2005-10-23 18:00:49.000000000 -0400
++++ nfs-utils-1.0.7/support/include/Makefile	2005-10-23 18:01:47.000000000 -0400
 @@ -6,13 +6,19 @@ TOP	 = ../../
  
  include $(TOP)rules.mk
@@ -141,8 +49,68 @@
 +	$(LN_S) ../nfsidmap/nfsidmap.h .
 +
  # .EXPORT_ALL_VARIABLES:
+--- nfs-utils-1.0.7/support/lib/Makefile.compile	2005-10-23 18:00:49.000000000 -0400
++++ nfs-utils-1.0.7/support/lib/Makefile	2005-10-23 18:01:47.000000000 -0400
+@@ -2,7 +2,8 @@
+ TOP	= ../../
+ include	$(TOP)rules.mk
+ 
+-LIBS	= libnfs.a libexport.a libmisc.a librpc.a libgssapi.a
++LIBS	= libnfs.a libexport.a libmisc.a libgssapi.a libnfsidmap.a \
++		libevent.a librpcsecgss.a
+ 
+ all install::	$(LIBS)
+ 	@:
+@@ -10,5 +11,14 @@ all install::	$(LIBS)
+ clean distclean::
+ 	rm -f $(LIBS)
+ 
++libgssapi.a:
++	ln -sf ../gssapi/src/.libs/$@ .
++
++librpcsecgss.a:
++	ln -sf ../rpcsecgss/src/.libs/$@ .
++
++libevent.a:
++	ln -sf ../event/.libs/$@ .
++
+ lib%.a:
+ 	ln -sf ../$*/$@ .
+--- nfs-utils-1.0.7/support/event/Makefile.in.compile	2005-06-12 13:59:18.000000000 -0400
++++ nfs-utils-1.0.7/support/event/Makefile.in	2005-10-23 18:01:47.000000000 -0400
+@@ -206,7 +206,7 @@ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ AUTOMAKE_OPTIONS = foreign no-dependencies
+-SUBDIRS = . sample test
++SUBDIRS = . #sample test
+ EXTRA_DIST = acconfig.h event.h event-internal.h log.h evsignal.h event.3 \
+ 	kqueue.c epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c \
+ 	devpoll.c \
+@@ -271,6 +271,10 @@ $(top_srcdir)/configure: @MAINTAINER_MOD
+ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+ 
++predep::
++depend dep:: predep
++	$(CC) $(CFLAGS) $(INCLUDES) -M $(SOURCES) > .depend
++
+ config.h: stamp-h1
+ 	@if test ! -f $@; then \
+ 	  rm -f stamp-h1; \
+@@ -674,7 +678,9 @@ installdirs-am:
+ 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \
+ 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ 	done
+-install: install-recursive
++install: #install-recursive
++installman:
++
+ install-exec: install-exec-recursive
+ install-data: install-data-recursive
+ uninstall: uninstall-recursive
 --- nfs-utils-1.0.7/support/rpcsecgss/Makefile.in.compile	2005-06-22 14:58:51.000000000 -0400
-+++ nfs-utils-1.0.7/support/rpcsecgss/Makefile.in	2005-09-23 12:28:20.078250728 -0400
++++ nfs-utils-1.0.7/support/rpcsecgss/Makefile.in	2005-10-23 18:01:47.000000000 -0400
 @@ -81,7 +81,7 @@ AUTOMAKE = @AUTOMAKE@
  AWK = @AWK@
  CC = @CC@
@@ -173,7 +141,7 @@
  install-data: install-data-recursive
  uninstall: uninstall-recursive
 --- nfs-utils-1.0.7/support/rpcsecgss/configure.compile	2005-03-22 17:27:18.000000000 -0500
-+++ nfs-utils-1.0.7/support/rpcsecgss/configure	2005-09-23 12:29:11.573422272 -0400
++++ nfs-utils-1.0.7/support/rpcsecgss/configure	2005-10-23 18:01:47.000000000 -0400
 @@ -21267,6 +21267,8 @@ _ACEOF
  
      if test -f $dir/include/gssapi/gssapi_krb5.h -a \
@@ -183,95 +151,127 @@
  	    -f $dir/lib/libgssapi_krb5.so \) ; then
         cat >>confdefs.h <<\_ACEOF
  #define HAVE_KRB5 1
---- nfs-utils-1.0.7/support/nfsidmap/Makefile.in.compile	2005-09-21 12:56:29.000000000 -0400
-+++ nfs-utils-1.0.7/support/nfsidmap/Makefile.in	2005-09-23 12:28:20.076251032 -0400
-@@ -264,8 +264,14 @@ clean-libLTLIBRARIES:
- 	  echo "rm -f \"$${dir}/so_locations\""; \
- 	  rm -f "$${dir}/so_locations"; \
- 	done
-+
-+predep::
-+depend dep:: predep
-+	$(CC) $(CFLAGS) -M $(SOURCES) > .depend
-+
- libnfsidmap.la: $(libnfsidmap_la_OBJECTS) $(libnfsidmap_la_DEPENDENCIES) 
- 	$(LINK) -rpath $(libdir) $(libnfsidmap_la_LDFLAGS) $(libnfsidmap_la_OBJECTS) $(libnfsidmap_la_LIBADD) $(LIBS)
-+	rm -f libnfsidmap.a ; ln -s .libs/libnfsidmap.a || exit 1
- 
- mostlyclean-compile:
- 	-rm -f *.$(OBJEXT)
-@@ -556,7 +562,8 @@ installdirs:
- 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \
- 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
- 	done
--install: install-am
-+install: 
-+installman:
- install-exec: install-exec-am
- install-data: install-data-am
- uninstall: uninstall-am
---- nfs-utils-1.0.7/support/event/Makefile.in.compile	2005-06-12 13:59:18.000000000 -0400
-+++ nfs-utils-1.0.7/support/event/Makefile.in	2005-09-23 12:28:20.077250880 -0400
-@@ -206,7 +206,7 @@ sharedstatedir = @sharedstatedir@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
- AUTOMAKE_OPTIONS = foreign no-dependencies
--SUBDIRS = . sample test
-+SUBDIRS = . #sample test
- EXTRA_DIST = acconfig.h event.h event-internal.h log.h evsignal.h event.3 \
- 	kqueue.c epoll_sub.c epoll.c select.c rtsig.c poll.c signal.c \
- 	devpoll.c \
-@@ -271,6 +271,10 @@ $(top_srcdir)/configure: @MAINTAINER_MOD
- $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
- 
+--- nfs-utils-1.0.7/support/gssapi/Makefile.in.compile	2005-09-21 13:19:48.000000000 -0400
++++ nfs-utils-1.0.7/support/gssapi/Makefile.in	2005-10-23 18:01:47.000000000 -0400
+@@ -83,7 +83,7 @@ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ -I../include ../../rpcsecgss/include -I../../include
+ CPP = @CPP@
+ CPPFLAGS = @CPPFLAGS@
+ CXX = @CXX@
+@@ -503,12 +503,17 @@ distcleancheck: distclean
+ 	  || { echo "ERROR: files left in build directory after distclean:" ; \
+ 	       $(distcleancheck_listfiles) ; \
+ 	       exit 1; } >&2
 +predep::
 +depend dep:: predep
-+	$(CC) $(CFLAGS) $(INCLUDES) -M $(SOURCES) > .depend
-+
- config.h: stamp-h1
- 	@if test ! -f $@; then \
- 	  rm -f stamp-h1; \
-@@ -674,7 +678,9 @@ installdirs-am:
- 	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \
- 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
- 	done
++	cd ./src ; $(CC) $(CFLAGS) -M *.c > .depend
+ check-am: all-am
+ check: check-recursive
+ all-am: Makefile
+ installdirs: installdirs-recursive
+ installdirs-am:
 -install: install-recursive
-+install: #install-recursive
++#install: install-recursive
++install:
 +installman:
-+
  install-exec: install-exec-recursive
  install-data: install-data-recursive
  uninstall: uninstall-recursive
---- nfs-utils-1.0.7/support/lib/Makefile.compile	2005-09-23 12:27:45.296538352 -0400
-+++ nfs-utils-1.0.7/support/lib/Makefile	2005-09-23 12:28:20.075251184 -0400
-@@ -2,7 +2,8 @@
- TOP	= ../../
- include	$(TOP)rules.mk
+--- nfs-utils-1.0.7/support/gssapi/configure.compile	2005-08-15 14:56:37.000000000 -0400
++++ nfs-utils-1.0.7/support/gssapi/configure	2005-10-23 18:01:47.000000000 -0400
+@@ -22927,6 +22927,8 @@ _ACEOF
  
--LIBS	= libnfs.a libexport.a libmisc.a librpc.a libgssapi.a
-+LIBS	= libnfs.a libexport.a libmisc.a libgssapi.a libnfsidmap.a \
-+		libevent.a librpcsecgss.a
+     if test -f $dir/include/gssapi/gssapi_krb5.h -a \
+             \( -f $dir/lib/libgssapi_krb5.a -o \
++			-f $dir/lib64/libgssapi_krb5.a -o \
++			-f $dir/lib64/libgssapi_krb5.so -o \
+             -f $dir/lib/libgssapi_krb5.so \) ; then
  
- all install::	$(LIBS)
- 	@:
-@@ -10,5 +11,14 @@ all install::	$(LIBS)
- clean distclean::
- 	rm -f $(LIBS)
+ cat >>confdefs.h <<\_ACEOF
+--- nfs-utils-1.0.7/support/Makefile.compile	2005-10-23 18:00:50.000000000 -0400
++++ nfs-utils-1.0.7/support/Makefile	2005-10-23 18:01:47.000000000 -0400
+@@ -3,7 +3,7 @@
+ #
  
-+libgssapi.a:
-+	ln -sf ../gssapi/src/.libs/$@ .
-+
-+librpcsecgss.a:
-+	ln -sf ../rpcsecgss/src/.libs/$@ .
-+
-+libevent.a:
-+	ln -sf ../event/.libs/$@ .
-+
- lib%.a:
- 	ln -sf ../$*/$@ .
---- nfs-utils-1.0.7/configure.in.compile	2005-09-23 12:27:45.311536072 -0400
-+++ nfs-utils-1.0.7/configure.in	2005-09-23 12:28:20.082250120 -0400
+     TOP = ../
+-SUBDIRS	= include nfs export lib misc
++SUBDIRS	= include nfs export lib misc nfsidmap event gssapi rpcsecgss
+ .DEFAULT: all
+ 
+ include $(TOP)rules.mk
+--- nfs-utils-1.0.7/utils/gssd/Makefile.compile	2005-10-23 18:00:50.000000000 -0400
++++ nfs-utils-1.0.7/utils/gssd/Makefile	2005-10-23 18:01:47.000000000 -0400
+@@ -12,5 +12,7 @@ MAN8	= gssd
+ 
+ include $(TOP)rules.mk
+ 
+-CFLAGS += -DKRB5_VERSION=$(KRB5_VERSION) -I$(TOP)support/rpc/include/ \
++CFLAGS += -DKRB5_VERSION=$(KRB5_VERSION) -I. \
++	-I$(TOP)/support/gssapi/include \
++	-I$(TOP)/support/rpcsecgss/include \
+  	-I$(KRBDIR)/include
+--- nfs-utils-1.0.7/utils/idmapd/Makefile.compile	2005-10-23 18:00:50.000000000 -0400
++++ nfs-utils-1.0.7/utils/idmapd/Makefile	2005-10-23 18:02:12.000000000 -0400
+@@ -6,7 +6,7 @@ TOP	= ../../
+ PROGRAM	= idmapd
+ PREFIX	= rpc.
+ OBJS	= atomicio.o cfg.o idmapd.o setproctitle.o strlcat.o strlcpy.o
+-LIBS	= -levent -lnfsidmap -lnfs
++LIBS	= -levent -lnfsidmap -lnfs -lldap
+ MAN8	= idmapd
+ MAN5	= idmapd.conf
+ 
+--- nfs-utils-1.0.7/utils/svcgssd/Makefile.compile	2005-10-23 18:00:50.000000000 -0400
++++ nfs-utils-1.0.7/utils/svcgssd/Makefile	2005-10-23 18:03:25.000000000 -0400
+@@ -7,7 +7,7 @@ PROGRAM	= svcgssd
+ PREFIX	= rpc.
+ OBJS	= svcgssd.o svcgssd_main_loop.o svcgssd_proc.o err_util.o gss_util.o \
+ 	  gss_oids.o context.o context_heimdal.o cacheio.o svcgssd_mech2file.o
+-LIBS	= -lnfs -lrpcsecgss -lgssapi -lnfsidmap -ldl \
++LIBS	= -lnfs -lrpcsecgss -lgssapi -lnfsidmap -ldl -lldap \
+ 	  -Wl,-rpath=$(KRBDIR)/lib $(KRBLIB)
+ MAN8	= svcgssd
+ 
+@@ -28,5 +28,8 @@ distclean ::
+ 
+ include $(TOP)rules.mk
+ 
+-CFLAGS += -I../gssd -DKRB5_VERSION=$(KRB5_VERSION) \
+-	-I$(TOP)support/rpc/include/ -I$(KRBDIR)/include
++CFLAGS += -DHAVE_KRB5 -DKRB5_VERSION=$(KRB5_VERSION) \
++	-I../gssd \
++	-I$(TOP)/support/gssapi/include \
++	-I$(TOP)/support/rpcsecgss/include \
++	-I$(KRBDIR)/include
+--- nfs-utils-1.0.7/config.mk.in.compile	2005-10-23 18:00:51.000000000 -0400
++++ nfs-utils-1.0.7/config.mk.in	2005-10-23 18:01:46.000000000 -0400
+@@ -6,9 +6,9 @@ VERSION		= nfs-utils @VERSION@
+ 
+ prefix		= $(install_prefix)@prefix@
+ exec_prefix	= $(install_prefix)@prefix@
+-BINDIR		= @bindir@
+-SBINDIR		= @sbindir@
+-MANDIR		= @mandir@
++BINDIR		= $(install_prefix)@bindir@
++SBINDIR		= $(install_prefix)@sbindir@
++MANDIR		= $(install_prefix)@mandir@
+ STATEDIR	= $(install_prefix)@statedir@
+ STATDUSER	= @statduser@
+ 
+--- nfs-utils-1.0.7/Makefile.compile	2003-09-14 20:06:15.000000000 -0400
++++ nfs-utils-1.0.7/Makefile	2005-10-23 18:01:46.000000000 -0400
+@@ -33,4 +33,4 @@ install:: installman
+ 	mkdir -p $(STATEDIR)/sm $(STATEDIR)/sm.bak
+ 	touch $(STATEDIR)/state
+ 	chmod go-rwx $(STATEDIR)/sm $(STATEDIR)/sm.bak $(STATEDIR)/state
+-	chown $(STATDUSER) $(STATEDIR)/sm $(STATEDIR)/sm.bak $(STATEDIR)/state
++	#chown $(STATDUSER) $(STATEDIR)/sm $(STATEDIR)/sm.bak $(STATEDIR)/state
+--- nfs-utils-1.0.7/configure.in.compile	2005-10-23 18:00:50.000000000 -0400
++++ nfs-utils-1.0.7/configure.in	2005-10-23 18:01:47.000000000 -0400
 @@ -117,10 +117,12 @@ AC_CHECK_LIB(socket, main, [LIBSOCKET="-
  AC_CHECK_LIB(nsl, main,	[LIBNSL="-lnsl"])
  AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"])

nfs-utils-1.0.7-nfsd-ctlbits.patch:
 support/include/nfs/nfs.h |   11 +++++++
 support/include/nfslib.h  |    2 -
 support/nfs/nfssvc.c      |   59 +++++++++++++++++++++++++++++++++++++++-
 utils/nfsd/nfsd.c         |   67 ++++++++++++++++++++++++++++++++++++++++------
 utils/nfsd/nfsd.man       |   21 +++++++++++++-
 5 files changed, 148 insertions(+), 12 deletions(-)

Index: nfs-utils-1.0.7-nfsd-ctlbits.patch
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils-1.0.7-nfsd-ctlbits.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nfs-utils-1.0.7-nfsd-ctlbits.patch	23 Sep 2005 13:48:25 -0000	1.1
+++ nfs-utils-1.0.7-nfsd-ctlbits.patch	24 Oct 2005 19:14:49 -0000	1.2
@@ -1,5 +1,5 @@
---- nfs-utils-1.0.6/support/include/nfs/nfs.h.ctlbits	2003-07-02 22:07:25.000000000 -0400
-+++ nfs-utils-1.0.6/support/include/nfs/nfs.h	2005-07-25 10:48:42.000000000 -0400
+--- nfs-utils-1.0.7/support/include/nfs/nfs.h.ctlbits	2003-07-02 22:09:31.000000000 -0400
++++ nfs-utils-1.0.7/support/include/nfs/nfs.h	2005-10-23 17:51:10.000000000 -0400
 @@ -10,6 +10,9 @@
  #define	NFS3_FHSIZE	64
  #define	NFS_FHSIZE	32
@@ -26,8 +26,8 @@
  
  /* SVC */
  struct nfsctl_svc {
---- nfs-utils-1.0.6/support/include/nfslib.h.ctlbits	2005-07-25 10:48:41.000000000 -0400
-+++ nfs-utils-1.0.6/support/include/nfslib.h	2005-07-25 10:48:42.000000000 -0400
+--- nfs-utils-1.0.7/support/include/nfslib.h.ctlbits	2005-10-23 17:50:27.000000000 -0400
++++ nfs-utils-1.0.7/support/include/nfslib.h	2005-10-23 17:51:10.000000000 -0400
 @@ -118,7 +118,7 @@ int			wildmat(char *text, char *pattern)
   * nfsd library functions.
   */
@@ -37,8 +37,8 @@
  int			nfsaddclient(struct nfsctl_client *clp);
  int			nfsdelclient(struct nfsctl_client *clp);
  int			nfsexport(struct nfsctl_export *exp);
---- nfs-utils-1.0.6/support/nfs/nfssvc.c.ctlbits	2003-08-04 00:12:48.000000000 -0400
-+++ nfs-utils-1.0.6/support/nfs/nfssvc.c	2005-07-25 12:18:30.000000000 -0400
+--- nfs-utils-1.0.7/support/nfs/nfssvc.c.ctlbits	2003-08-04 00:26:06.000000000 -0400
++++ nfs-utils-1.0.7/support/nfs/nfssvc.c	2005-10-23 17:51:10.000000000 -0400
 @@ -10,15 +10,72 @@
  
  #include <unistd.h>
@@ -113,9 +113,9 @@
  	fd = open("/proc/fs/nfsd/threads", O_WRONLY);
  	if (fd < 0)
  		fd = open("/proc/fs/nfs/threads", O_WRONLY);
---- nfs-utils-1.0.6/utils/nfsd/nfsd.c.ctlbits	2005-07-25 10:48:42.000000000 -0400
-+++ nfs-utils-1.0.6/utils/nfsd/nfsd.c	2005-07-25 11:10:59.000000000 -0400
-@@ -23,10 +23,23 @@
+--- nfs-utils-1.0.7/utils/nfsd/nfsd.c.ctlbits	2005-10-23 17:50:27.000000000 -0400
++++ nfs-utils-1.0.7/utils/nfsd/nfsd.c	2005-10-23 17:57:20.000000000 -0400
+@@ -22,10 +22,23 @@
  
  static void	usage(const char *);
  
@@ -138,9 +138,9 @@
 -	int	count = 1, c, error, port, fd;
 +	int	count = 1, c, error, port, fd, found_one;
  	struct servent *ent;
- 	DIR *dir;
  
-@@ -36,7 +49,7 @@ main(int argc, char **argv)
+ 	ent = getservbyname ("nfs", "udp");
+@@ -34,7 +47,7 @@ main(int argc, char **argv)
  	else
  		port = 2049;
  
@@ -149,7 +149,7 @@
  		switch(c) {
  		case 'P':	/* XXX for nfs-server compatibility */
  		case 'p':
-@@ -47,12 +60,50 @@ main(int argc, char **argv)
+@@ -45,12 +58,50 @@ main(int argc, char **argv)
  				usage(argv [0]);
  			}
  			break;
@@ -201,7 +201,7 @@
  
  	if (chdir(NFS_STATEDIR)) {
  		fprintf(stderr, "%s: chdir(%s) failed: %s\n",
-@@ -69,7 +120,6 @@ main(int argc, char **argv)
+@@ -67,7 +118,6 @@ main(int argc, char **argv)
  			count = 1;
  		}
  	}
@@ -209,20 +209,19 @@
  	/* KLUDGE ALERT:
  	   Some kernels let nfsd kernel threads inherit open files
  	   from the program that spawns them (i.e. us).  So close
-@@ -98,10 +148,10 @@ main(int argc, char **argv)
- 		while (--fd > 2)
- 			(void) close(fd);
+@@ -82,9 +132,9 @@ main(int argc, char **argv)
  	}
-+	openlog("nfsd", LOG_PID, LOG_DAEMON);
+ 	closeall(3);
  
 -	if ((error = nfssvc(port, count)) < 0) {
++	openlog("nfsd", LOG_PID, LOG_DAEMON);
 +	if ((error = nfssvc(port, count, versbits, portbits)) < 0) {
  		int e = errno;
 -		openlog("nfsd", LOG_PID, LOG_DAEMON);
  		syslog(LOG_ERR, "nfssvc: %s", strerror(e));
  		closelog();
  	}
-@@ -112,7 +162,8 @@ main(int argc, char **argv)
+@@ -95,7 +145,8 @@ main(int argc, char **argv)
  static void
  usage(const char *prog)
  {
@@ -233,8 +232,8 @@
 +		prog);
  	exit(2);
  }
---- nfs-utils-1.0.6/utils/nfsd/nfsd.man.ctlbits	2002-08-26 12:57:59.000000000 -0400
-+++ nfs-utils-1.0.6/utils/nfsd/nfsd.man	2005-07-25 10:48:42.000000000 -0400
+--- nfs-utils-1.0.7/utils/nfsd/nfsd.man.ctlbits	2002-08-26 12:57:59.000000000 -0400
++++ nfs-utils-1.0.7/utils/nfsd/nfsd.man	2005-10-23 17:51:10.000000000 -0400
 @@ -6,7 +6,7 @@
  .SH NAME
  rpc.nfsd \- NFS server process


Index: nfs-utils.spec
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils.spec,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- nfs-utils.spec	23 Sep 2005 13:48:25 -0000	1.70
+++ nfs-utils.spec	24 Oct 2005 19:14:49 -0000	1.71
@@ -1,7 +1,7 @@
 Summary: NFS utlilities and supporting daemons for the kernel NFS server.
 Name: nfs-utils
 Version: 1.0.7
-Release: 18.FC5
+Release: 19.FC5
 
 # group all 32bit related archs
 %define all_32bit_archs i386 i686 athlon
@@ -32,6 +32,20 @@
 Patch2: nfs-utils-1.0.7-post2.patch
 Patch3: nfs-utils-1.0.7-post3.patch
 Patch4: nfs-utils-1.0.7-post4.patch
+Patch5: nfs-utils-1.0.7-post5.patch
+Patch6: nfs-utils-1.0.7-post6.patch
+
+#
+# CITI Patches
+#
+Patch20: nfs-utils-1.0.7-037-svcgssd_closeall_lib.dif
+Patch21: nfs-utils-1.0.7-040-idmapd_fix_error_reporting.dif
+Patch22: nfs-utils-1.0.7-041-svcgssd_error_reporting.dif
+Patch23: nfs-utils-1.0.7-042-spkm3_lucid_context.dif
+Patch24: nfs-utils-1.0.7-043-svcgssd_continue_init.dif
+Patch25: nfs-utils-1.0.7-044-gssd_continue_init.dif
+Patch26: nfs-utils-1.0.7-045-gssd_clnt_create_error.dif
+Patch27: nfs-utils-1.0.7-046-gssd_error_messages.dif
 
 
 #
@@ -39,17 +53,11 @@
 #
 Patch50: nfs-utils-1.0.5-statdpath.patch
 Patch51: nfs-utils-1.0.6-mountd.patch
-Patch52: nfs-utils-1.0.6-expwarn.patch
-Patch53: nfs-utils-1.0.7-sgi-statd-fixes.patch
-Patch54: nfs-utils-1.0.6-fd-sig-cleanup.patch
-Patch55: nfs-utils-1.0.6-idmap.conf.patch
-Patch56: nfs-utils-1.0.6-rquotad-overflow.patch
-Patch57: nfs-utils-1.0.6-statd-notify-hostname.patch
-Patch58: nfs-utils-1.0.7-xlog-loginfo.patch
-Patch59: nfs-utils-1.0.7-idmap-reopen.patch
-Patch60: nfs-utils-1.0.7-rquotad-curblocks.patch
-Patch61: nfs-utils-1.0.7-mountd-stat64.patch
-Patch62: nfs-utils-1.0.7-nfsd-ctlbits.patch
+Patch52: nfs-utils-1.0.6-idmap.conf.patch
+Patch53: nfs-utils-1.0.7-rquotad-curblocks.patch
+Patch54: nfs-utils-1.0.7-mountd-stat64.patch
+Patch55: nfs-utils-1.0.7-nfsd-ctlbits.patch
+Patch56: nfs-utils-1.0.7-idmapd-mapinit.patch
 
 Patch100: nfs-utils-1.0.7-compile.patch
 Patch150: nfs-utils-1.0.6-pie.patch
@@ -106,21 +114,27 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1 
+%patch5 -p1 
+%patch6 -p1
+
+# CITI Patches
+%patch20 -p1
+%patch21 -p1
+%patch22 -p1
+%patch23 -p1
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
 
 # Local Patches
 %patch50 -p1 -b .statdpath
 %patch51 -p1 -b .mountd
-%patch52 -p1 -b .expwarn
-%patch53 -p1 -b .sgi
-%patch54 -p1 -b .cleanup
-%patch55 -p1 -b .conf
-%patch56 -p1 -b .overflow
-%patch57 -p1 -b .notify
-%patch58 -p1 -b .xlog
-%patch59 -p1 -b .reopen
-%patch60 -p1 -b .curblocks
-%patch61 -p1 -b .stat64
-%patch62 -p1 -b .ctlbits
+%patch52 -p1 -b .conf
+%patch53 -p1 -b .curblocks
+%patch54 -p1 -b .stat64
+%patch55 -p1 -b .ctlbits
+%patch56 -p1 -b .mapinit
 
 
 # Do the magic to get things to compile
@@ -273,6 +287,11 @@
 %config /etc/rc.d/init.d/nfslock
 
 %changelog
+* Sun Oct 23 2005 Steve Dickson <SteveD at RedHat.com> 1.0.7-19
+- Updated to latest code in SourceForge CVS
+- Updated to latest CITI patches (1.0.7-4)
+- Fix bug in nfsdreopen by compiling in server defaults
+
 * Thu Sep 22 2005 Steve Dickson <SteveD at RedHat.com> 1.0.7-18
 - Updated libnfsidmap to 0.11
 - Updated libgssapi to 0.5


--- nfs-utils-1.0.6-expwarn.patch DELETED ---


--- nfs-utils-1.0.6-fd-sig-cleanup.patch DELETED ---


--- nfs-utils-1.0.6-rquotad-overflow.patch DELETED ---


--- nfs-utils-1.0.6-statd-notify-hostname.patch DELETED ---


--- nfs-utils-1.0.7-idmap-reopen.patch DELETED ---


--- nfs-utils-1.0.7-sgi-statd-fixes.patch DELETED ---


--- nfs-utils-1.0.7-xlog-loginfo.patch DELETED ---




More information about the fedora-cvs-commits mailing list