open failed: illegal insecure pathname
- From: "Dave (from the UK)" <see-my-signature@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Jul 2006 11:12:38 +0100
Some may recall the hassles I have with Mathematica on Solaris using tons of CPU time which was caused by a change in Solaris 10 which I understand will be patched at some point.
Casper *** wrote a bit of library code which I preloaded to change the behavior of select. This I saved as select_preload.so
BUT
*Sometimes* Mathematical will fail to load the library, coming up with this message in is "Error Console".
ld.so.1: prtconf: warning: /usr/lib/sparcv9/select_preload.so: open failed: illegal insecure pathname
(Where it gets prtconf from I don't know - the word is not in the source , which I have put at the end of the email)
I originally had the library in /usr/local/lib, but changed it to /usr/lib thinking Mathematica might consider that an acceptable and not illegal pathname. But it still generates the message some times.
The executable is 64-bit, so I've put it in /usr/lib/sparcv9. I've not bothered creating a 32-bit one.
This is how I have set it up.
teal / % ls -ld /usr/lib/sparcv9/select_preload.so
-rw-r--r-- 1 root root 5848 Jun 28 21:21 /usr/lib/sparcv9/select_preload.so
teal / % ls -ld /usr/lib/select_preload.so
/usr/lib/select_preload.so: No such file or directory
teal /export/home/drkirkby % cat select_preload.c
/*
* Select roundup preload. (casper.***@xxxxxxxxxxxxxx)
* cc -G -Kpic select_preload.c -o select_preload.so
*
*/
#include <dlfcn.h>
#include <sys/time.h>
#define FUN_PROTO(type,internal,parms) \
type internal parms
#define DECLARE(type,name, parms) static FUN_PROTO(type,(*name), parms)
#define CAST(type, parms) (FUN_PROTO(type,(*), parms))
DECLARE(int,next_select,(int, fd_set *, fd_set *, fd_set *, struct timeval *));
#ifdef __GNUC__
void loadit(void) __attribute__ ((constructor));
#else
#pragma init(loadit)
#endif
void
loadit(void)
{
extern char **environ;
char **env;
int offset;
next_select = CAST(int, (int, fd_set *, fd_set *, fd_set *, struct timeval *
))dlsym(RTLD_NEXT, "select");
}
int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
fd_set *restrict errorfds, struct timeval *restrict timeout)
{
if (timeout != NULL && timeout->tv_sec == 0 && timeout->tv_usec > 0 &&
timeout->tv_usec < 1000)
timeout->tv_usec = 1000;
return (next_select(nfds, readfds, writefds, errorfds, timeout));
}
--
Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.
http://witm.sourceforge.net/ (Web based Mathematica front end)
.
- Follow-Ups:
- Re: open failed: illegal insecure pathname
- From: Casper H . S . ***
- Re: open failed: illegal insecure pathname
- From: Rainer Beushausen
- Re: open failed: illegal insecure pathname
- Prev by Date: Power On Self Test Failed: Memory check Blk test failed
- Next by Date: Re: SYSLOG_FAILED_LOGINS
- Previous by thread: Power On Self Test Failed: Memory check Blk test failed
- Next by thread: Re: open failed: illegal insecure pathname
- Index(es):