TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:6998] more compile help -- imsp



> -----Original Message-----
> From: Ben Luey [mailto:lueyb@carleton.edu]
> Sent: Friday, July 16, 1999 1:08 PM
> To: tclug-list@listserv.real-time.com
> Subject: [TCLUG:6998] more compile help -- imsp
> 
> 
> Thanks for the compiling help. I acutally gave up on acap and 
> am trying
> imsp-1.5a6. First my sucess stories, then my problems.
> 
> I ran configure and then make all and I get:
> 
> imsp_server.c: In function `imsp_set_signals':
> imsp_server.c:312: `SIGEMT' undeclared (first use in this function)
> imsp_server.c:312: (Each undeclared identifier is reported only once
> imsp_server.c:312: for each function it appears in.)
> imsp_server.c:316: `SIGSYS' undeclared (first use in this function)
> make[1]: *** [imsp_server.o] Error 1
> 
> so I removed line 312 and 316 from imsp_server.c and it 
> appears to work.
> Is there a better thing to do? The lines are about wiping 
> passwords before
> a core dump, and since imsp will only be used locally, this 
> isn't a big
> deal if it doesn't dump the password.
>

Probably a "#include <signal.h>" is missing, if these are the only signals
being trapped.  If not, then its possible (very unlikely though) that these
signals are not in your /usr/include/signal.h. (it's either <signal.h> or
<sys/signal.h>, can't remember which).

> then it compiles for a while and I get:
> 
> gcc -g -O2  -o cyrus-imspd main.o dispatch.o imsp_server.o option.o
> syncdb.o adate.o bb.o im_util.o imap_client.o abook.o 
> authize.o alock.o
> login_unix_shadow.o proxy_unix_shadow.o ../lib/libcyrus.a  
> -lresolv -ldb
> -lndbm 
> login_unix_shadow.o: In function `login_plaintext':
> /home/lueyb/install/cyrus-imspd-v1.5a6/imsp/login_unix_shadow.c:46:
> undefined reference to `crypt'
> make[1]: *** [cyrus-imspd] Error 1
> 
> login_unix_shadow.c looks like this around line 46:
> 
> int
> login_plaintext(user, pass, reply)
> char *user;
> char *pass;
> char **reply;
> {
>     struct spwd *pwd;
>     extern char *crypt();
> 
>     pwd = getspnam(user);
>     if (!pwd) return 1;
> 
>     if (strcmp(pwd->sp_pwdp, crypt(pass, pwd->sp_pwdp)) != 0) 
> {   -- line46
>         *reply = "wrong password";
>         return 1;
>     }
> 
>     return 0;
> }
> 
> 
> am I missing some crypt library or something? I have 
> libcrypt.a and .so
> also libcrypt.so.1 and libcrypt-2.1.1.so 
> 

Yes exactly.  Assuming that crypt() is defined in libcrypt (you can confirm
this using "nm libcrypt.a | grep crypt", if nm is available on linux, damn i
wish i was home), it looks as though libcrypt is not part of the list of
objects/libs being linked by gcc.  The gcc line should include a -lcrypt as
shown below.

gcc -g -O2  -o cyrus-imspd main.o dispatch.o imsp_server.o option.o
syncdb.o adate.o bb.o im_util.o imap_client.o abook.o authize.o alock.o
login_unix_shadow.o proxy_unix_shadow.o ../lib/libcyrus.a  
-lresolv -ldb-lndbm -lcrypt

Since you're probably running this from a makefile, look for -lndbm and add
-lcrypt to the line.  (Alternatively you could also give "<path>/libcrypt.a"
instead.)

Good Luck.

-Unni