Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Does the io-pkt instance allow to mount a lsm module that will also dynamic link to another lib file?: (6 Items)
   
Does the io-pkt instance allow to mount a lsm module that will also dynamic link to another lib file?  
Hi, I get a problem in implementing a packet filtering lsm module for io-pkt.

For example, I implement a lsm-pf.so that is used to be mount to io-pkt instance.  The lsm.so will dynamic link to 
another libtest.so that is implemented by myself.

I found if I didn't put the libtest.so to the system library folder, such as /lib/, /usr/lib, etc, the lsm-pf.so won't 
find the libtest.so even I already set my library to the LD_LIBRARY_PATH.  

Is it a limitation for io-pkt's packet filtering mechanism?

Re: Does the io-pkt instance allow to mount a lsm module that will also dynamic link to another lib file?  
Hi,
have you tried to add the path of your shared object to the system configuration path?

e.g. setconf _CS_LIBPATH `getconf _CS_LIBPATH`:/your/path

(haven't tried this, just the idea)

It is quite possible that io-pkt only evaluates this variable.

Regards,
Albrecht
Re: Does the io-pkt instance allow to mount a lsm module that will also dynamic link to another lib file?  
Hi, 

I didn't use the utilty setconfig/getconfig.  I edit the /etc/profile directly and add my library folder to the value of
 LD_LIBRARY_PATH.  But it doesn't work.
Re: Does the io-pkt instance allow to mount a lsm module that will also dynamic link to another lib file?  
That's why I suggested to additionally add your lib path to the _CS_LIBPATH variable. These two variables are not synced
 by QNX OS. Also /etc/profile may not be executed on system boot, only in interactive login shell.
Re: Does the io-pkt instance allow to mount a lsm module that will also dynamic link to another lib file?  
No, I've done the test.  setconf to _CS_LIBPATH variable still doesn't work for dynamic link library finding.
Re: Does the io-pkt instance allow to mount a lsm module that will also dynamic link to another lib file?  
Ok. then I fear you have to put the file in /lib/dll. Maybe a symlink can help. It is quite possible that only a hard-
coded set of paths is used to search for dynamic modules, might be a security issue.

Regards,
Albrecht