Date: Sat, 31 Mar 2001 09:53:14 -0500 From: Bill Moran <wmoran@iowna.com> To: Edwin Groothuis <edwin@mavetju.org> Cc: freebsd-questions@freebsd.org Subject: Re: access() system call Message-ID: <3AC5EF5A.3CE0FB08@iowna.com> References: <3AC5EAFA.C8D4E301@iowna.com> <20010331165151.J490@cgmd76206.chello.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Edwin Groothuis wrote: > > On Sat, Mar 31, 2001 at 09:34:34AM -0500, Bill Moran wrote: > > In the man page for the access(2) syscall, it states "access() is a > > potential security hole and should never be used." > > > > I have 3 questions regarding this: > > > > 1. What should I use instead? > > stat(2). It's in the SEE ALSO section of the man-page. I could use stat(2), but it would require multiple lines of code to resolve the coding problem I need to do, whereas access(2) could handle the job in a single line. It's ridiculous, all I want to know is whether the current user has read access to a filesystem object, once user, group and world perms are all taking into account. If that's what I have to do, fine. But I was hoping for a more "drop-in" replacement for access(2). Thanks for the feedback. -Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AC5EF5A.3CE0FB08>