From quinot@inf.enst.fr  Tue Mar 27 06:47:09 2001
Return-Path: <quinot@inf.enst.fr>
Received: from infres.enst.fr (infres-192.enst.fr [137.194.192.1])
	by hub.freebsd.org (Postfix) with ESMTP id 91B6D37B718
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Mar 2001 06:47:04 -0800 (PST)
	(envelope-from quinot@inf.enst.fr)
Received: from shalmaneser.enst.fr (shalmaneser.enst.fr [137.194.160.128])
	by infres.enst.fr (Postfix) with ESMTP id 926894541F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Mar 2001 16:47:03 +0200 (MET DST)
Received: by shalmaneser.enst.fr (Postfix, from userid 11117)
	id 1EABC112D5; Tue, 27 Mar 2001 16:47:01 +0200 (CEST)
Message-Id: <20010327144701.1EABC112D5@shalmaneser.enst.fr>
Date: Tue, 27 Mar 2001 16:47:01 +0200 (CEST)
From: quinot@inf.enst.fr
Reply-To: quinot@inf.enst.fr
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: mountd: can't change attributes for /usr
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26148
>Category:       bin
>Synopsis:       mountd: can't change attributes for /usr
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    iedowse
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 27 06:50:00 PST 2001
>Closed-Date:    Wed Apr 18 06:32:11 PDT 2001
>Last-Modified:  Wed Apr 18 06:36:54 PDT 2001
>Originator:     quinot@inf.enst.fr
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD shalmaneser.enst.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #6: Tue Mar 27 16:29:32 CEST 2001 root@shalmaneser.enst.fr:/usr/obj/usr/src/sys/SHALMANESER i386

	5.0-CURRENT as of March 23 (remade kernel today to see if
	it would help).
	
>Description:

Mar 27 16:42:01 shalmaneser mountd[347]: can't change attributes for /usr
Mar 27 16:42:01 shalmaneser mountd[347]: bad exports list line /usr -alldirs IR

/etc/exports contains:
/usr -alldirs IR

/usr is a mount point:
# mount
/dev/ad0s1f on /usr (ufs, NFS exported, local, soft-updates)

IR is a netgroup name.

This used to work with older 5.0-CURRENT binaries. No change is known
to have happened apart from upgrading world.

>How-To-Repeat:
	
>Fix:

Unknown.
>Release-Note:
>Audit-Trail:

From: Thomas Quinot <quinot@infres.enst.fr>
To: freebsd-gnats-submit@FreeBSD.org, quinot@inf.enst.fr
Cc:  
Subject: Re: bin/26148: mountd: can't change attributes for /usr
Date: Wed, 11 Apr 2001 15:45:34 +0200

 Further investigation reveals that this problem is probably caused by
 duplicate hosts in our netgroups.
 
 Actually, we have a netgroup that contains hosts with both unqualified
 and qualified domain names, as in:
 
 MyNetgroup	(myhost,-,-) (myhost.dom.ain,-,-)
 
 Names are then looked up and qualified by mountd, and do_mount()
 is called twice for each host. The second call fails, and leaves an
 empty export list.
 
 It is unclear to me how and where this should be dealt with. Maybe
 mount(2)
 could return with EEXIST instead of EPERM when an attempt is made to
 enter a duplicate host in the export list, and mountd could act
 correctly upon
 such an error?
 
 Thomas.
 
 -- 
 Thomas Quinot ** Dpartement Informatique & Rseaux **
 quinot@inf.enst.fr
               ENST   //   46 rue Barrault   //   75634 PARIS CEDEX 13

From: Martin Blapp <mb@imp.ch>
To: freebsd-gnats-submit@FreeBSD.org
Cc: quinot@inf.enst.fr
Subject: Re: bin/26148: mountd: can't change attributes for /usr
Date: Fri, 13 Apr 2001 16:06:29 +0200

 Hi,
 
 Please test the fix for this problem:
 
 http://home.teleport.ch/freebsd/mountd.c.diff2
 
 Martin
 
 Martin Blapp, mb@imp.ch
 ------------------------------------------------
 Improware AG, UNIX solution and service provider
 Zurlindenstrasse 29, 4133 Pratteln, Switzerland
 Phone: +41 79 370 26 05, Fax: +41 61 826 93 01
 ------------------------------------------------
 

From: Thomas Quinot <quinot@inf.enst.fr>
To: Martin Blapp <mb@imp.ch>
Cc: freebsd-gnats-submit@FreeBSD.org, quinot@inf.enst.fr
Subject: Re: bin/26148: mountd: can't change attributes for /usr
Date: Fri, 13 Apr 2001 18:36:28 +0200

 Le 2001-04-13, Martin Blapp crivait :
 
 > Please test the fix for this problem:
 > http://home.teleport.ch/freebsd/mountd.c.diff2
 
 The proposed fix does not entirely resolve the problem, because
 only the first address in a host's gt_addrinfo list is checked.
 On the other hand, the check on canonname is probably superfluous,
 since the kernel only considers the address.
 
 I have also replaced a direct struct sockaddr equality with a call
 to sacmp(), which seemed safer.
 
 I have modified your patch accordingly. The version available
 at http://www.infres.enst.fr/~quinot/mountd.c.diff3 seems to
 work here.
 
 Thomas.
 
 -- 
 Thomas Quinot ** Dpartement Informatique & Rseaux ** quinot@inf.enst.fr
               ENST   //   46 rue Barrault   //   75634 PARIS CEDEX 13 

From: Martin Blapp <mb@imp.ch>
To: Thomas Quinot <quinot@inf.enst.fr>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/26148: mountd: can't change attributes for /usr
Date: Fri, 13 Apr 2001 18:43:08 +0200

 Looks good to me !
 
 Thanks
 
 Martin Blapp, mb@imp.ch
 ------------------------------------------------
 Improware AG, UNIX solution and service provider
 Zurlindenstrasse 29, 4133 Pratteln, Switzerland
 Phone: +41 79 370 26 05, Fax: +41 61 826 93 01
 ------------------------------------------------
 

From: Martin Blapp <mb@imp.ch>
To: Thomas Quinot <quinot@inf.enst.fr>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/26148: mountd: can't change attributes for /usr
Date: Fri, 13 Apr 2001 18:47:25 +0200

 Hi,
 
 > I have also replaced a direct struct sockaddr equality with a call
 > to sacmp(), which seemed safer.
 
 This seems to be the right solution.
 
 > 
 > I have modified your patch accordingly. The version available
 > at http://www.infres.enst.fr/~quinot/mountd.c.diff3 seems to
 > work here.
 
 I tested the patch here. It solves the problem of doublicated adresses
 and names entierly. Thanks a lot.
 
 Martin
 

From: Martin Blapp <mb@imp.ch>
To: Thomas Quinot <quinot@inf.enst.fr>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/26148: mountd: can't change attributes for /usr
Date: Fri, 13 Apr 2001 19:33:22 +0200

 I've merged now the both mountd fixes to one.
 
 http://home.teleport.ch/freebsd/mountd.c.diff
 
 Martin
 
 Martin Blapp, mb@imp.ch
 ------------------------------------------------
 Improware AG, UNIX solution and service provider
 Zurlindenstrasse 29, 4133 Pratteln, Switzerland
 Phone: +41 79 370 26 05, Fax: +41 61 826 93 01
 ------------------------------------------------
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Tue Apr 17 17:54:37 PDT 2001 
State-Changed-Why:  
A change based on your patch was included in revision 1.45 of 
mountd.c. Has this fixed the problem? 


Responsible-Changed-From-To: freebsd-bugs->iedowse 
Responsible-Changed-By: iedowse 
Responsible-Changed-When: Tue Apr 17 17:54:37 PDT 2001 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26148 

From: Thomas Quinot <quinot@inf.enst.fr>
To: iedowse@FreeBSD.org
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/26148: mountd: can't change attributes for /usr
Date: Wed, 18 Apr 2001 15:18:52 +0200

 Le 2001-04-18, iedowse@FreeBSD.org crivait :
 
 > A change based on your patch was included in revision 1.45 of
 > mountd.c. Has this fixed the problem?
 
 1.46 works great here, thanks a lot!
 
 Thomas.
 
 -- 
 Thomas Quinot ** Dpartement Informatique & Rseaux ** quinot@inf.enst.fr
               ENST   //   46 rue Barrault   //   75634 PARIS CEDEX 13 
State-Changed-From-To: feedback->closed 
State-Changed-By: iedowse 
State-Changed-When: Wed Apr 18 06:32:11 PDT 2001 
State-Changed-Why:  

Submitter says that revision 1.46 of mountd.c has resolved 
the issue. Thanks for reporting this! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26148 
>Unformatted:
