Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Mar 2001 14:02:24 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        Jordan DeLong <fracture@allusion.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Security problems with access(2)? 
Message-ID:  <200103312202.f2VM2O301620@mass.dis.org>
In-Reply-To: Your message of "Sun, 01 Apr 2001 14:48:30 PDT." <20010401144830.A76718@cx420564-b.tucson1.az.home.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> so in your oppinion it would be more preferable to either
> a) attempt the dlopen(3) on each entry in the path, and give the value of dlerror(3)
>    to stderr for each one
> or
> b) attempt the dlopen(3) on each entry in the path and not give any error
>    information because most items would probably go through three path
>    entries before getting to the one that has the file in it.
>
> the access(2) call is so I don't have to print a ton of dlerror(3) messages, because
> hopefully we can agree that b is a bad idea...

Mmm, I take your point; because dlopen() doesn't set errno, you can't 
actually check it usefully.

I'd say this is a bug in the dlopen() API; I'd be more inclined to try 
using access _after_ dlopen failed to check for presence post facto, but 
that's really splitting hairs.

-- 
... 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103312202.f2VM2O301620>