TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [TCLUG:6998] more compile help -- imsp
Thanks! I got it to compile!
A few questions though. One, when I compiled I got:
prot.c:45: conflicting types for `sys_errlist'
/usr/include/stdio.h:553: previous declaration of `sys_errlist'
prot.c: In function `prot_settimeout':
prot.c:155: warning: passing arg 2 of `signal' from incompatible pointer
type
make: *** [prot.o] Error 1
and ended up commenting out line 553 from stdio.h -- is there something
better to do?
imsp was loading signals.h. /usr/include/signals.h and
/usr/include/sys/signals.h (which are different) do not mention SIGEMT or
SIGSYS in them. So I commented them out -- is there a better way to fix
this? This is a default Mandrake 6.0 install.
Thanks though -- it compiled and I'm working on getting authorization to
work now.
Ben
> > 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
>
Ben Luey
lueyb@carleton.edu
ICQ: 19144397
It's better to spend the money we have now more wisely than to spend a lot
more money after the fact on the dysfunction we've created.
-- Democratic Representative Earl Blumenauer (Ore.)