From owner-freebsd-hackers Wed Nov 10 12:57:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by hub.freebsd.org (Postfix) with ESMTP id C2EC114E16 for ; Wed, 10 Nov 1999 12:57:12 -0800 (PST) (envelope-from mb@imp.ch) Received: from mephisto.imp.ch (mb@mephisto.imp.ch [157.161.1.22]) by mail.imp.ch (8.9.3/8.9.3) with ESMTP id VAA07178 for ; Wed, 10 Nov 1999 21:57:04 +0100 (MET) Received: from localhost (mb@localhost) by mephisto.imp.ch (8.9.3/8.9.3) with ESMTP id VAA02593 for ; Wed, 10 Nov 1999 21:57:02 +0100 (MEZ) Date: Wed, 10 Nov 1999 21:57:02 +0100 From: Martin Blapp To: hackers@freebsd.org Subject: HEADS UP: new command rpc.umntall in usr.sbin Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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