mcserv / slackware / shadow

christian laubscher christian.laubscher at tiscalinet.ch
Fri Aug 23 06:54:07 UTC 2002


hi pavel!

thank you very much for your reply.


On Thu, Aug 22, 2002 at 12:42:55PM -0400, Pavel Roskin wrote:

> I appreciate that you finally found time to report this problem.

i accept the blame for the delay - my only excuse is that i was (am?) 
thinking it to be a problem i have caused myself, which would 
accordingly 'disappear' come time... ;-)


> You should not be patching config.h.in - it is generated by autoheader 
> from configure.in.

if i don't, it doesn't compile:

mcserv.c: In function `do_classic_auth':
mcserv.c:839: warning: implicit declaration of function `getspnam'
mcserv.c:839: warning: assignment makes pointer from integer without a cast
mcserv.c:842: dereferencing pointer to incomplete type
make[3]: *** [mcserv.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

i never invoked autoheader myself, though - wouldn't dare.
should i?


> The logic in configure.in is to check for shadow.h only if function 
> pw_encrypt has been found in -lshadow. 

it doesn't (from config.log):

configure:7863: checking for pw_encrypt in -lshadow
configure:7896: gcc -o conftest -O3 -Wall  -I$(top_srcdir) -s conftest.c -lshadow   -L/opt/gnome/lib -lglib >&5
/usr/i386-slackware-linux/bin/ld: cannot find -lshadow
collect2: ld returned 1 exit status
configure:7899: $? = 1
configure: failed program was:
#line 7870 "configure"


> You must have pw_encrypt in some other library. 
> Maybe it's in libcrypt? 

i think i don't have or use a pw_encrypt function; rather i assume the 
crypt function of libcrypt (part of openssl) is used.
from the generated config.h:

[...]

/* Define to 1 if you have the `crypt' function. */
#define HAVE_CRYPT 1

/* Define to 1 if you have the <crypt.h> header file. */
#define HAVE_CRYPT_H 1

[...]

/* Define if PAM (Pluggable Authentication Modules) is available */
/* #undef HAVE_PAM */

[...]

/* Define to 1 if you have the <shadow.h> header file. */
/* #undef HAVE_SHADOW_H */

/* Define to 1 if you have the <shadow/shadow.h> header file. */
/* #undef HAVE_SHADOW_SHADOW_H */

[...]

/* Define to use shadow passwords on Linux */
/* #undef LINUX_SHADOW */

[...]

/* Define if function `crypt' needs a prototype */
/* #undef NEED_CRYPT_PROTOTYPE */

[...]


> What happens if you don't add "-lcrypt" by hand?

it doesn't work, either: invalid password from mfcs.


> My guess is that mcserv is using PAM, and it's configured not to accept 
> the password for some reason.  That's one problem.

i don't think i have pam; i think my crypt library comes with openssl.
but i do have a shadow password file.

> The other problem is that the shadow support is not enabled on your
> system.  If you find the library that defines pw_encrypt(), it will be
> easy to fix properly.  Sorry, I don't have Slackware around.
 
seams i 'fixed' something the wrong way and refixed it to make it work, 
finally?


> You probably also have the third problem, that you fixed by patching
> mcserv.c.  But you should know that better.

maybe i only 'fixed' the things i twisted by cheating on config.h.in 
and -lcrypt...


thank you very much for your time!

regards,
christian

-- 



More information about the mc mailing list