C.J. Oster wrote:

> As you may have heard, wednessday morning RootShell was hacked via sshd.
> So to protect my self, I've been trying to build sshd 2.0.9.  There is one
> problem.  Everything compiles fine, but when linking, I get many undefined
> references to a function called stat().  'man 2 stat' gives me some
> headers, and they are all included.  What I want to know is how do I find
> out what library a function is in and link the binary to it.  Thanks for
> your help.

Does question 2.7 from the glibc FAQ help?

> 2.7.  Looking through the shared libc file I haven't found the
>         functions `stat', `lstat', `fstat', and `mknod' and while
>         linking on my Linux system I get error messages.  How is
>         this supposed to work?
> 
> {RM} Believe it or not, stat and lstat (and fstat, and mknod)
> are supposed to be undefined references in libc.so.6!  Your problem is
> probably a missing or incorrect /usr/lib/libc.so file; note that this
> is a small text file now, not a symlink to libc.so.6.  It should look
> something like this:
> 
> GROUP ( libc.so.6 ld.so.1 libc.a )
> 
> or in ix86/Linux and alpha/Linux:
> 
> GROUP ( libc.so.6 ld-linux.so.2 libc.a )

The other alternative is that you are trying to link against a library
which was built for libc-5, and which expects stat() to exist in libc.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to