home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5202 comp.mail.mh:1265
- Path: sparky!uunet!spool.mu.edu!umn.edu!msus1.msus.edu!gacvx2.gac.edu!noc.msc.net!news.stolaf.edu!guenther
- Newsgroups: comp.unix.programmer,comp.mail.mh
- Subject: Re: setuid programs and calls...
- Message-ID: <GUENTHER.92Nov6154622@spectre.stolaf.edu>
- From: guenther@stolaf.edu (Philip A Guenther)
- Date: 6 Nov 92 15:46:22
- Sender: news@news.stolaf.edu
- References: <1992Nov5.220832.3217@spectrum.xerox.com>
- Organization: Academic Computing Center, St. Olaf College
- In-Reply-To: leisner@wrc.xerox.com's message of Thu, 5 Nov 1992 22:08:32 GMT
- Lines: 29
-
- In article <1992Nov5.220832.3217@spectrum.xerox.com> leisner@wrc.xerox.com ( Marty Leisner) writes:
-
- <text showing that a program that worked normally, couldn't find a
- library when made setuid root>
-
- I don't understand why it can't find the shared library doing
- setruid instead of setuid (I see nothing else different (except for
- the i).
-
- What am I missing? This doesn't make sense to me...
-
- ld.so is the name of the runtime linker. It is invoked before main()
- to finish linking in any unresolved symbols. There is a danger
- inherent in runtime linking. If someone runs a dynamically linked
- program with LDLIBRARYPATH set to have ~/lib first, he make his own
- insecure version of libc.so. By then running a setuid root program,
- he could do *anything*. To prevent this, ld.so doesn't even look at
- LDLIBRARYPATH when ivoked by a setuid program. It will only use those
- libraries in /usr/lib /usr/local/lib and those specified by -L on the
- compilation command line. The exact set of directories it will always
- look in is system dependent, so check the manpage on your system for
- ld.so for the *full* story.
-
- Philip Guenther
- --
- guenther@stolaf.edu (Philip Guenther) | The ACC might agree with me,
- Student Sys Prog, Academic Computing Center | but with that bunch, (and me)
- St Olaf College, Northfield, MN 55057-1001 | you never know... :-) :-| :-(
- "Life makes sense? LIFE MAKES SENSE!!? Where do people get these ideas?"-me
-