update to radiusd-cistron 1.6.5

This commit is contained in:
danh 2001-12-17 20:47:47 +00:00
parent e9a62c722a
commit 59481d7c91
10 changed files with 56 additions and 138 deletions

View File

@ -1,10 +1,9 @@
# $OpenBSD: Makefile,v 1.13 2001/11/20 18:54:55 danh Exp $
# $OpenBSD: Makefile,v 1.14 2001/12/17 20:47:47 danh Exp $
COMMENT= "Cistron RADIUS server"
VERSION= 1.6.4
VERSION= 1.6.5
DISTNAME= radiusd-cistron-${VERSION}
PKGNAME= radiusd-cistron-${VERSION}p1
CATEGORIES= net
NEED_VERSION= 1.496
MASTER_SITES= ftp://ftp.radius.cistron.nl/pub/radius/ \
@ -25,15 +24,11 @@ MAKE_FILE= Makefile.BSD
MAKE_FLAGS+= CC="${CC}" CFLAGS="${CFLAGS} -DNOSHADOW -DNDBM" LCRYPT=""
FAKE_FLAGS+= BINDIR='${WRKINST}${PREFIX}/bin' \
SBINDIR='${WRKINST}${PREFIX}/sbin' \
MANDIR='${WRKINST}${PREFIX}/man' \
RADIUS_DIR='${WRKINST}${PREFIX}/share/examples/radiusd-cistron'
NO_REGRESS= Yes
post-install:
${INSTALL_MAN} ${WRKDIST}/doc/naslist.5rad ${PREFIX}/man/man5/naslist.5
${INSTALL_MAN} ${WRKDIST}/doc/clients.5rad ${PREFIX}/man/man5/clients.5
${INSTALL_MAN} ${WRKDIST}/doc/builddbm.8rad \
${PREFIX}/man/man8/builddbm.8
${INSTALL_MAN} ${WRKDIST}/doc/radiusd.8 ${PREFIX}/man/man8
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/radiusd-cistron
@for file in ${WRKDIST}/doc/README* ; do \
${INSTALL_DATA} $$file ${PREFIX}/share/doc/radiusd-cistron; \

View File

@ -1,3 +1,3 @@
MD5 (radiusd-cistron-1.6.4.tar.gz) = a76babebdd64bc289d5d814dbc2f2c10
RMD160 (radiusd-cistron-1.6.4.tar.gz) = 0f38118f9b03a6f3355031e2e700f67bd041e3c5
SHA1 (radiusd-cistron-1.6.4.tar.gz) = df2b8790c09d077218685d1811dae0126cf0d2b9
MD5 (radiusd-cistron-1.6.5.tar.gz) = e00cd4b1afd4876d907278c5173e7977
RMD160 (radiusd-cistron-1.6.5.tar.gz) = cde14bb9bccb71671e66822c16e14e5bf756520f
SHA1 (radiusd-cistron-1.6.5.tar.gz) = 7887099977230db5e17a572a55a85747fdc0c8ca

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_acct_c,v 1.2 2000/09/06 19:05:25 danh Exp $
--- src/acct.c.orig Fri Aug 18 16:40:30 2000
+++ src/acct.c Wed Sep 6 14:54:22 2000
@@ -596,7 +596,7 @@ int rad_accounting_orig(AUTH_REQ *authre
UINT4 nas;
NAS *cl;
int flat = 0;
- long curtime;
+ time_t curtime;
int ret = 0;
struct stat st;
@@ -686,7 +686,7 @@ int rad_accounting_orig(AUTH_REQ *authre
/*
* Add non-protocol attibutes.
*/
- fprintf(outfd, "\tTimestamp = %ld\n", curtime);
+ fprintf(outfd, "\tTimestamp = %ld\n", (long) curtime);
switch(authtype) {
case 0:
fputs("\tRequest-Authenticator = Verified\n", outfd);

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_proxy_c,v 1.1 2001/11/20 18:54:55 danh Exp $
--- src/proxy.c.orig Tue Nov 20 12:59:28 2001
+++ src/proxy.c Tue Nov 20 13:00:39 2001
@@ -53,9 +53,8 @@ void random_vector(char *vector)
int randno;
int i;
- srand(time(0) + getpid());
for(i = 0;i < AUTH_VECTOR_LEN;) {
- randno = rand();
+ randno = arc4random();
memcpy(vector, &randno, sizeof(int));
vector += sizeof(int);
i += sizeof(int);

View File

@ -1,52 +0,0 @@
$OpenBSD: patch-src_radius_c,v 1.1 2001/11/20 18:54:55 danh Exp $
--- src/radius.c.orig Tue Nov 20 13:26:31 2001
+++ src/radius.c Tue Nov 20 13:33:21 2001
@@ -267,10 +267,11 @@ int calc_digest(u_char *digest, AUTH_REQ
*/
int calc_acctdigest(u_char *digest, AUTH_REQ *authreq)
{
- int secretlen;
+ char zero[AUTH_VECTOR_LEN];
+ char *recvbuf = authreq->data;
+ char *tmpbuf;
CLIENT *cl;
- char zero[AUTH_VECTOR_LEN];
- char * recvbuf = authreq->data;
+ int secretlen;
int len = authreq->data_len;
/*
@@ -283,13 +284,6 @@ int calc_acctdigest(u_char *digest, AUTH
}
/*
- * Copy secret into authreq->secret so that we can
- * use it with send_acct_reply()
- */
- secretlen = strlen(cl->secret);
- strNcpy(authreq->secret, cl->secret, sizeof(authreq->secret));
-
- /*
* Older clients have the authentication vector set to
* all zeros. Return `1' in that case.
*/
@@ -303,9 +297,17 @@ int calc_acctdigest(u_char *digest, AUTH
* and calculate the MD5 sum. This must be the same
* as the original MD5 sum (authreq->vector).
*/
+ secretlen = strlen(authreq->secret);
memset(recvbuf + 4, 0, AUTH_VECTOR_LEN);
- memcpy(recvbuf + len, cl->secret, secretlen);
- md5_calc(digest, recvbuf, len + secretlen);
+
+ if ((tmpbuf = malloc(len + secretlen)) == NULL) {
+ log(L_ERR|L_CONS, "no memory");
+ exit(1);
+ }
+ memcpy(tmpbuf, recvbuf, len);
+ memcpy(tmpbuf + len, authreq->secret, secretlen);
+ md5_calc(digest, tmpbuf, len + secretlen);
+ free(tmpbuf);
/*
* Return 0 if OK, 2 if not OK.

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_radtest_c,v 1.1 2001/11/20 18:54:55 danh Exp $
--- src/radtest.c.orig Tue Nov 20 13:04:08 2001
+++ src/radtest.c Tue Nov 20 13:04:26 2001
@@ -262,9 +262,8 @@ static void random_vector(char *vector)
int randno;
int i;
- srand(time(0));
for(i = 0;i < AUTH_VECTOR_LEN;) {
- randno = rand();
+ randno = arc4random();
memcpy(vector, &randno, sizeof(int));
vector += sizeof(int);
i += sizeof(int);

View File

@ -1,26 +1,26 @@
$OpenBSD: patch-src_sysdep_h,v 1.2 2000/09/06 19:05:25 danh Exp $
--- src/sysdep.h.orig Wed Aug 30 06:10:12 2000
+++ src/sysdep.h Wed Sep 6 14:52:44 2000
@@ -26,7 +26,7 @@ typedef unsigned long UINT4;
$OpenBSD: patch-src_sysdep_h,v 1.3 2001/12/17 20:47:47 danh Exp $
--- src/sysdep.h.orig Mon Dec 17 14:59:12 2001
+++ src/sysdep.h Mon Dec 17 15:01:14 2001
@@ -28,7 +28,7 @@ typedef unsigned long UINT4;
#include <string.h>
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
-#if defined(__FreeBSD__) || defined(bsdi)
+#if defined(__FreeBSD__) || defined(bsdi) || defined(__OpenBSD__)
# include <stdlib.h>
#else
# include <malloc.h>
@@ -71,5 +71,13 @@ typedef unsigned long UINT4;
# endif
# define ut_user ut_name
#endif
@@ -70,6 +70,13 @@ typedef unsigned long UINT4;
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(bsdi)
# ifndef UTMP_FILE
# define UTMP_FILE "/var/run/utmp"
+# endif
+# define ut_user ut_name
+#endif
+#if defined(__OpenBSD__)
+# include <utmp.h>
+# ifndef UTMP_FILE
+# define UTMP_FILE _PATH_UTMP
+# endif
+# define ut_user ut_name
+#endif
+
#endif /* SYSDEP_H_INCLUDED */
# endif
# define ut_user ut_name
#endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_version_c,v 1.1 2000/07/13 00:25:52 danh Exp $
--- src/version.c.orig Sun Apr 2 11:58:14 2000
+++ src/version.c Wed Jul 12 01:28:45 2000
@@ -90,6 +90,9 @@ void version(void)
$OpenBSD: patch-src_version_c,v 1.2 2001/12/17 20:47:47 danh Exp $
--- src/version.c.orig Mon Dec 17 15:01:33 2001
+++ src/version.c Mon Dec 17 15:02:28 2001
@@ -93,6 +93,9 @@ void version(void)
#if defined(bsdi)
fprintf(stderr," bsdi");
#endif

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2001/02/05 19:11:57 danh Exp $
# $OpenBSD: INSTALL,v 1.2 2001/12/17 20:47:47 danh Exp $
#
# exit on errors, use a sane path and install prefix
@ -32,12 +32,20 @@ do_install()
${CONFIG_DIR}/dictionary
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.ascend \
${CONFIG_DIR}/dictionary.ascend
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.bay \
${CONFIG_DIR}/dictionary.bay
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.cisco \
${CONFIG_DIR}/dictionary.cisco
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.cistron \
${CONFIG_DIR}/dictionary.cistron
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.compat \
${CONFIG_DIR}/dictionary.compat
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.erx \
${CONFIG_DIR}/dictionary.erx
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.livingston \
${CONFIG_DIR}/dictionary.livingston
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.redback \
${CONFIG_DIR}/dictionary.redback
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.shiva \
${CONFIG_DIR}/dictionary.shiva
install -m 0644 -o root -g wheel ${SAMPLE_DIR}/dictionary.tunnel \

View File

@ -1,29 +1,45 @@
@comment $OpenBSD: PLIST,v 1.2 2000/08/29 16:44:31 danh Exp $
@comment $OpenBSD: PLIST,v 1.3 2001/12/17 20:47:47 danh Exp $
@pkgcfl radiusd-lucent-*
bin/radclient
bin/radlast
bin/radtest
bin/raduse
bin/radwho
bin/radzap
man/man5/clients.5
man/man5/naslist.5
man/man8/builddbm.8
man/man1/radclient.1
man/man1/radlast.1
man/man1/radtest.1
man/man1/raduse.1
man/man1/radwho.1
man/man1/radzap.1
man/man5/clients.5rad
man/man5/naslist.5rad
man/man8/radiusd.8
sbin/checkrad
man/man8/radrelay.8
man/man8/radwatch.8
sbin/radiusd
sbin/radrelay
share/doc/radiusd-cistron/README
share/doc/radiusd-cistron/README.CVX
share/doc/radiusd-cistron/README.Y2K
share/doc/radiusd-cistron/README.cisco
share/doc/radiusd-cistron/README.makefile
share/doc/radiusd-cistron/README.pam
share/doc/radiusd-cistron/README.proxy
share/doc/radiusd-cistron/README.radrelay
share/doc/radiusd-cistron/README.simul
share/doc/radiusd-cistron/README.tunnel
share/doc/radiusd-cistron/README.usersfile
share/examples/radiusd-cistron/clients
share/examples/radiusd-cistron/dictionary
share/examples/radiusd-cistron/dictionary.ascend
share/examples/radiusd-cistron/dictionary.bay
share/examples/radiusd-cistron/dictionary.cisco
share/examples/radiusd-cistron/dictionary.cistron
share/examples/radiusd-cistron/dictionary.compat
share/examples/radiusd-cistron/dictionary.erx
share/examples/radiusd-cistron/dictionary.livingston
share/examples/radiusd-cistron/dictionary.redback
share/examples/radiusd-cistron/dictionary.shiva
share/examples/radiusd-cistron/dictionary.tunnel
share/examples/radiusd-cistron/dictionary.usr