Date: Sat, 28 Jul 2001 14:45:54 -0400 From: Mike Barcroft <mike@FreeBSD.ORG> To: Yar Tikhiy <yar@FreeBSD.ORG> Cc: audit@FreeBSD.ORG Subject: Re: finger(1) & fingerd(8) Message-ID: <20010728144554.C86837@coffee.q9media.com> In-Reply-To: <20010728155159.A35483@snark.rinet.ru>; from yar@FreeBSD.ORG on Sat, Jul 28, 2001 at 03:51:59PM %2B0400 References: <20010728155159.A35483@snark.rinet.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 28, 2001 at 03:51:59PM +0400, Yar Tikhiy wrote: [...] > @@ -415,8 +418,11 @@ > > if (!pw->pw_dir) > return 0; > + > + if (Hflag && access(pw->pw_dir, R_OK) == -1) > + return 1; [...] Excessive whitespace. Also, I'd prefer to see you use open(2) here instead of using access(2). Eg: int fd; if (Hflag && (fd = open(pw->pw_dir, O_RDONLY)) == -1) return (1); close(fd); [...] > 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. The rest of the code looks good. Best regards, Mike Barcroft 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?20010728144554.C86837>