mysterious shared library problem (setuid problem?)

mysterious shared library problem (setuid problem?)

Post by Yaron M. Mins » Mon, 22 Sep 1997 04:00:00



This problem just gets stranger and stranger.  I discovered that my xterm
programs (nxterm and xterm) were setuid root (why are they setuid root, by the
way?  It seems to be standard with the package, but I can't imagine why.)  Once
I get rid of the setuid root bit, the work fine.  But other programs that are
run using setuid seem to have the same problem.  In particular, if I run a
program through at, it barfs for lack of libraries.  Similarly if my httpd
daemon tries to run a cgi script.

Any ideas?
TIA,
Yaron

--
/- Yaron M. Minsky --------------------------------------------\
    H: (315) 423-9907                        O: (607) 255-4934
    109 Comstock Pl. Apt. #3, Syracuse NY      4139 Upson Hall
\------------------- http://www.cs.cornell.edu/home/yminsky/ --/

 
 
 

mysterious shared library problem (setuid problem?)

Post by Yaron M. Mins » Mon, 22 Sep 1997 04:00:00


Solved!  For anyone who's curious, here's the story:  for good reasons, setuid
programs do not look at LD_LIBRARY_PATH for their libraries:  rather, for
security's sake, they always look at /etc/ld.so.conf.  Somehow, my ld.so.conf
had gotten corrupted.  I restored it, and all returned to normal.

Yaron
--
/- Yaron M. Minsky --------------------------------------------\
    H: (315) 423-9907                        O: (607) 255-4934
    109 Comstock Pl. Apt. #3, Syracuse NY      4139 Upson Hall
\------------------- http://www.cs.cornell.edu/home/yminsky/ --/

 
 
 

1. mysterious shared library problem

I'm having a somewhat mysterious shared library problem.  In particular, for
some odd reason, xterm and nxterm can't find any of the X libraries they need.
Other programs, such as xclock, have no problems, even though they require the
same library.  Here's what ldd returns for xterm and xclock:

      flapdragon: bin $ ldd xterm
              libXaw.so.6 => not found
              libXmu.so.6 => not found
              libXt.so.6 => not found
              libSM.so.6 => not found
              libICE.so.6 => not found
              libXext.so.6 => not found
              libX11.so.6 => not found
              libtermcap.so.2 => /lib/libtermcap.so.2.0.8
              libc.so.5 => /lib/libc.so.5.3.12

      flapdragon: bin $ ldd xclock
              libXaw.so.6 => /usr/X11/lib/libXaw.so.6
              libXmu.so.6 => /usr/X11/lib/libXmu.so.6
              libXt.so.6 => /usr/X11/lib/libXt.so.6
              libSM.so.6 => /usr/X11/lib/libSM.so.6
              libICE.so.6 => /usr/X11/lib/libICE.so.6
              libXext.so.6 => /usr/X11/lib/libXext.so.6
              libX11.so.6 => /usr/X11/lib/libX11.so.6
              libc.so.5 => /lib/libc.so.5.3.12

To make matters weirder, xterm starts up just fine if run as root.

Does anyone have any idea what's going on here?  I've tried rerunning ldconfig,
to no avail.  I'm running Redhat 4.2, with ld.so-1.7.14-5, XFree86-3.3.1-1,
XFree86-libs-3.3.1-1.  This problem started suddenly.  I'm not quite sure what
the cause was, but I was upgrading to new python and mysql rpms.

--
/- Yaron M. Minsky --------------------------------------------\
    H: (315) 423-9907                        O: (607) 255-4934
    109 Comstock Pl. Apt. #3, Syracuse NY      4139 Upson Hall
\------------------- http://www.cs.cornell.edu/home/yminsky/ --/

2. unix shell account

3. setuid programs and shared library problems

4. Switchbox + mouse = braindead mouse?

5. shared libraries and setuid programs

6. how to moditify route

7. shared library and setuid process

8. Linux + Maxtor 7540AV??

9. Loading shared libraries from a setuid program

10. Will strip(debug shared library) == nodebug shared library ?

11. Help with building shared libraries with dependencies on other shared libraries

12. Question: Inclusion of shared libraries during linking of shared libraries

13. Shared library loading shared library.