Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 1995 13:57:49 +1000
From:      Stephen McKay <syssgm@devetir.qld.gov.au>
To:        Alexandre Moriya - esp <moriya@ifi.unicamp.br>
Cc:        freebsd-hackers@freebsd.org, syssgm@devetir.qld.gov.au
Subject:   mountd -n hates 'nobody' (was: Re: Exporting a file system to a PC.)
Message-ID:  <199508310357.NAA15714@orion.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
Alexandre Moriya - esp <moriya@ifi.unicamp.br> writes:
>> 
>> Robert Clark stands accused of saying:
>> > What happens, my PC can see the exported portion of the FreeBSD file system, 
>> > but I can't map a drive, I get an RPC failure,  'Client credential too 
>> > weak'.
>
>	When I am logged in as some user which is recognized
>	by the FreeBSD box that's ok (using net name * in the
>	DOS box), I am able to mount the exported directory !!!
>
>	But when I am not logged in (ie, nobody - uid:-2 , gid:-2)
>	I can not mount the export directory. I see an error
>	in the DOS box - an NFS error indicating an 1007 error code...

[I'm a long way behind on my -hackers mail.  I'm up to Aug 16!]

mountd is rejecting requests from uid -2 even with the -n switch.  This
behaviour started in FreeBSD 2.0, and seems totally bogus to me.  I've
removed this check (at home) with the enclosed patch, and my DOS PC can now
mount NFS exported partitions without extra authorisation.  I'm not sure
whether to bug report this, or try to start some sort of discussion.

So, hands up everyone (like me) who thinks it's a bug!

Stephen McKay.


diff -ru /cdrom/usr/src/sbin/mountd/mountd.c ./mountd.c
--- /cdrom/usr/src/sbin/mountd/mountd.c	Thu Jun  8 00:34:11 1995
+++ ./mountd.c	Thu Aug 31 13:43:23 1995
@@ -352,7 +352,7 @@
 			syslog(LOG_ERR, "Can't send reply");
 		return;
 	case RPCMNT_MOUNT:
-		if ((uid != 0 && root_only) || uid == -2) {
+		if (uid != 0 && root_only) {
 			svcerr_weakauth(transp);
 			return;
 		}
@@ -421,7 +421,7 @@
 			syslog(LOG_ERR, "Can't send reply");
 		return;
 	case RPCMNT_UMOUNT:
-		if ((uid != 0 && root_only) || uid == -2) {
+		if (uid != 0 && root_only) {
 			svcerr_weakauth(transp);
 			return;
 		}
@@ -437,7 +437,7 @@
 		del_mlist(inet_ntoa(transp->xp_raddr.sin_addr), dirpath);
 		return;
 	case RPCMNT_UMNTALL:
-		if ((uid != 0 && root_only) || uid == -2) {
+		if (uid != 0 && root_only) {
 			svcerr_weakauth(transp);
 			return;
 		}



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