Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Aug 2012 00:46:25 +0100
From:      =?UTF-8?B?QXR0aWxhIEJvZ8Ohcg==?= <attila.bogar@linguamatics.com>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        freebsd-stable@FreeBSD.org
Subject:   Re: Who is responsible for Heimdal/Kerberos in FreeBSD
Message-ID:  <501B1151.5060809@linguamatics.com>
In-Reply-To: <199928664.259142.1343950256574.JavaMail.root@erie.cs.uoguelph.ca>
References:  <199928664.259142.1343950256574.JavaMail.root@erie.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080104050603000806020302
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

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.


--------------080104050603000806020302
Content-Type: text/x-patch;
 name="9-mountd-attila.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="9-mountd-attila.patch"

--- 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) {

--------------080104050603000806020302--



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