From owner-freebsd-hackers Sun Aug 29 16: 7:51 1999 Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 9E15314A2D; Sun, 29 Aug 1999 16:07:45 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 907F61CD8C7; Sun, 29 Aug 1999 16:07:45 -0700 (PDT) (envelope-from kris@hub.freebsd.org) Date: Sun, 29 Aug 1999 16:07:45 -0700 (PDT) From: Kris Kennaway To: Alban Hertroys Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: [mount.c]: Option "user"-patch In-Reply-To: <19990829224626.16DA51DE9@wit401310.student.utwente.nl> 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 On Mon, 30 Aug 1999, Alban Hertroys wrote: > I have seen this line a lot lately. It isn't in FreeBSD 3.2-STABLE, is > it? My /usr/src/sbin/mount/mount.c says: > > /* > * If the mount was successfully, and done by root, tell mountd the > * good news. Pid checks are probably unnecessary, but don't hurt. > */ > if (rval == 0 && getuid() == 0 && > (mountdfp = fopen(_PATH_MOUNTDPID, "r")) != NULL) { > if (fscanf(mountdfp, "%d", &pid) == 1 && > pid > 0 && kill(pid, SIGHUP) == -1 && errno != ESRCH) > err(1, "signal mountd"); > (void)fclose(mountdfp); > } > > getuid() == 0 looks a lot like root-only to me... Or am I missing > something? You are. This code says "if we're root, give mountd(8) a SIGHUP". According to the mountd(8) manpage, "After changing the exports file, a hangup signal should be sent to the mountd daemon to get it to reload the export information." > == > If there is a here-after, > then there are much more people dead than alive. I dispute this :-) The population of the world has been growing exponentially for some centuries at least. One property of exponential curves (f(x) = a^x) is that the area beneath the curve up to any given point is equal to the value of the function at that point (up to a constant scaling factor ln a). Thus, the number of people currently alive is approximately equal to those who have ever lived (and died). Kris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message