Author |
Message
|
jonesn |
Posted: Thu Dec 17, 2009 7:09 am Post subject: 64 & 32 bit applications |
|
|
Apprentice
Joined: 09 Jan 2002 Posts: 47
|
Chaps,
I am trying to understand how executables (such as dspmq or even an in house written one) pick up the correct version of libraries at run time on AIX when running MQ 6.0.2.x.
I am happy with building an executable against a shared library & then using LIBPATH or LD_LIBRARY_PATH to resolve the correct version of the shared library at run time.
What I do not understand is how the executable locates the correct library when the MQ manuals instruct you to unset LIBPATH & LD_LIBRARY_PATH.
Is there another way to configure an application to look for its shared libraries?
Thanks _________________ ---
Nick Jones
IBM Certified Solutions Expert (WebSphere MQ Integrator) |
|
Back to top |
|
 |
gunter |
Posted: Thu Dec 17, 2009 7:31 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
IBM puts the mq-libs in the standard lib path(at least on Solaris).
The most binaries are using the setuid and/or setgid bit. LD_LIBRARY_PATH has no effect if this is set. Maybe it is the same on AIX. _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
jonesn |
Posted: Thu Dec 17, 2009 8:45 am Post subject: |
|
|
Apprentice
Joined: 09 Jan 2002 Posts: 47
|
Gunter,
I am not sure how setuid & setgid has anything to do with how a program finds the shared libraries it needs at run time. Could you explain please?
Thanks _________________ ---
Nick Jones
IBM Certified Solutions Expert (WebSphere MQ Integrator) |
|
Back to top |
|
 |
gunter |
Posted: Thu Dec 17, 2009 11:51 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
It's for security reasons. If you are able to change the library path, you are also able to call functions on modified libraries with the accessrights(maybe root) of the owner or group. Therefore it is a good idea not to allow changing the path if the setuid-, setguid bit is set. Only an admin is able to put such a library in the search path. _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
mvic |
Posted: Tue Dec 22, 2009 4:29 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
gunter wrote: |
The most binaries are using the setuid and/or setgid bit. |
This is only true of MQ product executables. But not true of user-written applications, which must load a few of the same libraries. |
|
Back to top |
|
 |
mvic |
Posted: Tue Dec 22, 2009 4:35 pm Post subject: Re: 64 & 32 bit applications |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
jonesn wrote: |
I am trying to understand how executables (such as dspmq or even an in house written one) pick up the correct version of libraries at run time on AIX when running MQ 6.0.2.x. |
There are symlinks in /usr/lib.
Ah, you said "correct". So I guess you mean how does a 64-bit app get 64-bit libs.. then read on.
Quote: |
Is there another way to configure an application to look for its shared libraries?
Thanks |
I hope you found the parts of the manual that help with this.
Please search for the word lib64 at http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp
Ensure you
- check out the way of embedding search paths in your application programs at link time
- scroll down to the hits near the end entitled "Implications of a 64-bit queue manager"
If it's not all clear after that, please do follow up with further questions..
HTH |
|
Back to top |
|
 |
gunter |
Posted: Wed Dec 23, 2009 12:59 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
|
Back to top |
|
 |
|