> in a project I'm currently working on I use the access(2) call when
> going through a path for plugins to load. For each : delim on the path
> it does an access(2) to see if there is a file there, and then it
> uses dlopen(3) to open the file as a share object, and responds
> appropriatly to any errors it may recieve from the dlopen(3)
> call.
>
> I'd like to offer this as an example of a reasonable, and noninsecure
> usage of access (please correct me if I'm wrong). I'm not worried about
> if the file is created after the access call: I'm just using the
> access call to avoid having to do a dlopen() on every : delim
> in the path.
>
> Thoughts?
If you're going to dlopen(3) it anyway, calling access(2) is just a waste of
time. This is the most benign misuse of access(2), it's certainly not a
"reasonable" example however.
--
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also. But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view. [Dr. Fritz Todt]
V I C T O R Y N O T V E N G E A N C E
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message