Hi Rick,

On 03/08/12 00:30, Rick Macklem wrote:
If you have the time/expertise to come up with good patches for the code and are willing to donate these to the project, I'd suggest you either post the patches or attach them to a bug report. Please remember that almost all work on FreeBSD is done by volunteers in their spare time, rick.
I reported PR164933 early this year with a patch, but unfortunately no one responded.

I've attached the patch against 9-STABLE now.
Please review.

I found also other problems with NFS reliability (can reproduce consistently) - will discuss tomorrow on freebsd-fs.

Cheers,
Attila

PS: Sorry about the language (ESL) of my letter, I'd like to contribute if I can.

--- usr.sbin/mountd/mountd.c.orig	2011-09-23 01:51:37.000000000 +0100
+++ usr.sbin/mountd/mountd.c	2012-07-03 14:51:12.000000000 +0100
@@ -1334,6 +1334,7 @@
 	struct xucred anon;
 	char *cp, *endcp, *dirp, *hst, *usr, *dom, savedc;
 	int len, has_host, exflags, got_nondir, dirplen, netgrp;
+	int xx_numsecflavors, xx_secflavors[MAXSECFLAVORS];
 
 	v4root_phase = 0;
 	dirhead = (struct dirlist *)NULL;
@@ -1355,6 +1356,7 @@
 		opt_flags = 0;
 		ep = (struct exportlist *)NULL;
 		dirp = NULL;
+		xx_numsecflavors = 0;
 
 		/*
 		 * Handle the V4 root dir.
@@ -1463,10 +1465,15 @@
 						  "making new ep fs=0x%x,0x%x",
 						  fsb.f_fsid.val[0],
 						  fsb.f_fsid.val[1]);
-					} else if (debug)
+					} else {
+       					    if (debug)
 					    warnx("found ep fs=0x%x,0x%x",
 						fsb.f_fsid.val[0],
 						fsb.f_fsid.val[1]);
+					    xx_numsecflavors = ep->ex_numsecflavors;
+                                            bcopy(ep->ex_secflavors, &xx_secflavors, sizeof(int)*xx_numsecflavors);
+					}
+
 				    }
 
 				    /*
@@ -1593,6 +1600,17 @@
 		}
 
 		/*
+		 * Merge security flavours
+		 */
+		int ci, cj;
+		for(ci=0; ci<xx_numsecflavors; ci++) {
+			for(cj = 0; cj<ep->ex_numsecflavors && xx_secflavors[ci]!=ep->ex_secflavors[cj];cj++);
+			if (cj==ep->ex_numsecflavors) {
+				ep->ex_secflavors[ep->ex_numsecflavors++] = xx_secflavors[ci];
+			}
+		}
+
+		/*
 		 * Success. Update the data structures.
 		 */
 		if (has_host) {
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to