-($Id: ChangeLog,v 1.33 2001-05-08 15:43:30 rufustfirefly Exp $)
+($Id: ChangeLog,v 1.34 2001-05-08 18:03:18 rufustfirefly Exp $)
2001-05-08 jeff b <jeff@univrel.pr.uconn.edu>
* bin/megatron/Makefile.am, etc/uams/Makefile.am: small Makefile fixes
from Olaf Hering <olh@suse.de>
+ * etc/uams/uams_dhx_passwd.c: Tru64 fixes from Burkhard Schmidt
+ <bs@cpfs.mpg.de>
+
2001-05-07 jeff b <jeff@univrel.pr.uconn.edu>
* contrib/shell_utils/netatalkshorternamelinks.pl: added script to
/*
- * $Id: uams_dhx_passwd.c,v 1.6 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_dhx_passwd.c,v 1.7 2001-05-08 18:03:19 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
static struct passwd *dhxpwd;
static u_int8_t randbuf[16];
+#ifdef DIGITAL_UNIX_SECURITY
+#include <sys/types.h>
+#include <sys/security.h>
+#include <prot.h>
+#endif /* DIGITAL_UNIX_SECURITY */
+
/* dhx passwd */
static int passwd_login(void *obj, struct passwd **uam_pwd,
char *ibuf, int ibuflen,
char *name;
DH *dh;
+#ifdef TRU64
+ static const char rnd_seed[] = "string to make the random number generator think it has entropy";
+ RAND_seed(rnd_seed, sizeof rnd_seed);
+#endif
+
*rbuflen = 0;
if (uam_afpserver_option(obj, UAM_OPTION_USERNAME, (void *) &name, &i) < 0)
u_int16_t sessid;
char *p;
+#ifdef DIGITAL_UNIX_SECURITY
+ char *bigcrypt();
+ struct pr_passwd *pr;
+#endif /* DIGITAL_UNIX_SECURITY */
+
*rbuflen = 0;
/* check for session id */
BN_free(bn3);
rbuf[PASSWDLEN] = '\0';
+#ifdef DIGITAL_UNIX_SECURITY
+ pr = getprpwnam( dhxpwd->pw_name );
+ if ( pr == NULL )
+ return AFPERR_NOTAUTH;
+ if ( strcmp ( bigcrypt ( rbuf, pr->ufld.fd_encrypt ),
+ pr->ufld.fd_encrypt ) == 0 ) {
+ *uam_pwd = dhxpwd;
+ return AFP_OK;
+ }
+#else /* DIGITAL_UNIX_SECURITY */
p = crypt( rbuf, dhxpwd->pw_passwd );
memset(rbuf, 0, PASSWDLEN);
if ( strcmp( p, dhxpwd->pw_passwd ) == 0 ) {
*uam_pwd = dhxpwd;
return AFP_OK;
}
+#endif /* DIGITAL_UNIX_SECURITY */
return AFPERR_NOTAUTH;
}