Problemas compilando el authsrv del TIS firewall toolkit
Hola a todos/as
Me he bajado el juego de herramientas TIS para montar un cortafuegos, y
todo ha ido bien, salvo la parte del authsrv. Compilar se compila todo
sin problemas, pero a la hora de compilar el authsrv da el siguiente
mensaje:
#make clean && make
rm -f ../libauth.a *.o authmgr authsrv authdump authload snkkey
gcc -I.. -g -DLINUX -c cliio.c
ar rcv ../libauth.a cliio.o
a - cliio.o
ranlib ../libauth.a
gcc -I.. -g -DLINUX -c authmgr.c -o authmgr.o
gcc -g -static -o authmgr authmgr.o ../libauth.a ../libfwall.a
gcc -I.. -g -DLINUX -c authsrv.c -o authsrv.o
gcc -I.. -g -DLINUX -c proto.c
gcc -I.. -g -DLINUX -c db.c -o db.o
gcc -I.. -g -DLINUX -c pass.c -o pass.o
gcc -I.. -g -DLINUX -c srvio.c
gcc -g -static -o authsrv authsrv.o proto.o db.o pass.o srvio.o
../libauth.a ../libfwall.a -ldb
pass.o: In function `passverify':
/home/carlosv/ftp.tislabs.com/pub/firewalls/toolkit/dist/fwtk-9ab166/fwtk/auth/pass.c:39:
undefined reference to `crypt'
pass.o: In function `passset':
/home/carlosv/ftp.tislabs.com/pub/firewalls/toolkit/dist/fwtk-9ab166/fwtk/auth/pass.c:70:
undefined reference to `crypt'
collect2: ld returned 1 exit status
make: *** [authsrv] Error 1
...y aquí se queda
Os mando el código, a ver si se os ocurre algo. He revisado los
makefiles, y está todo en orden.
/*-
* 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
#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
Un saludo a todos
P.D. A los de la lista debian una disculpa; esto es un poco offtopic,
pero es que ando muy desdesperado
Reply to: