Date: Wed, 2 Apr 2003 15:38:34 -0500 (EST) From: "Matthew N. Dodd" <mdodd@FreeBSD.ORG> To: Robert Watson <rwatson@FreeBSD.ORG> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: setfstab()/getfstab() Message-ID: <20030402153711.U46852@sasami.jurai.net> In-Reply-To: <Pine.NEB.3.96L.1030402153015.37865A-100000@fledge.watson.org> References: <Pine.NEB.3.96L.1030402153015.37865A-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Apr 2003, Robert Watson wrote:
> Hmm. Maybe an issetugid() check before using the environmental variable?
Something like this? (whitespace damaged)
%%%
@@ -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?20030402153711.U46852>
