Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 1999 21:57:02 +0100
From:      Martin Blapp <mb@imp.ch>
To:        hackers@freebsd.org
Subject:   HEADS UP: new command rpc.umntall in usr.sbin
Message-ID:  <Pine.SGI.4.10.9911102123140.20870-100000@mephisto.imp.ch>

next in thread | raw e-mail | index | archive | help

The BSD mountd(8) implementation has some design issues. It tries to
call RPC.UMNTALL on SIGTERM. According to RFC 1813 it is 

1. A bad idea to use broadcast RPC to do the UMNTALL. 

2. Beside that our broadcast RPC implementation does use a port
   remapping on the remote portmapper. The port remapping is done
   to unprivileged ports. That explains the syslog messages we 
   have all seen a lot:

   umountall request from 192.168.0.1 from unprivileged port

   Just a note: 192.168.0.1 is the IP adress from the server itself.
   This is completly wrong. The original hostaddress get's lost,
   the server seems to call itself to remove it's mounts. Heh.

3. It is just stupid to call RPC_UMNTALL from mountd. Running a NFS
   server does not mean we have NFS clients on the machine.

4. RPC_UMNTALL should be called on startup. I've modified our init(8)
   a little bit that we can see in rc.shutdown if we go to singleuser
   or not.

You'll find the patches on this URL:
http://www.attic.ch/patches/rpc.umntall/

Thank you for comments and suggestions.

Martin


Note: The userland patch has also some ISO network stuff removed.
I've asked bde about that and he agreed.


Attached it some part of RFC 1813:

5.2.4 Procedure 4: UMNTALL - Remove all mount entries

   SYNOPSIS

      void MOUNTPROC3_UMNTALL(void) = 4;

   DESCRIPTION

      Procedure UMNTALL removes all of the mount entries for
      this client previously recorded by calls to MNT. AUTH_UNIX
      authentication or better is required.

   IMPLEMENTATION

      This procedure should be used by clients when they are
      recovering after a system shutdown. If the client could
      not successfully unmount all of its file systems before
      being shutdown or the client crashed because of a software
      or hardware problem, there may be servers which still have
      mount entries for this client. This is an easy way for the
      client to inform all servers at once that it does not have
      any mounted file systems.  However, since this procedure
      is generally implemented using broadcast RPC, it is only
      of limited usefullness.

   ERRORS

      There are no MOUNT protocol errors which can be returned
      from this procedure. However, RPC errors may be returned
      for authentication or other RPC failures.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SGI.4.10.9911102123140.20870-100000>