Date: Mon, 30 Jul 2001 21:22:57 +0400 From: Yar Tikhiy <yar@FreeBSD.ORG> To: Mike Barcroft <mike@FreeBSD.ORG> Cc: audit@FreeBSD.ORG Subject: Re: finger(1) & fingerd(8) Message-ID: <20010730212257.C26476@comp.chem.msu.su> In-Reply-To: <20010728144554.C86837@coffee.q9media.com>; from mike@FreeBSD.ORG on Sat, Jul 28, 2001 at 02:45:54PM -0400 References: <20010728155159.A35483@snark.rinet.ru> <20010728144554.C86837@coffee.q9media.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 28, 2001 at 02:45:54PM -0400, Mike Barcroft wrote: > > [...] > > if (access(buf, F_OK) == 0) > > return 1; > [...] > > I know this isn't your code, but this should also probably use open(2) > as well. First, I must have missed something, but why is access(2) a bad thing at this particular point? Second, open(2) can't be used as a drop-in replacement for access(.., F_OK) here because it can't tell permission errors on a directory from those on a file itself. IMHO stat(2) should be used here if the historical behaviour of finger(1) is to be preserved. -- Yar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010730212257.C26476>