Operating System - HP-UX
1833017 Members
2159 Online
110048 Solutions
New Discussion

swinstall scripts run as setid on 11.22

 
Stuart Jarriel
Occasional Contributor

swinstall scripts run as setid on 11.22

I have a product install that tries to execute
the product binaries as part of the postinstall scripts. The product binaries link with shared libraries provided by the product, so the binary relies on SHLIB_PATH to locate the binaries. However SHLIB_PATH is not honored when the script is executed by swagentd as part of the product install. The same script works fine from a root shell. THe same script also works fine from swagentd on 11.0 and 11.i. How does HPUX 11.22 dld.so determine when to honor SHLIB_PATH? Logging has shown that real UID == effective UID, so there must be some other way.
3 REPLIES 3
Jeff Schussele
Honored Contributor

Re: swinstall scripts run as setid on 11.22

Hi Stuart,

I would normally do this sort of thing - firing up the newly installed SW - at the end of the configure script.
I've successfully done this in the past.
And I'd manually set the SHLIB_PATH in that configure script.
I think you're running into this problem because the SW isn't *actually* installed until it runs through the configure phase.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Stuart Jarriel
Occasional Contributor

Re: swinstall scripts run as setid on 11.22

Jeff

I misspoke in my original post. The attempt
to use the command is at the tail of my
configure script. postinstall is already
completed. If I list my SHLIB_PATH directory
during my 'command script' all of the
libraries are installed and have the correct
permissions/mode.

This is also unique to 11.22. I have the
exact same scripts for the 11.0/11.i product
and they work as expected. This may be partly
due to the fact that 11.0/11.i does honor
SHLIB_PATH, even on setuid programs (unless
you have a security patch installed). Its
interesting that there is no equivalent of
ldconfig on HPUX; there is no way for me to
have dld.so 'find' my libraries, even if
I copy them to /usr/lib/hpux32.

thanks
stuart
Jeff Schussele
Honored Contributor

Re: swinstall scripts run as setid on 11.22

OK, I see.
What I do if the newly installed SW is auto-started out of a /sbin/init.d script is to call that script to start it as I set all the env stuff in there.
Seems to work for me.
You may want to try to write a script that does this & call this script to start the SW instead of relying on the shell that swinstall uses or spawns.

Rgds,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!