Subject: More Problems

From: Sherif Yusuf <[email-masked]>
Date: Wed, 14 Feb 2001 17:06:30 +0000

[To be removed from this list send the message "unsubscribe fwtk-users" in the
BODY of a mail message to [email-masked].]

Dear All,

It's me again, Sherif Yusuf.  I managed to solve, with your help, the
problem of ndbm.h not existing.
Now I am faced with another problem which is:

make[1]: Entering directory
`/homes/sy99/Research/Ponder/AlomainyProj/fwtk/auth'
cc -g -static -o authsrv authsrv.o proto.o db.o pass.o srvio.o
../libauth.a ../libfwall.a    -lgdbm
pass.o: In function `passverify':
/homes/sy99/Research/Ponder/AlomainyProj/fwtk/auth/pass.c:39: undefined
reference to `crypt'
pass.o: In function `passset':
/homes/sy99/Research/Ponder/AlomainyProj/fwtk/auth/pass.c:70: undefined
reference to `crypt'
collect2: ld returned 1 exit status
make[1]: *** [authsrv] Error 1
make[1]: Leaving directory
`/homes/sy99/Research/Ponder/AlomainyProj/fwtk/auth'

Why is this so?!!!

This is the file that consists the two programs:

  * Copyright (c) 1993, Trusted Information Systems, Incorporated
  * All rights reserved.
  *
  * Redistribution and use are governed by the terms detailed in the
  * license document ("LICENSE") included with the toolkit.
  */

/*
  *      Author: Marcus J. Ranum, Trusted Information Systems, Inc.
  */
static  char    RcsId[] = "$Header:
/usr/home/rick/fwtk2.0/fwtk/auth/RCS/pass.c,v 1.2 1997/01/14 20:20:03
rick Exp $";
#include        <time.h>
#include        "firewall.h"
#include        "auth.h"

#ifdef  AUTHPROTO_PASSWORD

extern  char    *crypt();

passverify(user,pass,ap,rbuf)
char    *user;
char    *pass;
Auth    *ap;
char    *rbuf;
{
         char    lclpass[10];

         if(ap->pw[0] == '\0') {
                 strcpy(rbuf,"ok");
                 return(0);
         }

         if(pass == (char *)0)
                 goto reject;
         strncpy(lclpass, pass, 8);
         lclpass[8] = '\0';

         if(!strcmp(crypt(lclpass,ap->pw),ap->pw)) {
                 strcpy(rbuf,"ok");
                 return(0);
         }
reject:
         strcpy(rbuf,"Permission Denied.");
         return(1);
}

static unsigned char itoa64[] =         /* 0 ... 63 => ascii - 64 */

"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

passset(user,pass,ap,rbuf)
char    *user;
char    *pass;
Auth    *ap;
char    *rbuf;
{
         if(pass == (char *)0)
                 ap->pw[0] = '\0';
         else {
                 time_t  t;
                 char    salt[2];

                 time(&t);
                 salt[0] = itoa64[getpid() & 0x3f];
                 salt[1] = itoa64[(int)t & 0x3f];
                 if(strlen(pass) > 7)
                         pass[8] = '\0';
                 strncpy(ap->pw,crypt(pass,salt),AUTH_PWSIZ);
         }
         if(auth_dbputu(user,ap) == 0)
                 sprintf(rbuf,"Password for %s changed.",user);
         else
                 strcpy(rbuf,"Database error.");
         return(0);
}
#endif

Please help

Thanks
Sherif
[email-masked]

---

From: Rick Murphy <[email-masked]>
Date: Wed, 14 Feb 2001 20:49:30 -0500

>/homes/sy99/Research/Ponder/AlomainyProj/fwtk/auth/pass.c:39: undefined

Read "Makefile.config" - where it reads:
# Some versions of Linux have broken the crypt() function out into a
# separate library - uncomment the following line if authsrv fails to build.
#AUXLIB= -lcrypt

You'll need to uncomment the AUXLIB line (remove the leading "#").
         -Rick