Date: Wed, 2 Apr 2003 16:38:18 -0500 (EST) From: Robert Watson <rwatson@FreeBSD.ORG> To: "Matthew N. Dodd" <mdodd@FreeBSD.ORG> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: setfstab()/getfstab() Message-ID: <Pine.NEB.3.96L.1030402163804.35655B-100000@fledge.watson.org> In-Reply-To: <20030402153711.U46852@sasami.jurai.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Apr 2003, Matthew N. Dodd wrote:
> On Wed, 2 Apr 2003, Robert Watson wrote:
> > Hmm. Maybe an issetugid() check before using the environmental variable?
>
> Something like this? (whitespace damaged)
Yes, that looks reasonable to me.
> %%%
> @@ -226,7 +254,13 @@
> LineNo = 0;
> return(1);
> }
> - if ((_fs_fp = fopen(_PATH_FSTAB, "r")) != NULL) {
> + if (fsp_set == 0) {
> + if (issetugid())
> + setfstab(NULL);
> + else
> + setfstab(getenv("PATH_FSTAB"));
> + }
> + if ((_fs_fp = fopen(path_fstab, "r")) != NULL) {
> LineNo = 0;
> return(1);
> }
> %%%
>
>
> --
> | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD |
> | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax |
> | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever |
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030402163804.35655B-100000>
