Date: Sun, 29 Aug 1999 16:07:45 -0700 (PDT) From: Kris Kennaway <kris@hub.freebsd.org> To: Alban Hertroys <dalroi@wit401310.student.utwente.nl> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: [mount.c]: Option "user"-patch Message-ID: <Pine.BSF.4.10.9908291558480.47871-100000@hub.freebsd.org> In-Reply-To: <19990829224626.16DA51DE9@wit401310.student.utwente.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9908291558480.47871-100000>