mcserv / slackware / shadow



for two or more years now i have to twist some corners in order to use 
mcserv (very useful, indeed!) successfully in my slackware (now 8.0) 
environment.

i apply the following two patches (4.6.0-pre1, but this is *not a 
4.6.0-pre1 problem!):

--- config.h.in.Original        Wed Aug 21 09:32:50 2002
+++ config.h.in Thu Aug 22 12:10:05 2002
@@ -238,7 +238,7 @@
 #undef HAVE_SETUID
 
 /* Define to 1 if you have the <shadow.h> header file. */
-#undef HAVE_SHADOW_H
+#define HAVE_SHADOW_H 1
 
 /* Define to 1 if you have the <shadow/shadow.h> header file. */
 #undef HAVE_SHADOW_SHADOW_H


--- mcserv.c.Original   Fri Aug  2 06:36:04 2002
+++ mcserv.c    Thu Aug 22 08:47:14 2002
@@ -824,8 +824,8 @@
 {
     struct passwd *this;
     int ret;
-#ifdef LINUX_SHADOW
     struct spwd *spw;
+#ifdef LINUX_SHADOW
     extern char *pw_encrypt (char *, char *);
 #else
 #ifdef NEED_CRYPT_PROTOTYPE
@@ -836,11 +836,11 @@
     if ((this = getpwnam (username)) == 0)
        return 0;
 
-#ifdef LINUX_SHADOW
     if ((spw = getspnam (username)) == NULL)
         this->pw_passwd = "*";
     else
         this->pw_passwd = spw->sp_pwdp;
+#ifdef LINUX_SHADOW
     if (strcmp (pw_encrypt (password, this->pw_passwd), this->pw_passwd) == 0)
         ret = 1;
     else


in addition, i use the -lcrypt linking directive:

CFLAGS='-O3' LDFLAGS='-s -lcrypt' ./configure --prefix=/usr \
    --with-included-slang --without-gpm-mouse --with-x=no \
    --with-catgets --with-samba --with-vfs --with-mcfs

if i don't do it this way, mcserv never accepts a password.

what am i missing?


-- 
email  christian laubscher tiscalinet ch



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]