[krbdev.mit.edu #6671] login.c:(.text+0x281): undefined reference to `crypt

Ken Raeburn via RT rt-comment at krbdev.mit.edu
Mon Mar 1 10:01:23 EST 2010


On Mar 1, 2010, at 04:18, steve paesani via RT wrote:
> make error:
> login.c:(.text+0x281): undefined reference to `crypt
> 
> I've tried modifying the Makefile where the code in question is 'cclinked':
> -L./lib
> no success
> -l:/usr/local/lib/libcrypto.so
> no success
> -l:/usr/local/lib/libcrypto.a
> no success
> -l/usr/local/lib
> redundant, yes. no success.
> 
> I would need some help identifying which library needs to be linked.
> 
> ps
> login.c refers to crypt with two different signatures:
> char* crypt();
> and
> ... crypt(args....);
> this passes compilation yet I don't know what affect, if any, this has on
> linking. If someone could give me a heads up on the two different crypt
> references in login.c that would be nice, thanks.

The crypt function is the traditional way of generating the hashed-password strings in /etc/passwd (or, these days, /etc/shadow).  It's used in login.c to allow logins based on local passwords in addition to Kerberos passwords.  Usually that function is in the standard C library; you don't say what type of OS you're on, but perhaps it's in another library there?

Ken


-- 
Ken Raeburn / raeburn at mit.edu / no longer at MIT Kerberos Consortium





More information about the krb5-bugs mailing list