Simplified and cleaned up the radiusclient implementation, and
authorPaul Mackerras <paulus@samba.org>
Sun, 14 Nov 2004 07:26:26 +0000 (07:26 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 14 Nov 2004 07:26:26 +0000 (07:26 +0000)
made it use pppd facilities where relevant.  All the bits of
radiusclient that we actually need are now in the plugins/radius
directory.

117 files changed:
pppd/plugins/radius/COPYRIGHT [new file with mode: 0644]
pppd/plugins/radius/Makefile.linux
pppd/plugins/radius/avpair.c [new file with mode: 0644]
pppd/plugins/radius/buildreq.c [new file with mode: 0644]
pppd/plugins/radius/clientid.c [new file with mode: 0644]
pppd/plugins/radius/config.c [new file with mode: 0644]
pppd/plugins/radius/dict.c [new file with mode: 0644]
pppd/plugins/radius/etc/dictionary [new file with mode: 0644]
pppd/plugins/radius/etc/dictionary.ascend [new file with mode: 0644]
pppd/plugins/radius/etc/dictionary.compat [new file with mode: 0644]
pppd/plugins/radius/etc/dictionary.merit [new file with mode: 0644]
pppd/plugins/radius/etc/dictionary.microsoft [new file with mode: 0644]
pppd/plugins/radius/etc/issue [new file with mode: 0644]
pppd/plugins/radius/etc/port-id-map [new file with mode: 0644]
pppd/plugins/radius/etc/radiusclient.conf [new file with mode: 0644]
pppd/plugins/radius/etc/radiusclient.conf.in [new file with mode: 0644]
pppd/plugins/radius/etc/realms [new file with mode: 0644]
pppd/plugins/radius/etc/servers [new file with mode: 0644]
pppd/plugins/radius/includes.h [new file with mode: 0644]
pppd/plugins/radius/ip_util.c [new file with mode: 0644]
pppd/plugins/radius/lock.c [new file with mode: 0644]
pppd/plugins/radius/md5.c [new file with mode: 0644]
pppd/plugins/radius/options.h [new file with mode: 0644]
pppd/plugins/radius/pathnames.h [new file with mode: 0644]
pppd/plugins/radius/radius.c
pppd/plugins/radius/radiusclient.h [new file with mode: 0644]
pppd/plugins/radius/radiusclient/BUGS [deleted file]
pppd/plugins/radius/radiusclient/CHANGES [deleted file]
pppd/plugins/radius/radiusclient/COPYRIGHT [deleted file]
pppd/plugins/radius/radiusclient/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/README [deleted file]
pppd/plugins/radius/radiusclient/README.radexample [deleted file]
pppd/plugins/radius/radiusclient/acconfig.h [deleted file]
pppd/plugins/radius/radiusclient/aclocal.m4 [deleted file]
pppd/plugins/radius/radiusclient/config.guess [deleted file]
pppd/plugins/radius/radiusclient/config.h.in [deleted file]
pppd/plugins/radius/radiusclient/config.sub [deleted file]
pppd/plugins/radius/radiusclient/configure [deleted file]
pppd/plugins/radius/radiusclient/configure.in [deleted file]
pppd/plugins/radius/radiusclient/doc/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/doc/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/doc/instop.html [deleted file]
pppd/plugins/radius/radiusclient/etc/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/etc/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/etc/dictionary [deleted file]
pppd/plugins/radius/radiusclient/etc/dictionary.ascend [deleted file]
pppd/plugins/radius/radiusclient/etc/dictionary.compat [deleted file]
pppd/plugins/radius/radiusclient/etc/dictionary.merit [deleted file]
pppd/plugins/radius/radiusclient/etc/dictionary.microsoft [deleted file]
pppd/plugins/radius/radiusclient/etc/issue [deleted file]
pppd/plugins/radius/radiusclient/etc/port-id-map [deleted file]
pppd/plugins/radius/radiusclient/etc/radiusclient.conf.in [deleted file]
pppd/plugins/radius/radiusclient/etc/realms [deleted file]
pppd/plugins/radius/radiusclient/etc/servers [deleted file]
pppd/plugins/radius/radiusclient/include/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/include/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/include/includes.h [deleted file]
pppd/plugins/radius/radiusclient/include/messages.h [deleted file]
pppd/plugins/radius/radiusclient/include/pathnames.h [deleted file]
pppd/plugins/radius/radiusclient/include/radiusclient.h [deleted file]
pppd/plugins/radius/radiusclient/install-sh [deleted file]
pppd/plugins/radius/radiusclient/lib/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/lib/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/lib/avpair.c [deleted file]
pppd/plugins/radius/radiusclient/lib/buildreq.c [deleted file]
pppd/plugins/radius/radiusclient/lib/clientid.c [deleted file]
pppd/plugins/radius/radiusclient/lib/config.c [deleted file]
pppd/plugins/radius/radiusclient/lib/dict.c [deleted file]
pppd/plugins/radius/radiusclient/lib/env.c [deleted file]
pppd/plugins/radius/radiusclient/lib/ip_util.c [deleted file]
pppd/plugins/radius/radiusclient/lib/lock.c [deleted file]
pppd/plugins/radius/radiusclient/lib/log.c [deleted file]
pppd/plugins/radius/radiusclient/lib/md5.c [deleted file]
pppd/plugins/radius/radiusclient/lib/memcmp.c [deleted file]
pppd/plugins/radius/radiusclient/lib/options.h [deleted file]
pppd/plugins/radius/radiusclient/lib/sendserver.c [deleted file]
pppd/plugins/radius/radiusclient/lib/strcasecmp.c [deleted file]
pppd/plugins/radius/radiusclient/lib/strdup.c [deleted file]
pppd/plugins/radius/radiusclient/lib/strerror.c [deleted file]
pppd/plugins/radius/radiusclient/lib/util.c [deleted file]
pppd/plugins/radius/radiusclient/login.radius/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/login.radius/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/login.radius/README [deleted file]
pppd/plugins/radius/radiusclient/login.radius/login.radius [deleted file]
pppd/plugins/radius/radiusclient/login.radius/migs/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/login.radius/migs/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/login.radius/migs/README [deleted file]
pppd/plugins/radius/radiusclient/login.radius/migs/ip-down [deleted file]
pppd/plugins/radius/radiusclient/login.radius/migs/ip-up [deleted file]
pppd/plugins/radius/radiusclient/login.radius/migs/login.radius [deleted file]
pppd/plugins/radius/radiusclient/ltconfig [deleted file]
pppd/plugins/radius/radiusclient/ltmain.sh [deleted file]
pppd/plugins/radius/radiusclient/man/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/man/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/missing [deleted file]
pppd/plugins/radius/radiusclient/mkinstalldirs [deleted file]
pppd/plugins/radius/radiusclient/patches/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/patches/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/patches/README [deleted file]
pppd/plugins/radius/radiusclient/patches/merit-2.4.21-CHAP.diff [deleted file]
pppd/plugins/radius/radiusclient/patches/radiusd-1.16.accounting.diff [deleted file]
pppd/plugins/radius/radiusclient/patches/radiusd-1.16.shadow.diff [deleted file]
pppd/plugins/radius/radiusclient/src/Makefile.am [deleted file]
pppd/plugins/radius/radiusclient/src/Makefile.in [deleted file]
pppd/plugins/radius/radiusclient/src/local.c [deleted file]
pppd/plugins/radius/radiusclient/src/radacct.c [deleted file]
pppd/plugins/radius/radiusclient/src/radexample-debug [deleted file]
pppd/plugins/radius/radiusclient/src/radexample.c [deleted file]
pppd/plugins/radius/radiusclient/src/radius.c [deleted file]
pppd/plugins/radius/radiusclient/src/radlogin.c [deleted file]
pppd/plugins/radius/radiusclient/src/radlogin.h [deleted file]
pppd/plugins/radius/radiusclient/src/radstatus.c [deleted file]
pppd/plugins/radius/radiusclient/stamp-h.in [deleted file]
pppd/plugins/radius/radrealms.c
pppd/plugins/radius/sendserver.c [new file with mode: 0644]
pppd/plugins/radius/util.c [new file with mode: 0644]

diff --git a/pppd/plugins/radius/COPYRIGHT b/pppd/plugins/radius/COPYRIGHT
new file mode 100644 (file)
index 0000000..3a0f999
--- /dev/null
@@ -0,0 +1,90 @@
+See the respective source files to find out which copyrights apply.
+
+------------------------------------------------------------------------------
+Copyright (C) 2002 Roaring Penguin Software Inc.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose and without fee is hereby granted, provided that this
+copyright and permission notice appear on all copies and supporting
+documentation, the name of Roaring Penguin Software Inc. not be used
+in advertising or publicity pertaining to distribution of the program
+without specific prior permission, and notice be given in supporting
+documentation that copying and distribution is by permission of
+Roaring Penguin Software Inc..
+
+Roaring Penguin Software Inc. makes no representations about the
+suitability of this software for any purpose.  It is provided "as is"
+without express or implied warranty.
+
+------------------------------------------------------------------------------
+Copyright (C) 1995,1996,1997,1998 Lars Fenneberg <lf@elemental.net>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose and without fee is hereby granted, provided that this copyright and
+permission notice appear on all copies and supporting documentation, the
+name of Lars Fenneberg not be used in advertising or publicity pertaining to
+distribution of the program without specific prior permission, and notice be
+given in supporting documentation that copying and distribution is by
+permission of Lars Fenneberg.
+
+Lars Fenneberg makes no representations about the suitability of this
+software for any purpose.  It is provided "as is" without express or implied
+warranty.
+
+------------------------------------------------------------------------------
+Copyright 1992 Livingston Enterprises, Inc.
+Livingston Enterprises, Inc. 6920 Koll Center Parkway Pleasanton, CA  94566
+
+Permission to use, copy, modify, and distribute this software for any
+purpose and without fee is hereby granted, provided that this copyright
+and permission notice appear on all copies and supporting documentation,
+the name of Livingston Enterprises, Inc. not be used in advertising or
+publicity pertaining to distribution of the program without specific
+prior permission, and notice be given in supporting documentation that
+copying and distribution is by permission of Livingston Enterprises, Inc.
+
+Livingston Enterprises, Inc. makes no representations about the suitability
+of this software for any purpose.  It is provided "as is" without express
+or implied warranty.
+------------------------------------------------------------------------------
+[C] The Regents of the University of Michigan and Merit Network, Inc. 1992,
+1993, 1994, 1995 All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice and this permission notice appear in all
+copies of the software and derivative works or modified versions thereof,
+and that both the copyright notice and this permission and disclaimer
+notice appear in supporting documentation.
+
+THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE REGENTS OF THE
+UNIVERSITY OF MICHIGAN AND MERIT NETWORK, INC. DO NOT WARRANT THAT THE
+FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR
+THAT OPERATION WILL BE UNINTERRUPTED OR ERROR FREE.  The Regents of the
+University of Michigan and Merit Network, Inc. shall not be liable for any
+special, indirect, incidental or consequential damages with respect to any
+claim by Licensee or any third party arising from use of the software.
+------------------------------------------------------------------------------
+Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991.
+All rights reserved.
+
+License to copy and use this software is granted provided that it
+is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+Algorithm" in all material mentioning or referencing this software
+or this function.
+
+License is also granted to make and use derivative works provided
+that such works are identified as "derived from the RSA Data
+Security, Inc. MD5 Message-Digest Algorithm" in all material
+mentioning or referencing the derived work.
+
+RSA Data Security, Inc. makes no representations concerning either
+the merchantability of this software or the suitability of this
+software for any particular purpose. It is provided "as is"
+without express or implied warranty of any kind.
+
+These notices must be retained in any copies of any part of this
+documentation and/or software.
+------------------------------------------------------------------------------
index 05a8730d0ca873b164812523f65ade47c0b4b7db..2b071aabefd33e8534f7d4bbfee31d9f414bd056 100644 (file)
@@ -7,10 +7,12 @@ DESTDIR = @DESTDIR@
 MANDIR = $(DESTDIR)/share/man/man8
 LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
 
+VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
+
 INSTALL        = install
 
 PLUGIN=radius.so radattr.so radrealms.so
-CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
+CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
 
 # Uncomment the next line to include support for Microsoft's
 # MS-CHAP authentication protocol.
@@ -33,7 +35,6 @@ endif
 all: $(PLUGIN)
 
 install: all
-       $(MAKE) $(MFLAGS) -C radiusclient install
        $(INSTALL) -d -m 755 $(LIBDIR)
        $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
        $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
@@ -41,39 +42,24 @@ install: all
        $(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
        $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
 
-radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
-       gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
+radius.so: radius.o libradiusclient.a
+       $(CC) -o radius.so -shared radius.o libradiusclient.a
 
 radattr.so: radattr.o
-       gcc -o radattr.so -shared radattr.o
+       $(CC) -o radattr.so -shared radattr.o
 
 radrealms.so: radrealms.o
-       gcc -o radrealms.so -shared radrealms.o
-
-radius.o: radius.c
-       gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
-
-radattr.o: radattr.c
-       gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
-
-radrealms.o: radrealms.c
-       gcc $(CFLAGS) -c -o radrealms.o -fPIC radrealms.c
+       $(CC) -o radrealms.so -shared radrealms.o
 
-radiusclient/lib/.libs/libradiusclient.a:
-       test -r radiusclient/Makefile ||            \
-               (cd radiusclient;                   \
-                ./configure --prefix=@PREFIX@      \
-                            --sysconfdir=@SYSCONF@ \
-                            --enable-shared        \
-                            --enable-static)
-       $(MAKE) -C radiusclient
+CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
+       clientid.o sendserver.o lock.o util.o md5.o
+libradiusclient.a: $(CLIENTOBJS)
+       $(AR) rv $@ $?
 
 clean:
-       $(MAKE) $(MFLAGS) -C radiusclient clean
-       rm -f *.o *.so
+       rm -f *.o *.so *.a
 
 distclean:
-       rm -f *.o *.so
-       $(MAKE) $(MFLAGS) -C radiusclient distclean
+       rm -f *.o *.so *.a
 
 dist-clean: distclean
diff --git a/pppd/plugins/radius/avpair.c b/pppd/plugins/radius/avpair.c
new file mode 100644 (file)
index 0000000..716d23f
--- /dev/null
@@ -0,0 +1,795 @@
+/*
+ * $Id: avpair.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1995 Lars Fenneberg
+ *
+ * Copyright 1992 Livingston Enterprises, Inc.
+ *
+ * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
+ * and Merit Network, Inc. All Rights Reserved
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include <includes.h>
+#include <radiusclient.h>
+
+static void rc_extract_vendor_specific_attributes(int attrlen,
+                                                 unsigned char *ptr,
+                                                 VALUE_PAIR **vp);
+/*
+ * Function: rc_avpair_add
+ *
+ * Purpose: add an attribute-value pair to the given list.
+ *
+ * Returns: pointer to added a/v pair upon success, NULL pointer upon failure.
+ *
+ * Remarks: Always appends the new pair to the end of the list.
+ *
+ */
+
+VALUE_PAIR *rc_avpair_add (VALUE_PAIR **list, int attrid, void *pval, int len,
+                          int vendorcode)
+{
+       VALUE_PAIR     *vp;
+
+       vp = rc_avpair_new (attrid, pval, len, vendorcode);
+
+       if (vp != (VALUE_PAIR *) NULL)
+       {
+               rc_avpair_insert (list, (VALUE_PAIR *) NULL, vp);
+       }
+
+       return vp;
+
+}
+
+/*
+ * Function: rc_avpair_assign
+ *
+ * Purpose: assign the given value to an attribute-value pair.
+ *
+ * Returns:  0 on success,
+ *         -1 on failure.
+ *
+ */
+
+int rc_avpair_assign (VALUE_PAIR *vp, void *pval, int len)
+{
+       int     result = -1;
+
+       switch (vp->type)
+       {
+               case PW_TYPE_STRING:
+
+                       if (((len == 0) && (strlen ((char *) pval)) > AUTH_STRING_LEN)
+                           || (len > AUTH_STRING_LEN)) {
+                               error("rc_avpair_assign: bad attribute length");
+                               return result;
+                   }
+
+                       if (len > 0) {
+                               memcpy(vp->strvalue, (char *)pval, len);
+                               vp->strvalue[len] = '\0';
+                               vp->lvalue = len;
+                       } else {
+                       strncpy (vp->strvalue, (char *) pval, AUTH_STRING_LEN);
+                       vp->lvalue = strlen((char *) pval);
+                       }
+
+                       result = 0;
+                       break;
+
+               case PW_TYPE_DATE:
+               case PW_TYPE_INTEGER:
+               case PW_TYPE_IPADDR:
+
+                       vp->lvalue = * (UINT4 *) pval;
+
+                       result = 0;
+                       break;
+
+               default:
+                       error("rc_avpair_assign: unknown attribute %d", vp->type);
+       }
+       return result;
+}
+
+/*
+ * Function: rc_avpair_new
+ *
+ * Purpose: make a new attribute-value pair with given parameters.
+ *
+ * Returns: pointer to generated a/v pair when successful, NULL when failure.
+ *
+ */
+
+VALUE_PAIR *rc_avpair_new (int attrid, void *pval, int len, int vendorcode)
+{
+       VALUE_PAIR     *vp = (VALUE_PAIR *) NULL;
+       DICT_ATTR      *pda;
+
+       if ((pda = rc_dict_getattr (attrid, vendorcode)) == (DICT_ATTR *) NULL)
+       {
+               error("rc_avpair_new: unknown attribute %d", attrid);
+       }
+       else
+       {
+               if ((vp = (VALUE_PAIR *) malloc (sizeof (VALUE_PAIR)))
+                                                       != (VALUE_PAIR *) NULL)
+               {
+                       strncpy (vp->name, pda->name, sizeof (vp->name));
+                       vp->attribute = attrid;
+                       vp->vendorcode = vendorcode;
+                       vp->next = (VALUE_PAIR *) NULL;
+                       vp->type = pda->type;
+                       if (rc_avpair_assign (vp, pval, len) == 0)
+                       {
+                               return vp;
+                       }
+                       free (vp);
+                       vp = (VALUE_PAIR *) NULL;
+               }
+               else
+                       novm("rc_avpair_new");
+       }
+       return vp;
+}
+
+/*
+ *
+ * Function: rc_avpair_gen
+ *
+ * Purpose: takes attribute/value pairs from buffer and builds a
+ *         value_pair list using allocated memory.
+ *
+ * Returns: value_pair list or NULL on failure
+ */
+
+VALUE_PAIR *rc_avpair_gen (AUTH_HDR *auth)
+{
+       int             length;
+       int             x_len;
+       int             attribute;
+       int             attrlen;
+       UINT4           lvalue;
+       unsigned char         *x_ptr;
+       unsigned char         *ptr;
+       DICT_ATTR      *attr;
+       VALUE_PAIR     *vp;
+       VALUE_PAIR     *pair;
+       unsigned char   hex[3];         /* For hex string conversion. */
+       char            buffer[512];
+
+       /*
+        * Extract attribute-value pairs
+        */
+       ptr = auth->data;
+       length = ntohs ((unsigned short) auth->length) - AUTH_HDR_LEN;
+       vp = (VALUE_PAIR *) NULL;
+
+       while (length > 0)
+       {
+               attribute = *ptr++;
+               attrlen = *ptr++;
+               attrlen -= 2;
+               if (attrlen < 0)
+               {
+                       error("rc_avpair_gen: received attribute with invalid length");
+                       break;
+               }
+
+               /* Handle vendor-specific specially */
+               if (attribute == PW_VENDOR_SPECIFIC) {
+                   rc_extract_vendor_specific_attributes(attrlen, ptr, &vp);
+                   ptr += attrlen;
+                   length -= (attrlen + 2);
+                   continue;
+               }
+               if ((attr = rc_dict_getattr (attribute, VENDOR_NONE)) == (DICT_ATTR *) NULL)
+               {
+                       *buffer= '\0';  /* Initial length. */
+                       for (x_ptr = ptr, x_len = attrlen ;
+                               x_len > 0 ;
+                               x_len--, x_ptr++)
+                       {
+                               sprintf (hex, "%2.2X", *x_ptr);
+                               strcat (buffer, hex);
+                       }
+                       warn("rc_avpair_gen: received unknown attribute %d of length %d: 0x%s",
+                               attribute, attrlen, buffer);
+               }
+               else
+               {
+                       if ((pair =
+                               (VALUE_PAIR *) malloc (sizeof (VALUE_PAIR))) ==
+                                       (VALUE_PAIR *) NULL)
+                       {
+                               novm("rc_avpair_gen");
+                               rc_avpair_free(vp);
+                               return NULL;
+                       }
+                       strcpy (pair->name, attr->name);
+                       pair->attribute = attr->value;
+                       pair->vendorcode = VENDOR_NONE;
+                       pair->type = attr->type;
+                       pair->next = (VALUE_PAIR *) NULL;
+
+                       switch (attr->type)
+                       {
+
+                           case PW_TYPE_STRING:
+                               memcpy (pair->strvalue, (char *) ptr, (size_t) attrlen);
+                               pair->strvalue[attrlen] = '\0';
+                               pair->lvalue = attrlen;
+                               rc_avpair_insert (&vp, (VALUE_PAIR *) NULL, pair);
+                               break;
+
+                           case PW_TYPE_INTEGER:
+                           case PW_TYPE_IPADDR:
+                               memcpy ((char *) &lvalue, (char *) ptr,
+                                       sizeof (UINT4));
+                               pair->lvalue = ntohl (lvalue);
+                               rc_avpair_insert (&vp, (VALUE_PAIR *) NULL, pair);
+                               break;
+
+                           default:
+                               warn("rc_avpair_gen: %s has unknown type", attr->name);
+                               free (pair);
+                               break;
+                       }
+
+               }
+               ptr += attrlen;
+               length -= attrlen + 2;
+       }
+       return (vp);
+}
+
+/*
+ * Function: rc_extract_vendor_specific_attributes
+ *
+ * Purpose: Extracts vendor-specific attributes, assuming they are in
+ *          the "SHOULD" format recommended by RCF 2138.
+ *
+ * Returns: found value_pair
+ *
+ */
+static void rc_extract_vendor_specific_attributes(int attrlen,
+                                                 unsigned char *ptr,
+                                                 VALUE_PAIR **vp)
+{
+    int vendor_id;
+    int vtype;
+    int vlen;
+    UINT4 lvalue;
+    DICT_ATTR *attr;
+    VALUE_PAIR *pair;
+
+    /* ptr is sitting at vendor-ID */
+    if (attrlen < 8) {
+       /* Nothing to see here... */
+       return;
+    }
+
+    /* High-order octet of Vendor-Id must be zero (RFC2138) */
+    if (*ptr) {
+       return;
+    }
+
+    /* Extract vendor_id */
+    vendor_id = (int) (
+       ((unsigned int) ptr[1]) * 256 * 256 +
+       ((unsigned int) ptr[2]) * 256 +
+       ((unsigned int) ptr[3]));
+    /* Bump ptr up to contents */
+    ptr += 4;
+
+    /* Set attrlen to length of data */
+    attrlen -= 4;
+    for (; attrlen; attrlen -= vlen+2, ptr += vlen) {
+       vtype = *ptr++;
+       vlen = *ptr++;
+       vlen -= 2;
+       if (vlen < 0 || vlen > attrlen - 2) {
+           /* Do not log an error.  We are supposed to be able to cope with
+              arbitrary vendor-specific gunk */
+           return;
+       }
+       /* Looks plausible... */
+       if ((attr = rc_dict_getattr(vtype, vendor_id)) == NULL) {
+           continue;
+       }
+
+       /* TODO: Check that length matches data size!!!!! */
+       pair = (VALUE_PAIR *) malloc(sizeof(VALUE_PAIR));
+       if (!pair) {
+           novm("rc_avpair_gen");
+           return;
+       }
+       strcpy(pair->name, attr->name);
+       pair->attribute = attr->value;
+       pair->vendorcode = vendor_id;
+       pair->type = attr->type;
+       pair->next = NULL;
+       switch (attr->type) {
+       case PW_TYPE_STRING:
+           memcpy (pair->strvalue, (char *) ptr, (size_t) vlen);
+           pair->strvalue[vlen] = '\0';
+           pair->lvalue = vlen;
+           rc_avpair_insert (vp, (VALUE_PAIR *) NULL, pair);
+           break;
+
+       case PW_TYPE_INTEGER:
+       case PW_TYPE_IPADDR:
+           memcpy ((char *) &lvalue, (char *) ptr,
+                   sizeof (UINT4));
+           pair->lvalue = ntohl (lvalue);
+           rc_avpair_insert (vp, (VALUE_PAIR *) NULL, pair);
+           break;
+
+       default:
+           warn("rc_avpair_gen: %s has unknown type", attr->name);
+           free (pair);
+           break;
+       }
+    }
+}
+
+/*
+ * Function: rc_avpair_get
+ *
+ * Purpose: Find the first attribute value-pair (which matches the given
+ *          attribute) from the specified value-pair list.
+ *
+ * Returns: found value_pair
+ *
+ */
+
+VALUE_PAIR *rc_avpair_get (VALUE_PAIR *vp, UINT4 attr)
+{
+       for (; vp != (VALUE_PAIR *) NULL && vp->attribute != attr; vp = vp->next)
+       {
+               continue;
+       }
+       return (vp);
+}
+
+/*
+ * Function: rc_avpair_copy
+ *
+ * Purpose: Return a copy of the existing list "p" ala strdup().
+ *
+ */
+VALUE_PAIR *rc_avpair_copy(VALUE_PAIR *p)
+{
+       VALUE_PAIR *vp, *fp = NULL, *lp = NULL;
+
+       while (p) {
+               vp = malloc(sizeof(VALUE_PAIR));
+               if (!vp) {
+                   novm("rc_avpair_copy");
+                   return NULL; /* leaks a little but so what */
+               }
+               *vp = *p;
+               if (!fp)
+                       fp = vp;
+               if (lp)
+                       lp->next = vp;
+               lp = vp;
+               p = p->next;
+       }
+
+       return fp;
+}
+
+/*
+ * Function: rc_avpair_insert
+ *
+ * Purpose: Given the address of an existing list "a" and a pointer
+ *         to an entry "p" in that list, add the list "b" to
+ *         the "a" list after the "p" entry.  If "p" is NULL, add
+ *         the list "b" to the end of "a".
+ *
+ */
+
+void rc_avpair_insert (VALUE_PAIR **a, VALUE_PAIR *p, VALUE_PAIR *b)
+{
+       VALUE_PAIR     *this_node = NULL;
+       VALUE_PAIR     *vp;
+
+       if (*a == (VALUE_PAIR *) NULL)
+       {
+               *a = b;
+               return;
+       }
+
+       if (!b)
+               return;
+
+       vp = *a;
+
+       if ( p == (VALUE_PAIR *) NULL) /* run to end of "a" list */
+       {
+               while (vp != (VALUE_PAIR *) NULL)
+               {
+                       this_node = vp;
+                       vp = vp->next;
+               }
+       }
+       else /* look for the "p" entry in the "a" list (or run to end) */
+       {
+               this_node = *a;
+               while (this_node != (VALUE_PAIR *) NULL)
+               {
+                       if (this_node == p)
+                       {
+                               break;
+                       }
+                       this_node = this_node->next;
+               }
+       }
+
+       /* add "b" at this_node */
+       vp = this_node->next;
+       this_node->next = b;
+
+       /* run to end of "b" and connect the rest of "a" */
+       while (b->next)
+               b = b->next;
+       b->next = vp;
+
+       return;
+}
+
+/*
+ * Function: rc_avpair_free
+ *
+ * Purpose: frees all value_pairs in the list
+ *
+ */
+
+void rc_avpair_free (VALUE_PAIR *pair)
+{
+       VALUE_PAIR     *next;
+
+       while (pair != (VALUE_PAIR *) NULL)
+       {
+               next = pair->next;
+               free (pair);
+               pair = next;
+       }
+}
+
+/*
+ * Function: rc_fieldcpy
+ *
+ * Purpose: Copy a data field from the buffer.  Advance the buffer
+ *          past the data field.
+ *
+ */
+
+static void rc_fieldcpy (char *string, char **uptr)
+{
+       char           *ptr;
+
+       ptr = *uptr;
+       if (*ptr == '"')
+       {
+               ptr++;
+               while (*ptr != '"' && *ptr != '\0' && *ptr != '\n')
+               {
+                       *string++ = *ptr++;
+               }
+               *string = '\0';
+               if (*ptr == '"')
+               {
+                       ptr++;
+               }
+               *uptr = ptr;
+               return;
+       }
+
+       while (*ptr != ' ' && *ptr != '\t' && *ptr != '\0' && *ptr != '\n' &&
+                       *ptr != '=' && *ptr != ',')
+       {
+               *string++ = *ptr++;
+       }
+       *string = '\0';
+       *uptr = ptr;
+       return;
+}
+
+
+/*
+ * Function: rc_avpair_parse
+ *
+ * Purpose: parses the buffer to extract the attribute-value pairs.
+ *
+ * Returns: 0 = successful parse of attribute-value pair,
+ *        -1 = syntax (or other) error detected.
+ *
+ */
+
+#define PARSE_MODE_NAME                0
+#define PARSE_MODE_EQUAL       1
+#define PARSE_MODE_VALUE       2
+#define PARSE_MODE_INVALID     3
+
+int rc_avpair_parse (char *buffer, VALUE_PAIR **first_pair)
+{
+       int             mode;
+       char            attrstr[AUTH_ID_LEN];
+       char            valstr[AUTH_ID_LEN];
+       DICT_ATTR      *attr = NULL;
+       DICT_VALUE     *dval;
+       VALUE_PAIR     *pair;
+       VALUE_PAIR     *link;
+       struct tm      *tm;
+       time_t          timeval;
+
+       mode = PARSE_MODE_NAME;
+       while (*buffer != '\n' && *buffer != '\0')
+       {
+               if (*buffer == ' ' || *buffer == '\t')
+               {
+                       buffer++;
+                       continue;
+               }
+
+               switch (mode)
+               {
+                   case PARSE_MODE_NAME:               /* Attribute Name */
+                       rc_fieldcpy (attrstr, &buffer);
+                       if ((attr =
+                               rc_dict_findattr (attrstr)) == (DICT_ATTR *) NULL)
+                       {
+                               error("rc_avpair_parse: unknown attribute");
+                               if (*first_pair) {
+                                       rc_avpair_free(*first_pair);
+                                       *first_pair = (VALUE_PAIR *) NULL;
+                               }
+                               return (-1);
+                       }
+                       mode = PARSE_MODE_EQUAL;
+                       break;
+
+                   case PARSE_MODE_EQUAL:              /* Equal sign */
+                       if (*buffer == '=')
+                       {
+                               mode = PARSE_MODE_VALUE;
+                               buffer++;
+                       }
+                       else
+                       {
+                               error("rc_avpair_parse: missing or misplaced equal sign");
+                               if (*first_pair) {
+                                       rc_avpair_free(*first_pair);
+                                       *first_pair = (VALUE_PAIR *) NULL;
+                               }
+                               return (-1);
+                       }
+                       break;
+
+                   case PARSE_MODE_VALUE:              /* Value */
+                       rc_fieldcpy (valstr, &buffer);
+
+                       if ((pair =
+                               (VALUE_PAIR *) malloc (sizeof (VALUE_PAIR)))
+                                                       == (VALUE_PAIR *) NULL)
+                       {
+                               novm("rc_avpair_parse");
+                               if (*first_pair) {
+                                       rc_avpair_free(*first_pair);
+                                       *first_pair = (VALUE_PAIR *) NULL;
+                               }
+                               return (-1);
+                       }
+                       strcpy (pair->name, attr->name);
+                       pair->attribute = attr->value;
+                       pair->type = attr->type;
+                       pair->vendorcode = attr->vendorcode;
+
+                       switch (pair->type)
+                       {
+
+                           case PW_TYPE_STRING:
+                               strcpy (pair->strvalue, valstr);
+                               pair->lvalue = strlen(valstr);
+                               break;
+
+                           case PW_TYPE_INTEGER:
+                               if (isdigit (*valstr))
+                               {
+                                       pair->lvalue = atoi (valstr);
+                               }
+                               else
+                               {
+                                       if ((dval = rc_dict_findval (valstr))
+                                                       == (DICT_VALUE *) NULL)
+                                       {
+                                               error("rc_avpair_parse: unknown attribute value: %s", valstr);
+                                               if (*first_pair) {
+                                                       rc_avpair_free(*first_pair);
+                                                       *first_pair = (VALUE_PAIR *) NULL;
+                                               }
+                                               free (pair);
+                                               return (-1);
+                                       }
+                                       else
+                                       {
+                                               pair->lvalue = dval->value;
+                                       }
+                               }
+                               break;
+
+                           case PW_TYPE_IPADDR:
+                               pair->lvalue = rc_get_ipaddr(valstr);
+                               break;
+
+                           case PW_TYPE_DATE:
+                               timeval = time (0);
+                               tm = localtime (&timeval);
+                               tm->tm_hour = 0;
+                               tm->tm_min = 0;
+                               tm->tm_sec = 0;
+                               rc_str2tm (valstr, tm);
+#ifdef TIMELOCAL
+                               pair->lvalue = (UINT4) timelocal (tm);
+#else  /* TIMELOCAL */
+                               pair->lvalue = (UINT4) mktime (tm);
+#endif /* TIMELOCAL */
+                               break;
+
+                           default:
+                               error("rc_avpair_parse: unknown attribute type %d", pair->type);
+                               if (*first_pair) {
+                                       rc_avpair_free(*first_pair);
+                                       *first_pair = (VALUE_PAIR *) NULL;
+                               }
+                               free (pair);
+                               return (-1);
+                       }
+                       pair->next = (VALUE_PAIR *) NULL;
+
+                       if (*first_pair == (VALUE_PAIR *) NULL)
+                       {
+                               *first_pair = pair;
+                       }
+                       else
+                       {
+                               link = *first_pair;
+                               while (link->next != (VALUE_PAIR *) NULL)
+                               {
+                                       link = link->next;
+                               }
+                               link->next = pair;
+                       }
+
+                       mode = PARSE_MODE_NAME;
+                       break;
+
+                   default:
+                       mode = PARSE_MODE_NAME;
+                       break;
+               }
+       }
+       return (0);
+}
+
+/*
+ * Function: rc_avpair_tostr
+ *
+ * Purpose: Translate an av_pair into two strings
+ *
+ * Returns: 0 on success, -1 on failure
+ *
+ */
+
+int rc_avpair_tostr (VALUE_PAIR *pair, char *name, int ln, char *value, int lv)
+{
+       DICT_VALUE     *dval;
+       char            buffer[32];
+       struct in_addr  inad;
+       unsigned char         *ptr;
+
+       *name = *value = '\0';
+
+       if (!pair || pair->name[0] == '\0') {
+               error("rc_avpair_tostr: pair is NULL or empty");
+               return (-1);
+       }
+
+       strncpy(name, pair->name, (size_t) ln);
+
+       switch (pair->type)
+       {
+           case PW_TYPE_STRING:
+               lv--;
+               ptr = (unsigned char *) pair->strvalue;
+               while (*ptr != '\0')
+               {
+                       if (!(isprint (*ptr)))
+                       {
+                               sprintf (buffer, "\\%03o", *ptr);
+                               strncat(value, buffer, (size_t) lv);
+                               lv -= 4;
+                               if (lv < 0) break;
+                       }
+                       else
+                       {
+                               strncat(value, ptr, 1);
+                               lv--;
+                               if (lv < 0) break;
+                       }
+                       ptr++;
+               }
+               break;
+
+           case PW_TYPE_INTEGER:
+               dval = rc_dict_getval (pair->lvalue, pair->name);
+               if (dval != (DICT_VALUE *) NULL)
+               {
+                       strncpy(value, dval->name, (size_t) lv-1);
+               }
+               else
+               {
+                       sprintf (buffer, "%ld", pair->lvalue);
+                       strncpy(value, buffer, (size_t) lv);
+               }
+               break;
+
+           case PW_TYPE_IPADDR:
+               inad.s_addr = htonl(pair->lvalue);
+               strncpy (value, inet_ntoa (inad), (size_t) lv-1);
+               break;
+
+           case PW_TYPE_DATE:
+               strftime (buffer, sizeof (buffer), "%m/%d/%y %H:%M:%S",
+                         gmtime ((time_t *) & pair->lvalue));
+               strncpy(value, buffer, lv-1);
+               break;
+
+           default:
+               error("rc_avpair_tostr: unknown attribute type %d", pair->type);
+               return (-1);
+               break;
+       }
+
+       return 0;
+}
+
+/*
+ * Function: rc_avpair_readin
+ *
+ * Purpose: get a sequence of attribute value pairs from the file input
+ *         and make them into a list of value_pairs
+ *
+ */
+
+VALUE_PAIR *rc_avpair_readin(FILE *input)
+{
+       VALUE_PAIR *vp = NULL;
+       char buffer[1024], *q;
+
+       while (fgets(buffer, sizeof(buffer), input) != NULL)
+       {
+               q = buffer;
+
+               while(*q && isspace(*q)) q++;
+
+               if ((*q == '\n') || (*q == '#') || (*q == '\0'))
+                       continue;
+
+               if (rc_avpair_parse(q, &vp) < 0) {
+                       error("rc_avpair_readin: malformed attribute: %s", buffer);
+                       rc_avpair_free(vp);
+                       return NULL;
+               }
+       }
+
+       return vp;
+}
diff --git a/pppd/plugins/radius/buildreq.c b/pppd/plugins/radius/buildreq.c
new file mode 100644 (file)
index 0000000..955b052
--- /dev/null
@@ -0,0 +1,446 @@
+/*
+ * $Id: buildreq.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1995,1997 Lars Fenneberg
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include <includes.h>
+#include <radiusclient.h>
+
+unsigned char rc_get_seqnbr(void);
+
+/*
+ * Function: rc_get_nas_id
+ *
+ * Purpose: fills in NAS-Identifier or NAS-IP-Address in request
+ *
+ */
+
+int rc_get_nas_id(VALUE_PAIR **sendpairs)
+{
+       UINT4           client_id;
+       char *nasid;
+
+       nasid = rc_conf_str("nas_identifier");
+       if (strlen(nasid)) {
+               /*
+                * Fill in NAS-Identifier
+                */
+               if (rc_avpair_add(sendpairs, PW_NAS_IDENTIFIER, nasid, 0,
+                                 VENDOR_NONE) == NULL)
+                       return (ERROR_RC);
+
+               return (OK_RC);
+         
+       } else {
+               /*
+                * Fill in NAS-IP-Address
+                */
+               if ((client_id = rc_own_ipaddress()) == 0)
+                       return (ERROR_RC);
+
+               if (rc_avpair_add(sendpairs, PW_NAS_IP_ADDRESS, &client_id,
+                                 0, VENDOR_NONE) == NULL)
+                       return (ERROR_RC);
+       }
+
+       return (OK_RC);
+}
+
+/*
+ * Function: rc_buildreq
+ *
+ * Purpose: builds a skeleton RADIUS request using information from the
+ *         config file.
+ *
+ */
+
+void rc_buildreq(SEND_DATA *data, int code, char *server, unsigned short port,
+                int timeout, int retries)
+{
+       data->server = server;
+       data->svc_port = port;
+       data->seq_nbr = rc_get_seqnbr();
+       data->timeout = timeout;
+       data->retries = retries;
+       data->code = code;
+}
+
+/*
+ * Function: rc_guess_seqnbr
+ *
+ * Purpose: return a random sequence number
+ *
+ */
+
+static unsigned char rc_guess_seqnbr(void)
+{
+       return (unsigned char)(magic() & UCHAR_MAX);
+}
+
+/*
+ * Function: rc_get_seqnbr
+ *
+ * Purpose: generate a sequence number
+ *
+ */
+
+unsigned char rc_get_seqnbr(void)
+{
+       FILE *sf;
+       int tries = 1;
+       int seq_nbr, pos;
+       char *seqfile = rc_conf_str("seqfile");
+
+       if ((sf = fopen(seqfile, "a+")) == NULL)
+       {
+               error("rc_get_seqnbr: couldn't open sequence file %s: %s", seqfile, strerror(errno));
+               /* well, so guess a sequence number */
+               return rc_guess_seqnbr();
+       }
+
+       while (do_lock_exclusive(fileno(sf))!= 0)
+       {
+               if (errno != EWOULDBLOCK) {
+                       error("rc_get_seqnbr: flock failure: %s: %s", seqfile, strerror(errno));
+                       fclose(sf);
+                       return rc_guess_seqnbr();
+               }
+               tries++;
+               if (tries <= 10)
+                       rc_mdelay(500);
+               else
+                       break;
+       }
+
+       if (tries > 10) {
+               error("rc_get_seqnbr: couldn't get lock after %d tries: %s", tries-1, seqfile);
+               fclose(sf);
+               return rc_guess_seqnbr();
+       }
+
+       pos = ftell(sf);
+       rewind(sf);
+       if (fscanf(sf, "%d", &seq_nbr) != 1) {
+               if (pos != ftell(sf)) {
+                       /* file was not empty */
+                       error("rc_get_seqnbr: fscanf failure: %s", seqfile);
+               }
+               seq_nbr = rc_guess_seqnbr();
+       }
+
+       rewind(sf);
+       ftruncate(fileno(sf),0);
+       fprintf(sf,"%d\n", (seq_nbr+1) & UCHAR_MAX);
+
+       fflush(sf); /* fflush because a process may read it between the do_unlock and fclose */
+
+       if (do_unlock(fileno(sf)) != 0)
+               error("rc_get_seqnbr: couldn't release lock on %s: %s", seqfile, strerror(errno));
+
+       fclose(sf);
+
+       return (unsigned char)seq_nbr;
+}
+
+/*
+ * Function: rc_auth
+ *
+ * Purpose: Builds an authentication request for port id client_port
+ *         with the value_pairs send and submits it to a server
+ *
+ * Returns: received value_pairs in received, messages from the server in msg
+ *         and 0 on success, negative on failure as return value
+ *
+ */
+
+int rc_auth(UINT4 client_port, VALUE_PAIR *send, VALUE_PAIR **received,
+           char *msg, REQUEST_INFO *info)
+{
+    SERVER *authserver = rc_conf_srv("authserver");
+
+    if (!authserver) {
+       return (ERROR_RC);
+    }
+    return rc_auth_using_server(authserver, client_port, send, received,
+                               msg, info);
+}
+
+/*
+ * Function: rc_auth_using_server
+ *
+ * Purpose: Builds an authentication request for port id client_port
+ *         with the value_pairs send and submits it to a server.  You
+ *          explicitly supply a server list.
+ *
+ * Returns: received value_pairs in received, messages from the server in msg
+ *         and 0 on success, negative on failure as return value
+ *
+ */
+
+int rc_auth_using_server(SERVER *authserver,
+                        UINT4 client_port,
+                        VALUE_PAIR *send,
+                        VALUE_PAIR **received,
+                        char *msg, REQUEST_INFO *info)
+{
+       SEND_DATA       data;
+       int             result;
+       int             i;
+       int             timeout = rc_conf_int("radius_timeout");
+       int             retries = rc_conf_int("radius_retries");
+
+       data.send_pairs = send;
+       data.receive_pairs = NULL;
+
+       /*
+        * Fill in NAS-IP-Address or NAS-Identifier
+        */
+
+       if (rc_get_nas_id(&(data.send_pairs)) == ERROR_RC)
+           return (ERROR_RC);
+
+       /*
+        * Fill in NAS-Port
+        */
+
+       if (rc_avpair_add(&(data.send_pairs), PW_NAS_PORT, &client_port, 0, VENDOR_NONE) == NULL)
+               return (ERROR_RC);
+
+       result = ERROR_RC;
+       for(i=0; (i<authserver->max) && (result != OK_RC) && (result != BADRESP_RC)
+               ; i++)
+       {
+               if (data.receive_pairs != NULL) {
+                       rc_avpair_free(data.receive_pairs);
+                       data.receive_pairs = NULL;
+               }
+               rc_buildreq(&data, PW_ACCESS_REQUEST, authserver->name[i],
+                           authserver->port[i], timeout, retries);
+
+               result = rc_send_server (&data, msg, info);
+       }
+
+       *received = data.receive_pairs;
+
+       return result;
+}
+
+/*
+ * Function: rc_auth_proxy
+ *
+ * Purpose: Builds an authentication request
+ *         with the value_pairs send and submits it to a server.
+ *         Works for a proxy; does not add IP address, and does
+ *         does not rely on config file.
+ *
+ * Returns: received value_pairs in received, messages from the server in msg
+ *         and 0 on success, negative on failure as return value
+ *
+ */
+
+int rc_auth_proxy(VALUE_PAIR *send, VALUE_PAIR **received, char *msg)
+{
+       SEND_DATA       data;
+       int             result;
+       int             i;
+       SERVER          *authserver = rc_conf_srv("authserver");
+       int             timeout = rc_conf_int("radius_timeout");
+       int             retries = rc_conf_int("radius_retries");
+
+       data.send_pairs = send;
+       data.receive_pairs = NULL;
+
+       result = ERROR_RC;
+       for(i=0; (i<authserver->max) && (result != OK_RC) && (result != BADRESP_RC)
+               ; i++)
+       {
+               if (data.receive_pairs != NULL) {
+                       rc_avpair_free(data.receive_pairs);
+                       data.receive_pairs = NULL;
+               }
+               rc_buildreq(&data, PW_ACCESS_REQUEST, authserver->name[i],
+                           authserver->port[i], timeout, retries);
+
+               result = rc_send_server (&data, msg, NULL);
+       }
+
+       *received = data.receive_pairs;
+
+       return result;
+}
+
+
+/*
+ * Function: rc_acct_using_server
+ *
+ * Purpose: Builds an accounting request for port id client_port
+ *         with the value_pairs send.  You explicitly supply server list.
+ *
+ * Remarks: NAS-Identifier/NAS-IP-Address, NAS-Port and Acct-Delay-Time get
+ *         filled in by this function, the rest has to be supplied.
+ */
+
+int rc_acct_using_server(SERVER *acctserver,
+                        UINT4 client_port,
+                        VALUE_PAIR *send)
+{
+       SEND_DATA       data;
+       VALUE_PAIR      *adt_vp;
+       int             result;
+       time_t          start_time, dtime;
+       char            msg[4096];
+       int             i;
+       int             timeout = rc_conf_int("radius_timeout");
+       int             retries = rc_conf_int("radius_retries");
+
+       data.send_pairs = send;
+       data.receive_pairs = NULL;
+
+       /*
+        * Fill in NAS-IP-Address or NAS-Identifier
+        */
+
+       if (rc_get_nas_id(&(data.send_pairs)) == ERROR_RC)
+           return (ERROR_RC);
+
+       /*
+        * Fill in NAS-Port
+        */
+
+       if (rc_avpair_add(&(data.send_pairs), PW_NAS_PORT, &client_port, 0, VENDOR_NONE) == NULL)
+               return (ERROR_RC);
+
+       /*
+        * Fill in Acct-Delay-Time
+        */
+
+       dtime = 0;
+       if ((adt_vp = rc_avpair_add(&(data.send_pairs), PW_ACCT_DELAY_TIME, &dtime, 0, VENDOR_NONE)) == NULL)
+               return (ERROR_RC);
+
+       start_time = time(NULL);
+       result = ERROR_RC;
+       for(i=0; (i<acctserver->max) && (result != OK_RC) && (result != BADRESP_RC)
+               ; i++)
+       {
+               if (data.receive_pairs != NULL) {
+                       rc_avpair_free(data.receive_pairs);
+                       data.receive_pairs = NULL;
+               }
+               rc_buildreq(&data, PW_ACCOUNTING_REQUEST, acctserver->name[i],
+                           acctserver->port[i], timeout, retries);
+
+               dtime = time(NULL) - start_time;
+               rc_avpair_assign(adt_vp, &dtime, 0);
+
+               result = rc_send_server (&data, msg, NULL);
+       }
+
+       rc_avpair_free(data.receive_pairs);
+
+       return result;
+}
+
+/*
+ * Function: rc_acct
+ *
+ * Purpose: Builds an accounting request for port id client_port
+ *         with the value_pairs send
+ *
+ * Remarks: NAS-Identifier/NAS-IP-Address, NAS-Port and Acct-Delay-Time get
+ *         filled in by this function, the rest has to be supplied.
+ */
+
+int rc_acct(UINT4 client_port, VALUE_PAIR *send)
+{
+    SERVER *acctserver = rc_conf_srv("acctserver");
+    if (!acctserver) return (ERROR_RC);
+
+    return rc_acct_using_server(acctserver, client_port, send);
+}
+
+/*
+ * Function: rc_acct_proxy
+ *
+ * Purpose: Builds an accounting request with the value_pairs send
+ *
+ */
+
+int rc_acct_proxy(VALUE_PAIR *send)
+{
+       SEND_DATA       data;
+       int             result;
+       char            msg[4096];
+       int             i;
+       SERVER          *acctserver = rc_conf_srv("authserver");
+       int             timeout = rc_conf_int("radius_timeout");
+       int             retries = rc_conf_int("radius_retries");
+
+       data.send_pairs = send;
+       data.receive_pairs = NULL;
+
+       result = ERROR_RC;
+       for(i=0; (i<acctserver->max) && (result != OK_RC) && (result != BADRESP_RC)
+               ; i++)
+       {
+               if (data.receive_pairs != NULL) {
+                       rc_avpair_free(data.receive_pairs);
+                       data.receive_pairs = NULL;
+               }
+               rc_buildreq(&data, PW_ACCOUNTING_REQUEST, acctserver->name[i],
+                           acctserver->port[i], timeout, retries);
+
+               result = rc_send_server (&data, msg, NULL);
+       }
+
+       rc_avpair_free(data.receive_pairs);
+
+       return result;
+}
+
+/*
+ * Function: rc_check
+ *
+ * Purpose: ask the server hostname on the specified port for a
+ *         status message
+ *
+ */
+
+int rc_check(char *host, unsigned short port, char *msg)
+{
+       SEND_DATA       data;
+       int             result;
+       UINT4           service_type;
+       int             timeout = rc_conf_int("radius_timeout");
+       int             retries = rc_conf_int("radius_retries");
+
+       data.send_pairs = data.receive_pairs = NULL;
+
+       /*
+        * Fill in NAS-IP-Address or NAS-Identifier,
+         * although it isn't neccessary
+        */
+
+       if (rc_get_nas_id(&(data.send_pairs)) == ERROR_RC)
+           return (ERROR_RC);
+
+       /*
+        * Fill in Service-Type
+        */
+
+       service_type = PW_ADMINISTRATIVE;
+       rc_avpair_add(&(data.send_pairs), PW_SERVICE_TYPE, &service_type, 0, VENDOR_NONE);
+
+       rc_buildreq(&data, PW_STATUS_SERVER, host, port, timeout, retries);
+       result = rc_send_server (&data, msg, NULL);
+
+       rc_avpair_free(data.receive_pairs);
+
+       return result;
+}
diff --git a/pppd/plugins/radius/clientid.c b/pppd/plugins/radius/clientid.c
new file mode 100644 (file)
index 0000000..d49579c
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * $Id: clientid.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1995,1996,1997 Lars Fenneberg
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include <includes.h>
+#include <radiusclient.h>
+
+struct map2id_s {
+       char *name;
+       UINT4 id;
+
+       struct map2id_s *next;
+};
+
+static struct map2id_s *map2id_list = NULL;
+
+/*
+ * Function: rc_read_mapfile
+ *
+ * Purpose: Read in the ttyname to port id map file
+ *
+ * Arguments: the file name of the map file
+ *
+ * Returns: zero on success, negative integer on failure
+ */
+
+int rc_read_mapfile(char *filename)
+{
+       char buffer[1024];
+       FILE *mapfd;
+       char *c, *name, *id, *q;
+       struct map2id_s *p;
+       int lnr = 0;
+
+       if ((mapfd = fopen(filename,"r")) == NULL)
+       {
+               error("rc_read_mapfile: can't read %s: %s", filename, strerror(errno));
+               return (-1);
+       }
+
+#define SKIP(p) while(*p && isspace(*p)) p++;
+
+       while (fgets(buffer, sizeof(buffer), mapfd) != NULL)
+       {
+               lnr++;
+
+               q = buffer;
+
+               SKIP(q);
+
+               if ((*q == '\n') || (*q == '#') || (*q == '\0'))
+                       continue;
+
+               if (( c = strchr(q, ' ')) || (c = strchr(q,'\t'))) {
+
+                       *c = '\0'; c++;
+                       SKIP(c);
+
+                       name = q;
+                       id = c;
+
+                       if ((p = (struct map2id_s *)malloc(sizeof(*p))) == NULL) {
+                               novm("rc_read_mapfile");
+                               return (-1);
+                       }
+
+                       p->name = strdup(name);
+                       p->id = atoi(id);
+                       p->next = map2id_list;
+                       map2id_list = p;
+
+               } else {
+
+                       error("rc_read_mapfile: malformed line in %s, line %d", filename, lnr);
+                       return (-1);
+
+               }
+       }
+
+#undef SKIP
+
+       fclose(mapfd);
+
+       return 0;
+}
+
+/*
+ * Function: rc_map2id
+ *
+ * Purpose: Map ttyname to port id
+ *
+ * Arguments: full pathname of the tty
+ *
+ * Returns: port id, zero if no entry found
+ */
+
+UINT4 rc_map2id(char *name)
+{
+       struct map2id_s *p;
+       char ttyname[PATH_MAX];
+
+       *ttyname = '\0';
+       if (*name != '/')
+               strcpy(ttyname, "/dev/");
+
+       strncat(ttyname, name, sizeof(ttyname));
+
+       for(p = map2id_list; p; p = p->next)
+               if (!strcmp(ttyname, p->name)) return p->id;
+
+       warn("rc_map2id: can't find tty %s in map database", ttyname);
+
+       return 0;
+}
diff --git a/pppd/plugins/radius/config.c b/pppd/plugins/radius/config.c
new file mode 100644 (file)
index 0000000..3bd67fc
--- /dev/null
@@ -0,0 +1,544 @@
+/*
+ * $Id: config.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1995,1996,1997 Lars Fenneberg
+ *
+ * Copyright 1992 Livingston Enterprises, Inc.
+ *
+ * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
+ * and Merit Network, Inc. All Rights Reserved
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include <includes.h>
+#include <radiusclient.h>
+#include <options.h>
+
+static int test_config(char *);
+
+/*
+ * Function: find_option
+ *
+ * Purpose: find an option in the option list
+ *
+ * Returns: pointer to option on success, NULL otherwise
+ */
+
+static OPTION *find_option(char *optname, unsigned int type)
+{
+       int i;
+
+       /* there're so few options that a binary search seems not necessary */
+       for (i = 0; i < num_options; i++) {
+               if (!strcmp(config_options[i].name, optname) &&
+                   (config_options[i].type & type))
+                       return &config_options[i];
+       }
+
+       return NULL;
+}
+
+/*
+ * Function: set_option_...
+ *
+ * Purpose: set a specific option doing type conversions
+ *
+ * Returns: 0 on success, -1 on failure
+ */
+
+static int set_option_str(char *filename, int line, OPTION *option, char *p)
+{
+       if (p)
+               option->val = (void *) strdup(p);
+       else
+               option->val = NULL;
+
+       return 0;
+}
+
+static int set_option_int(char *filename, int line, OPTION *option, char *p)
+{
+       int *iptr;
+
+       if (p == NULL) {
+               error("%s: line %d: bogus option value", filename, line);
+               return (-1);
+       }
+
+       if ((iptr = (int *) malloc(sizeof(iptr))) == NULL) {
+               novm("read_config");
+               return (-1);
+       }
+
+       *iptr = atoi(p);
+       option->val = (void *) iptr;
+
+       return 0;
+}
+
+static int set_option_srv(char *filename, int line, OPTION *option, char *p)
+{
+       SERVER *serv;
+       char *q;
+       struct servent *svp;
+       int i;
+
+       if (p == NULL) {
+               error("%s: line %d: bogus option value", filename, line);
+               return (-1);
+       }
+
+       serv = (SERVER *) option->val;
+
+       for (i = 0; i < serv->max; i++) {
+               free(serv->name[i]);
+       }
+       serv->max = 0;
+
+       while ((p = strtok(p, ", \t")) != NULL) {
+
+               if ((q = strchr(p,':')) != NULL) {
+                       *q = '\0';
+                       q++;
+                       serv->port[serv->max] = atoi(q);
+               } else {
+                       if (!strcmp(option->name,"authserver"))
+                               if ((svp = getservbyname ("radius", "udp")) == NULL)
+                                       serv->port[serv->max] = PW_AUTH_UDP_PORT;
+                               else
+                                       serv->port[serv->max] = ntohs ((unsigned int) svp->s_port);
+                       else if (!strcmp(option->name, "acctserver"))
+                               if ((svp = getservbyname ("radacct", "udp")) == NULL)
+                                       serv->port[serv->max] = PW_ACCT_UDP_PORT;
+                               else
+                                       serv->port[serv->max] = ntohs ((unsigned int) svp->s_port);
+                       else {
+                               error("%s: line %d: no default port for %s", filename, line, option->name);
+                               return (-1);
+                       }
+               }
+
+               serv->name[serv->max++] = strdup(p);
+
+               p = NULL;
+       }
+
+       return 0;
+}
+
+static int set_option_auo(char *filename, int line, OPTION *option, char *p)
+{
+       int *iptr;
+
+       if (p == NULL) {
+               warn("%s: line %d: bogus option value", filename, line);
+               return (-1);
+       }
+
+       if ((iptr = (int *) malloc(sizeof(iptr))) == NULL) {
+                       novm("read_config");
+                       return (-1);
+       }
+
+       *iptr = 0;
+       p = strtok(p, ", \t");
+
+       if (!strncmp(p, "local", 5))
+                       *iptr = AUTH_LOCAL_FST;
+       else if (!strncmp(p, "radius", 6))
+                       *iptr = AUTH_RADIUS_FST;
+       else {
+               error("%s: auth_order: unknown keyword: %s", filename, p);
+               return (-1);
+       }
+
+       p = strtok(NULL, ", \t");
+
+       if (p && (*p != '\0')) {
+               if ((*iptr & AUTH_RADIUS_FST) && !strcmp(p, "local"))
+                       *iptr = (*iptr) | AUTH_LOCAL_SND;
+               else if ((*iptr & AUTH_LOCAL_FST) && !strcmp(p, "radius"))
+                       *iptr = (*iptr) | AUTH_RADIUS_SND;
+               else {
+                       error("%s: auth_order: unknown or unexpected keyword: %s", filename, p);
+                       return (-1);
+               }
+       }
+
+       option->val = (void *) iptr;
+
+       return 0;
+}
+
+
+/*
+ * Function: rc_read_config
+ *
+ * Purpose: read the global config file
+ *
+ * Returns: 0 on success, -1 when failure
+ */
+
+int rc_read_config(char *filename)
+{
+       FILE *configfd;
+       char buffer[512], *p;
+       OPTION *option;
+       int line, pos;
+
+       if ((configfd = fopen(filename,"r")) == NULL)
+       {
+               error("rc_read_config: can't open %s: %m", filename);
+               return (-1);
+       }
+
+       line = 0;
+       while ((fgets(buffer, sizeof(buffer), configfd) != NULL))
+       {
+               line++;
+               p = buffer;
+
+               if ((*p == '\n') || (*p == '#') || (*p == '\0'))
+                       continue;
+
+               p[strlen(p)-1] = '\0';
+
+
+               if ((pos = strcspn(p, "\t ")) == 0) {
+                       error("%s: line %d: bogus format: %s", filename, line, p);
+                       return (-1);
+               }
+
+               p[pos] = '\0';
+
+               if ((option = find_option(p, OT_ANY)) == NULL) {
+                       error("%s: line %d: unrecognized keyword: %s", filename, line, p);
+                       return (-1);
+               }
+
+               if (option->status != ST_UNDEF) {
+                       error("%s: line %d: duplicate option line: %s", filename, line, p);
+                       return (-1);
+               }
+
+               p += pos+1;
+               while (isspace(*p))
+                       p++;
+
+               switch (option->type) {
+                       case OT_STR:
+                                if (set_option_str(filename, line, option, p) < 0)
+                                       return (-1);
+                               break;
+                       case OT_INT:
+                                if (set_option_int(filename, line, option, p) < 0)
+                                       return (-1);
+                               break;
+                       case OT_SRV:
+                                if (set_option_srv(filename, line, option, p) < 0)
+                                       return (-1);
+                               break;
+                       case OT_AUO:
+                                if (set_option_auo(filename, line, option, p) < 0)
+                                       return (-1);
+                               break;
+                       default:
+                               fatal("rc_read_config: impossible case branch!");
+                               abort();
+               }
+       }
+       fclose(configfd);
+
+       return test_config(filename);
+}
+
+/*
+ * Function: rc_conf_str, rc_conf_int, rc_conf_src
+ *
+ * Purpose: get the value of a config option
+ *
+ * Returns: config option value
+ */
+
+char *rc_conf_str(char *optname)
+{
+       OPTION *option;
+
+       option = find_option(optname, OT_STR);
+
+       if (option == NULL)
+               fatal("rc_conf_str: unkown config option requested: %s", optname);
+               return (char *)option->val;
+}
+
+int rc_conf_int(char *optname)
+{
+       OPTION *option;
+
+       option = find_option(optname, OT_INT|OT_AUO);
+
+       if (option == NULL)
+               fatal("rc_conf_int: unkown config option requested: %s", optname);
+       return *((int *)option->val);
+}
+
+SERVER *rc_conf_srv(char *optname)
+{
+       OPTION *option;
+
+       option = find_option(optname, OT_SRV);
+
+       if (option == NULL)
+               fatal("rc_conf_srv: unkown config option requested: %s", optname);
+       return (SERVER *)option->val;
+}
+
+/*
+ * Function: test_config
+ *
+ * Purpose: test the configuration the user supplied
+ *
+ * Returns: 0 on success, -1 when failure
+ */
+
+static int test_config(char *filename)
+{
+#if 0
+       struct stat st;
+       char        *file;
+#endif
+
+       if (!(rc_conf_srv("authserver")->max))
+       {
+               error("%s: no authserver specified", filename);
+               return (-1);
+       }
+       if (!(rc_conf_srv("acctserver")->max))
+       {
+               error("%s: no acctserver specified", filename);
+               return (-1);
+       }
+       if (!rc_conf_str("servers"))
+       {
+               error("%s: no servers file specified", filename);
+               return (-1);
+       }
+       if (!rc_conf_str("dictionary"))
+       {
+               error("%s: no dictionary specified", filename);
+               return (-1);
+       }
+
+       if (rc_conf_int("radius_timeout") <= 0)
+       {
+               error("%s: radius_timeout <= 0 is illegal", filename);
+               return (-1);
+       }
+       if (rc_conf_int("radius_retries") <= 0)
+       {
+               error("%s: radius_retries <= 0 is illegal", filename);
+               return (-1);
+       }
+
+#if 0
+       file = rc_conf_str("login_local");
+       if (stat(file, &st) == 0)
+       {
+               if (!S_ISREG(st.st_mode)) {
+                       error("%s: not a regular file: %s", filename, file);
+                       return (-1);
+               }
+       } else {
+               error("%s: file not found: %s", filename, file);
+               return (-1);
+       }
+       file = rc_conf_str("login_radius");
+       if (stat(file, &st) == 0)
+       {
+               if (!S_ISREG(st.st_mode)) {
+                       error("%s: not a regular file: %s", filename, file);
+                       return (-1);
+               }
+       } else {
+               error("%s: file not found: %s", filename, file);
+               return (-1);
+       }
+#endif
+
+       if (rc_conf_int("login_tries") <= 0)
+       {
+               error("%s: login_tries <= 0 is illegal", filename);
+               return (-1);
+       }
+       if (rc_conf_str("seqfile") == NULL)
+       {
+               error("%s: seqfile not specified", filename);
+               return (-1);
+       }
+       if (rc_conf_int("login_timeout") <= 0)
+       {
+               error("%s: login_timeout <= 0 is illegal", filename);
+               return (-1);
+       }
+       if (rc_conf_str("mapfile") == NULL)
+       {
+               error("%s: mapfile not specified", filename);
+               return (-1);
+       }
+       if (rc_conf_str("nologin") == NULL)
+       {
+               error("%s: nologin not specified", filename);
+               return (-1);
+       }
+
+       return 0;
+}
+
+/*
+ * Function: rc_find_match
+ *
+ * Purpose: see if ip_addr is one of the ip addresses of hostname
+ *
+ * Returns: 0 on success, -1 when failure
+ *
+ */
+
+static int find_match (UINT4 *ip_addr, char *hostname)
+{
+       UINT4           addr;
+       char          **paddr;
+       struct hostent *hp;
+
+       if (rc_good_ipaddr (hostname) == 0)
+       {
+               if (*ip_addr == ntohl(inet_addr (hostname)))
+               {
+                       return (0);
+               }
+       }
+       else
+       {
+               if ((hp = gethostbyname (hostname)) == (struct hostent *) NULL)
+               {
+                       return (-1);
+               }
+               for (paddr = hp->h_addr_list; *paddr; paddr++)
+               {
+                       addr = ** (UINT4 **) paddr;
+                       if (ntohl(addr) == *ip_addr)
+                       {
+                               return (0);
+                       }
+               }
+       }
+       return (-1);
+}
+
+/*
+ * Function: rc_find_server
+ *
+ * Purpose: search a server in the servers file
+ *
+ * Returns: 0 on success, -1 on failure
+ *
+ */
+
+int rc_find_server (char *server_name, UINT4 *ip_addr, char *secret)
+{
+       UINT4   myipaddr = 0;
+       int             len;
+       int             result;
+       FILE           *clientfd;
+       char           *h;
+       char           *s;
+       char           *host2;
+       char            buffer[128];
+       char            hostnm[AUTH_ID_LEN + 1];
+
+       /* Get the IP address of the authentication server */
+       if ((*ip_addr = rc_get_ipaddr (server_name)) == (UINT4) 0)
+               return (-1);
+
+       if ((clientfd = fopen (rc_conf_str("servers"), "r")) == (FILE *) NULL)
+       {
+               error("rc_find_server: couldn't open file: %m: %s", rc_conf_str("servers"));
+               return (-1);
+       }
+
+       myipaddr = rc_own_ipaddress();
+
+       result = 0;
+       while (fgets (buffer, sizeof (buffer), clientfd) != (char *) NULL)
+       {
+               if (*buffer == '#')
+                       continue;
+
+               if ((h = strtok (buffer, " \t\n")) == NULL) /* first hostname */
+                       continue;
+
+               memset (hostnm, '\0', AUTH_ID_LEN);
+               len = strlen (h);
+               if (len > AUTH_ID_LEN)
+               {
+                       len = AUTH_ID_LEN;
+               }
+               strncpy (hostnm, h, (size_t) len);
+               hostnm[AUTH_ID_LEN] = '\0';
+
+               if ((s = strtok (NULL, " \t\n")) == NULL) /* and secret field */
+                       continue;
+
+               memset (secret, '\0', MAX_SECRET_LENGTH);
+               len = strlen (s);
+               if (len > MAX_SECRET_LENGTH)
+               {
+                       len = MAX_SECRET_LENGTH;
+               }
+               strncpy (secret, s, (size_t) len);
+               secret[MAX_SECRET_LENGTH] = '\0';
+
+               if (!strchr (hostnm, '/')) /* If single name form */
+               {
+                       if (find_match (ip_addr, hostnm) == 0)
+                       {
+                               result++;
+                               break;
+                       }
+               }
+               else /* <name1>/<name2> "paired" form */
+               {
+                       strtok (hostnm, "/");
+                       if (find_match (&myipaddr, hostnm) == 0)
+                       {            /* If we're the 1st name, target is 2nd */
+                               host2 = strtok (NULL, " ");
+                               if (find_match (ip_addr, host2) == 0)
+                               {
+                                       result++;
+                                       break;
+                               }
+                       }
+                       else    /* If we were 2nd name, target is 1st name */
+                       {
+                               if (find_match (ip_addr, hostnm) == 0)
+                               {
+                                       result++;
+                                       break;
+                               }
+                       }
+               }
+       }
+       fclose (clientfd);
+       if (result == 0)
+       {
+               memset (buffer, '\0', sizeof (buffer));
+               memset (secret, '\0', sizeof (secret));
+               error("rc_find_server: couldn't find RADIUS server %s in %s",
+                     server_name, rc_conf_str("servers"));
+               return (-1);
+       }
+       return 0;
+}
diff --git a/pppd/plugins/radius/dict.c b/pppd/plugins/radius/dict.c
new file mode 100644 (file)
index 0000000..72b3e70
--- /dev/null
@@ -0,0 +1,450 @@
+/*
+ * $Id: dict.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 2002 Roaring Penguin Software Inc.
+ *
+ * Copyright (C) 1995,1996,1997 Lars Fenneberg
+ *
+ * Copyright 1992 Livingston Enterprises, Inc.
+ *
+ * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
+ * and Merit Network, Inc. All Rights Reserved
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include <includes.h>
+#include <radiusclient.h>
+
+static DICT_ATTR *dictionary_attributes = NULL;
+static DICT_VALUE *dictionary_values = NULL;
+static VENDOR_DICT *vendor_dictionaries = NULL;
+
+/*
+ * Function: rc_read_dictionary
+ *
+ * Purpose: Initialize the dictionary.  Read all ATTRIBUTES into
+ *         the dictionary_attributes list.  Read all VALUES into
+ *         the dictionary_values list.  Construct VENDOR dictionaries
+ *          as required.
+ *
+ */
+
+int rc_read_dictionary (char *filename)
+{
+       FILE           *dictfd;
+       char            dummystr[AUTH_ID_LEN];
+       char            namestr[AUTH_ID_LEN];
+       char            valstr[AUTH_ID_LEN];
+       char            attrstr[AUTH_ID_LEN];
+       char            typestr[AUTH_ID_LEN];
+       char            vendorstr[AUTH_ID_LEN];
+       int             line_no;
+       DICT_ATTR      *attr;
+       DICT_VALUE     *dval;
+       VENDOR_DICT    *vdict;
+       char            buffer[256];
+       int             value;
+       int             type;
+       int             n;
+       int             retcode;
+       if ((dictfd = fopen (filename, "r")) == (FILE *) NULL)
+       {
+               error( "rc_read_dictionary: couldn't open dictionary %s: %s",
+                               filename, strerror(errno));
+               return (-1);
+       }
+
+       line_no = 0;
+       retcode = 0;
+       while (fgets (buffer, sizeof (buffer), dictfd) != (char *) NULL)
+       {
+               line_no++;
+
+               /* Skip empty space */
+               if (*buffer == '#' || *buffer == '\0' || *buffer == '\n')
+               {
+                       continue;
+               }
+
+               if (strncmp (buffer, "VENDOR", 6) == 0) {
+                   /* Read the VENDOR line */
+                   if (sscanf(buffer, "%s%s%d", dummystr, namestr, &value) != 3) {
+                       error("rc_read_dictionary: invalid vendor on line %d of dictionary %s",
+                             line_no, filename);
+                       retcode = -1;
+                       break;
+                   }
+                   /* Validate entry */
+                   if (strlen (namestr) > NAME_LENGTH) {
+                       error("rc_read_dictionary: invalid name length on line %d of dictionary %s",
+                             line_no, filename);
+                       retcode = -1;
+                       break;
+                   }
+                   /* Create new vendor entry */
+                   vdict = (VENDOR_DICT *) malloc (sizeof (VENDOR_DICT));
+                   if (!vdict) {
+                       novm("rc_read_dictionary");
+                       retcode = -1;
+                       break;
+                   }
+                   strcpy(vdict->vendorname, namestr);
+                   vdict->vendorcode = value;
+                   vdict->attributes = NULL;
+                   vdict->next = vendor_dictionaries;
+                   vendor_dictionaries = vdict;
+               }
+               else if (strncmp (buffer, "ATTRIBUTE", 9) == 0)
+               {
+
+                       /* Read the ATTRIBUTE line.  It is one of:
+                        * ATTRIBUTE attr_name attr_val type         OR
+                        * ATTRIBUTE attr_name attr_val type vendor  */
+                       vendorstr[0] = 0;
+                       n = sscanf(buffer, "%s%s%s%s%s", dummystr, namestr, valstr, typestr, vendorstr);
+                       if (n != 4 && n != 5)
+                       {
+                               error("rc_read_dictionary: invalid attribute on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+
+                       /*
+                        * Validate all entries
+                        */
+                       if (strlen (namestr) > NAME_LENGTH)
+                       {
+                               error("rc_read_dictionary: invalid name length on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+
+                       if (strlen (vendorstr) > NAME_LENGTH)
+                       {
+                               error("rc_read_dictionary: invalid name length on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+
+                       if (!isdigit (*valstr))
+                       {
+                               error("rc_read_dictionary: invalid value on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+                       value = atoi (valstr);
+
+                       if (strcmp (typestr, "string") == 0)
+                       {
+                               type = PW_TYPE_STRING;
+                       }
+                       else if (strcmp (typestr, "integer") == 0)
+                       {
+                               type = PW_TYPE_INTEGER;
+                       }
+                       else if (strcmp (typestr, "ipaddr") == 0)
+                       {
+                               type = PW_TYPE_IPADDR;
+                       }
+                       else if (strcmp (typestr, "date") == 0)
+                       {
+                               type = PW_TYPE_DATE;
+                       }
+                       else
+                       {
+                               error("rc_read_dictionary: invalid type on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+
+                       /* Search for vendor if supplied */
+                       if (*vendorstr) {
+                           vdict = rc_dict_findvendor(vendorstr);
+                           if (!vdict) {
+                                   error("rc_read_dictionary: unknown vendor on line %d of dictionary %s",
+                                         line_no, filename);
+                                   retcode = -1;
+                                   break;
+                           }
+                       } else {
+                           vdict = NULL;
+                       }
+                       /* Create a new attribute for the list */
+                       if ((attr =
+                               (DICT_ATTR *) malloc (sizeof (DICT_ATTR)))
+                                                       == (DICT_ATTR *) NULL)
+                       {
+                               novm("rc_read_dictionary");
+                               retcode = -1;
+                               break;
+                       }
+                       strcpy (attr->name, namestr);
+                       if (vdict) {
+                           attr->vendorcode = vdict->vendorcode;
+                       } else {
+                           attr->vendorcode = VENDOR_NONE;
+                       }
+                       attr->value = value;
+                       attr->type = type;
+
+                       /* Insert it into the list */
+                       if (vdict) {
+                           attr->next = vdict->attributes;
+                           vdict->attributes = attr;
+                       } else {
+                           attr->next = dictionary_attributes;
+                           dictionary_attributes = attr;
+                       }
+               }
+               else if (strncmp (buffer, "VALUE", 5) == 0)
+               {
+                       /* Read the VALUE line */
+                       if (sscanf (buffer, "%s%s%s%s", dummystr, attrstr,
+                                   namestr, valstr) != 4)
+                       {
+                               error("rc_read_dictionary: invalid value entry on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+
+                       /*
+                        * Validate all entries
+                        */
+                       if (strlen (attrstr) > NAME_LENGTH)
+                       {
+                               error("rc_read_dictionary: invalid attribute length on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+
+                       if (strlen (namestr) > NAME_LENGTH)
+                       {
+                               error("rc_read_dictionary: invalid name length on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+
+                       if (!isdigit (*valstr))
+                       {
+                               error("rc_read_dictionary: invalid value on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+                       value = atoi (valstr);
+
+                       /* Create a new VALUE entry for the list */
+                       if ((dval =
+                               (DICT_VALUE *) malloc (sizeof (DICT_VALUE)))
+                                                       == (DICT_VALUE *) NULL)
+                       {
+                               novm("rc_read_dictionary");
+                               retcode = -1;
+                               break;
+                       }
+                       strcpy (dval->attrname, attrstr);
+                       strcpy (dval->name, namestr);
+                       dval->value = value;
+
+                       /* Insert it into the list */
+                       dval->next = dictionary_values;
+                       dictionary_values = dval;
+               }
+               else if (strncmp (buffer, "INCLUDE", 7) == 0)
+               {
+                       /* Read the INCLUDE line */
+                       if (sscanf (buffer, "%s%s", dummystr, namestr) != 2)
+                       {
+                               error("rc_read_dictionary: invalid include entry on line %d of dictionary %s",
+                                     line_no, filename);
+                               retcode = -1;
+                               break;
+                       }
+                       if (rc_read_dictionary(namestr) == -1)
+                       {
+                               retcode = -1;
+                               break;
+                       }
+               }
+       }
+       fclose (dictfd);
+       return retcode;
+}
+
+/*
+ * Function: rc_dict_getattr
+ *
+ * Purpose: Return the full attribute structure based on the
+ *         attribute id number and vendor code.  If vendor code is VENDOR_NONE,
+ *          non-vendor-specific attributes are used
+ *
+ */
+
+DICT_ATTR *rc_dict_getattr (int attribute, int vendor)
+{
+       DICT_ATTR      *attr;
+       VENDOR_DICT    *dict;
+
+       if (vendor == VENDOR_NONE) {
+           attr = dictionary_attributes;
+           while (attr != (DICT_ATTR *) NULL) {
+               if (attr->value == attribute) {
+                   return (attr);
+               }
+               attr = attr->next;
+           }
+       } else {
+           dict = rc_dict_getvendor(vendor);
+           if (!dict) {
+               return NULL;
+           }
+           attr = dict->attributes;
+           while (attr) {
+               if (attr->value == attribute) {
+                   return attr;
+               }
+               attr = attr->next;
+           }
+       }
+       return NULL;
+}
+
+/*
+ * Function: rc_dict_findattr
+ *
+ * Purpose: Return the full attribute structure based on the
+ *         attribute name.
+ *
+ */
+
+DICT_ATTR *rc_dict_findattr (char *attrname)
+{
+       DICT_ATTR      *attr;
+       VENDOR_DICT    *dict;
+
+       attr = dictionary_attributes;
+       while (attr != (DICT_ATTR *) NULL)
+       {
+               if (strcasecmp (attr->name, attrname) == 0)
+               {
+                       return (attr);
+               }
+               attr = attr->next;
+       }
+
+       /* Search vendor-specific dictionaries */
+       dict = vendor_dictionaries;
+       while (dict) {
+           attr = dict->attributes;
+           while (attr) {
+               if (strcasecmp (attr->name, attrname) == 0) {
+                   return (attr);
+               }
+               attr = attr->next;
+           }
+           dict = dict->next;
+       }
+       return ((DICT_ATTR *) NULL);
+}
+
+
+/*
+ * Function: rc_dict_findval
+ *
+ * Purpose: Return the full value structure based on the
+ *         value name.
+ *
+ */
+
+DICT_VALUE *rc_dict_findval (char *valname)
+{
+       DICT_VALUE     *val;
+
+       val = dictionary_values;
+       while (val != (DICT_VALUE *) NULL)
+       {
+               if (strcasecmp (val->name, valname) == 0)
+               {
+                       return (val);
+               }
+               val = val->next;
+       }
+       return ((DICT_VALUE *) NULL);
+}
+
+/*
+ * Function: dict_getval
+ *
+ * Purpose: Return the full value structure based on the
+ *          actual value and the associated attribute name.
+ *
+ */
+
+DICT_VALUE * rc_dict_getval (UINT4 value, char *attrname)
+{
+       DICT_VALUE     *val;
+
+       val = dictionary_values;
+       while (val != (DICT_VALUE *) NULL)
+       {
+               if (strcmp (val->attrname, attrname) == 0 &&
+                               val->value == value)
+               {
+                       return (val);
+               }
+               val = val->next;
+       }
+       return ((DICT_VALUE *) NULL);
+}
+
+/*
+ * Function: rc_dict_findvendor
+ *
+ * Purpose: Return the vendor's dictionary given the vendor name.
+ *
+ */
+VENDOR_DICT * rc_dict_findvendor (char *vendorname)
+{
+    VENDOR_DICT *dict;
+
+    dict = vendor_dictionaries;
+    while (dict) {
+       if (!strcmp(vendorname, dict->vendorname)) {
+           return dict;
+       }
+       dict = dict->next;
+    }
+    return NULL;
+}
+
+/*
+ * Function: rc_dict_getvendor
+ *
+ * Purpose: Return the vendor's dictionary given the vendor ID
+ *
+ */
+VENDOR_DICT * rc_dict_getvendor (int id)
+{
+    VENDOR_DICT *dict;
+
+    dict = vendor_dictionaries;
+    while (dict) {
+       if (id == dict->vendorcode) {
+           return dict;
+       }
+       dict = dict->next;
+    }
+    return NULL;
+}
diff --git a/pppd/plugins/radius/etc/dictionary b/pppd/plugins/radius/etc/dictionary
new file mode 100644 (file)
index 0000000..6dd086a
--- /dev/null
@@ -0,0 +1,253 @@
+#
+# Updated 97/06/13 to livingston-radius-2.01 miquels@cistron.nl
+#
+#      This file contains dictionary translations for parsing
+#      requests and generating responses.  All transactions are
+#      composed of Attribute/Value Pairs.  The value of each attribute
+#      is specified as one of 4 data types.  Valid data types are:
+#
+#      string - 0-253 octets
+#      ipaddr - 4 octets in network byte order
+#      integer - 32 bit value in big endian order (high byte first)
+#      date - 32 bit value in big endian order - seconds since
+#                                      00:00:00 GMT,  Jan.  1,  1970
+#
+#      Enumerated values are stored in the user file with dictionary
+#      VALUE translations for easy administration.
+#
+#      Example:
+#
+#      ATTRIBUTE         VALUE
+#      ---------------   -----
+#      Framed-Protocol = PPP
+#      7               = 1     (integer encoding)
+#
+
+# The dictionary format now supports vendor-specific attributes.
+# Vendors are introduced like this:
+#
+#      VENDOR vendor_name vendor_number
+#
+# For example:
+#
+#      VENDOR RoaringPenguin 10055
+#
+# Vendor-specific attributes have a fifth field with the name of the
+# vendor.  For example:
+#
+#       ATTRIBUTE RP-Upstream-Speed-Limit 1 integer RoaringPenguin
+#
+# introduces a Roaring Penguin vendor-specific attribbute with name
+# RP-Upstream-Speed-Limit, number 1, type integer and vendor RoaringPenguin.
+
+#
+#      Following are the proper new names. Use these.
+#
+ATTRIBUTE      User-Name               1       string
+ATTRIBUTE      Password                2       string
+ATTRIBUTE      CHAP-Password           3       string
+ATTRIBUTE      NAS-IP-Address          4       ipaddr
+ATTRIBUTE      NAS-Port-Id             5       integer
+ATTRIBUTE      Service-Type            6       integer
+ATTRIBUTE      Framed-Protocol         7       integer
+ATTRIBUTE      Framed-IP-Address       8       ipaddr
+ATTRIBUTE      Framed-IP-Netmask       9       ipaddr
+ATTRIBUTE      Framed-Routing          10      integer
+ATTRIBUTE      Filter-Id               11      string
+ATTRIBUTE      Framed-MTU              12      integer
+ATTRIBUTE      Framed-Compression      13      integer
+ATTRIBUTE      Login-IP-Host           14      ipaddr
+ATTRIBUTE      Login-Service           15      integer
+ATTRIBUTE      Login-TCP-Port          16      integer
+ATTRIBUTE      Reply-Message           18      string
+ATTRIBUTE      Callback-Number         19      string
+ATTRIBUTE      Callback-Id             20      string
+ATTRIBUTE      Framed-Route            22      string
+ATTRIBUTE      Framed-IPX-Network      23      ipaddr
+ATTRIBUTE      State                   24      string
+ATTRIBUTE      Class                   25      string
+ATTRIBUTE      Session-Timeout         27      integer
+ATTRIBUTE      Idle-Timeout            28      integer
+ATTRIBUTE      Termination-Action      29      integer
+ATTRIBUTE      Called-Station-Id       30      string
+ATTRIBUTE      Calling-Station-Id      31      string
+ATTRIBUTE      NAS-Identifier          32      string
+ATTRIBUTE      Acct-Status-Type        40      integer
+ATTRIBUTE      Acct-Delay-Time         41      integer
+ATTRIBUTE      Acct-Input-Octets       42      integer
+ATTRIBUTE      Acct-Output-Octets      43      integer
+ATTRIBUTE      Acct-Session-Id         44      string
+ATTRIBUTE      Acct-Authentic          45      integer
+ATTRIBUTE      Acct-Session-Time       46      integer
+ATTRIBUTE      Acct-Input-Packets      47      integer
+ATTRIBUTE      Acct-Output-Packets     48      integer
+ATTRIBUTE      Acct-Terminate-Cause    49      integer
+ATTRIBUTE       Chap-Challenge          60      string
+ATTRIBUTE      NAS-Port-Type           61      integer
+ATTRIBUTE      Port-Limit              62      integer
+ATTRIBUTE      Connect-Info            77      string
+
+# RFC 2869
+ATTRIBUTE      Acct-Interim-Interval   85      integer
+
+#
+#      Experimental Non Protocol Attributes used by Cistron-Radiusd
+#
+ATTRIBUTE      Huntgroup-Name          221     string
+ATTRIBUTE      User-Category           1029    string
+ATTRIBUTE      Group-Name              1030    string
+ATTRIBUTE      Simultaneous-Use        1034    integer
+ATTRIBUTE      Strip-User-Name         1035    integer
+ATTRIBUTE      Fall-Through            1036    integer
+ATTRIBUTE      Add-Port-To-IP-Address  1037    integer
+ATTRIBUTE      Exec-Program            1038    string
+ATTRIBUTE      Exec-Program-Wait       1039    string
+ATTRIBUTE      Hint                    1040    string
+
+#
+#      Non-Protocol Attributes
+#      These attributes are used internally by the server
+#
+ATTRIBUTE      Expiration                21    date
+ATTRIBUTE      Auth-Type               1000    integer
+ATTRIBUTE      Menu                    1001    string
+ATTRIBUTE      Termination-Menu        1002    string
+ATTRIBUTE      Prefix                  1003    string
+ATTRIBUTE      Suffix                  1004    string
+ATTRIBUTE      Group                   1005    string
+ATTRIBUTE      Crypt-Password          1006    string
+ATTRIBUTE      Connect-Rate            1007    integer
+
+#
+#       Experimental, implementation specific attributes
+#
+# Limit session traffic
+ATTRIBUTE      Session-Octets-Limit    227     integer
+# What to assume as limit - 0 in+out, 1 in, 2 out, 3 max(in,out)
+ATTRIBUTE      Octets-Direction        228     integer
+
+#
+#      Integer Translations
+#
+
+#      User Types
+
+VALUE          Service-Type            Login-User              1
+VALUE          Service-Type            Framed-User             2
+VALUE          Service-Type            Callback-Login-User     3
+VALUE          Service-Type            Callback-Framed-User    4
+VALUE          Service-Type            Outbound-User           5
+VALUE          Service-Type            Administrative-User     6
+VALUE          Service-Type            NAS-Prompt-User         7
+
+#      Framed Protocols
+
+VALUE          Framed-Protocol         PPP                     1
+VALUE          Framed-Protocol         SLIP                    2
+
+#      Framed Routing Values
+
+VALUE          Framed-Routing          None                    0
+VALUE          Framed-Routing          Broadcast               1
+VALUE          Framed-Routing          Listen                  2
+VALUE          Framed-Routing          Broadcast-Listen        3
+
+#      Framed Compression Types
+
+VALUE          Framed-Compression      None                    0
+VALUE          Framed-Compression      Van-Jacobson-TCP-IP     1
+
+#      Login Services
+
+VALUE          Login-Service           Telnet                  0
+VALUE          Login-Service           Rlogin                  1
+VALUE          Login-Service           TCP-Clear               2
+VALUE          Login-Service           PortMaster              3
+
+#      Status Types
+
+VALUE          Acct-Status-Type        Start                   1
+VALUE          Acct-Status-Type        Stop                    2
+VALUE          Acct-Status-Type        Accounting-On           7
+VALUE          Acct-Status-Type        Accounting-Off          8
+
+#      Authentication Types
+
+VALUE          Acct-Authentic          RADIUS                  1
+VALUE          Acct-Authentic          Local                   2
+VALUE          Acct-Authentic          PowerLink128            100
+
+#      Termination Options
+
+VALUE          Termination-Action      Default                 0
+VALUE          Termination-Action      RADIUS-Request          1
+
+#      NAS Port Types, available in 3.3.1 and later
+
+VALUE          NAS-Port-Type           Async                   0
+VALUE          NAS-Port-Type           Sync                    1
+VALUE          NAS-Port-Type           ISDN                    2
+VALUE          NAS-Port-Type           ISDN-V120               3
+VALUE          NAS-Port-Type           ISDN-V110               4
+
+#      Acct Terminate Causes, available in 3.3.2 and later
+
+VALUE           Acct-Terminate-Cause    User-Request            1
+VALUE           Acct-Terminate-Cause    Lost-Carrier            2
+VALUE           Acct-Terminate-Cause    Lost-Service            3
+VALUE           Acct-Terminate-Cause    Idle-Timeout            4
+VALUE           Acct-Terminate-Cause    Session-Timeout         5
+VALUE           Acct-Terminate-Cause    Admin-Reset             6
+VALUE           Acct-Terminate-Cause    Admin-Reboot            7
+VALUE           Acct-Terminate-Cause    Port-Error              8
+VALUE           Acct-Terminate-Cause    NAS-Error               9
+VALUE           Acct-Terminate-Cause    NAS-Request             10
+VALUE           Acct-Terminate-Cause    NAS-Reboot              11
+VALUE           Acct-Terminate-Cause    Port-Unneeded           12
+VALUE           Acct-Terminate-Cause    Port-Preempted          13
+VALUE           Acct-Terminate-Cause    Port-Suspended          14
+VALUE           Acct-Terminate-Cause    Service-Unavailable     15
+VALUE           Acct-Terminate-Cause    Callback                16
+VALUE           Acct-Terminate-Cause    User-Error              17
+VALUE           Acct-Terminate-Cause    Host-Request            18
+
+#
+#      Non-Protocol Integer Translations
+#
+
+VALUE          Auth-Type               Local                   0
+VALUE          Auth-Type               System                  1
+VALUE          Auth-Type               SecurID                 2
+VALUE          Auth-Type               Crypt-Local             3
+VALUE          Auth-Type               Reject                  4
+
+#
+#      Cistron extensions
+#
+VALUE          Auth-Type               Pam                     253
+VALUE          Auth-Type               None                    254
+
+#
+#      Experimental Non-Protocol Integer Translations for Cistron-Radiusd
+#
+VALUE          Fall-Through            No                      0
+VALUE          Fall-Through            Yes                     1
+VALUE          Add-Port-To-IP-Address  No                      0
+VALUE          Add-Port-To-IP-Address  Yes                     1
+
+#
+#      Configuration Values
+#      uncomment these two lines to turn account expiration on
+#
+
+#VALUE         Server-Config           Password-Expiration     30
+#VALUE         Server-Config           Password-Warning        5
+
+#       Octets-Direction
+VALUE          Octets-Direction        Sum                     0
+VALUE          Octets-Direction        Input                   1
+VALUE          Octets-Direction        Output                  2
+VALUE          Octets-Direction        MaxOveral               3
+VALUE          Octets-Direction        MaxSession              4
+
+INCLUDE /etc/radiusclient/dictionary.microsoft
diff --git a/pppd/plugins/radius/etc/dictionary.ascend b/pppd/plugins/radius/etc/dictionary.ascend
new file mode 100644 (file)
index 0000000..f9f9bdc
--- /dev/null
@@ -0,0 +1,295 @@
+#
+# Ascend dictionary.
+#
+#
+# Version:     1.00  21-Jul-1997  Jens Glaser <jens@regio.net>
+#
+
+
+#
+#      Ascend specific extensions
+#      Used by ASCEND MAX/Pipeline products
+#
+ATTRIBUTE      Ascend-FCP-Parameter            119     string
+ATTRIBUTE      Ascend-Modem-PortNo             120     integer
+ATTRIBUTE      Ascend-Modem-SlotNo             121     integer
+ATTRIBUTE      Ascend-Modem-ShelfNo            122     integer
+ATTRIBUTE      Ascend-Call-Attempt-Limit       123     integer
+ATTRIBUTE      Ascend-Call-Block-Duration      124     integer
+ATTRIBUTE      Ascend-Maximum-Call-Duration    125     integer
+ATTRIBUTE      Ascend-Temporary-Rtes           126     integer
+ATTRIBUTE       Tunneling-Protocol              127     integer
+ATTRIBUTE       Ascend-Shared-Profile-Enable    128     integer
+ATTRIBUTE      Ascend-Primary-Home-Agent       129     string
+ATTRIBUTE      Ascend-Secondary-Home-Agent     130     string
+ATTRIBUTE      Ascend-Dialout-Allowed          131     integer
+ATTRIBUTE      Ascend-Client-Gateway           132     ipaddr
+ATTRIBUTE      Ascend-BACP-Enable              133     integer
+ATTRIBUTE      Ascend-DHCP-Maximum-Leases      134     integer
+ATTRIBUTE      Ascend-Client-Primary-DNS       135     ipaddr
+ATTRIBUTE      Ascend-Client-Secondary-DNS     136     ipaddr
+ATTRIBUTE      Ascend-Client-Assign-DNS        137     integer
+ATTRIBUTE      Ascend-User-Acct-Type           138     integer
+ATTRIBUTE      Ascend-User-Acct-Host           139     ipaddr
+ATTRIBUTE      Ascend-User-Acct-Port           140     integer
+ATTRIBUTE      Ascend-User-Acct-Key            141     string
+ATTRIBUTE      Ascend-User-Acct-Base           142     integer
+ATTRIBUTE      Ascend-User-Acct-Time           143     integer
+ATTRIBUTE      Ascend-Assign-IP-Client         144     ipaddr
+ATTRIBUTE      Ascend-Assign-IP-Server         145     ipaddr
+ATTRIBUTE      Ascend-Assign-IP-Global-Pool    146     string
+ATTRIBUTE      Ascend-DHCP-Reply               147     integer
+ATTRIBUTE      Ascend-DHCP-Pool-Number         148     integer
+ATTRIBUTE      Ascend-Expect-Callback          149     integer
+ATTRIBUTE      Ascend-Event-Type               150     integer
+ATTRIBUTE      Ascend-Session-Svr-Key          151     string
+ATTRIBUTE      Ascend-Multicast-Rate-Limit     152     integer
+ATTRIBUTE      Ascend-IF-Netmask               153     ipaddr
+ATTRIBUTE      Ascend-Remote-Addr              154     ipaddr
+ATTRIBUTE      Ascend-Multicast-Client         155     integer
+ATTRIBUTE      Ascend-FR-Circuit-Name          156     string
+ATTRIBUTE      Ascend-FR-LinkUp                157     integer
+ATTRIBUTE      Ascend-FR-Nailed-Grp            158     integer
+ATTRIBUTE      Ascend-FR-Type                  159     integer
+ATTRIBUTE      Ascend-FR-Link-Mgt              160     integer
+ATTRIBUTE      Ascend-FR-N391                  161     integer
+ATTRIBUTE      Ascend-FR-DCE-N392              162     integer
+ATTRIBUTE      Ascend-FR-DTE-N392              163     integer
+ATTRIBUTE      Ascend-FR-DCE-N393              164     integer
+ATTRIBUTE      Ascend-FR-DTE-N393              165     integer
+ATTRIBUTE      Ascend-FR-T391                  166     integer
+ATTRIBUTE      Ascend-FR-T392                  167     integer
+ATTRIBUTE      Ascend-Bridge-Address           168     string
+ATTRIBUTE       Ascend-TS-Idle-Limit            169     integer
+ATTRIBUTE       Ascend-TS-Idle-Mode             170     integer
+ATTRIBUTE      Ascend-DBA-Monitor              171     integer
+ATTRIBUTE      Ascend-Base-Channel-Count       172     integer
+ATTRIBUTE      Ascend-Minimum-Channels         173     integer
+ATTRIBUTE      Ascend-IPX-Route                174     string
+ATTRIBUTE      Ascend-FT1-Caller               175     integer
+ATTRIBUTE      Ascend-Backup                   176     string
+ATTRIBUTE      Ascend-Call-Type                177     integer
+ATTRIBUTE      Ascend-Group                    178     string
+ATTRIBUTE      Ascend-FR-DLCI                  179     integer
+ATTRIBUTE      Ascend-FR-Profile-Name          180     string
+ATTRIBUTE      Ascend-Ara-PW                   181     string
+ATTRIBUTE      Ascend-IPX-Node-Addr            182     string
+ATTRIBUTE      Ascend-Home-Agent-IP-Addr       183     ipaddr
+ATTRIBUTE      Ascend-Home-Agent-Password      184     string
+ATTRIBUTE      Ascend-Home-Network-Name        185     string
+ATTRIBUTE      Ascend-Home-Agent-UDP-Port      186     integer
+ATTRIBUTE      Ascend-Multilink-ID             187     integer
+ATTRIBUTE      Ascend-Num-In-Multilink         188     integer
+ATTRIBUTE      Ascend-First-Dest               189     ipaddr
+ATTRIBUTE      Ascend-Pre-Input-Octets         190     integer
+ATTRIBUTE      Ascend-Pre-Output-Octets        191     integer
+ATTRIBUTE      Ascend-Pre-Input-Packets        192     integer
+ATTRIBUTE      Ascend-Pre-Output-Packets       193     integer
+ATTRIBUTE      Ascend-Maximum-Time             194     integer
+ATTRIBUTE      Ascend-Disconnect-Cause         195     integer
+ATTRIBUTE      Ascend-Connect-Progress         196     integer
+ATTRIBUTE      Ascend-Data-Rate                197     integer
+ATTRIBUTE      Ascend-PreSession-Time          198     integer
+ATTRIBUTE      Ascend-Token-Idle               199     integer
+ATTRIBUTE      Ascend-Token-Immediate          200     integer
+ATTRIBUTE      Ascend-Require-Auth             201     integer
+ATTRIBUTE      Ascend-Number-Sessions          202     string
+ATTRIBUTE      Ascend-Authen-Alias             203     string
+ATTRIBUTE      Ascend-Token-Expiry             204     integer
+ATTRIBUTE      Ascend-Menu-Selector            205     string
+ATTRIBUTE      Ascend-Menu-Item                206     string
+ATTRIBUTE      Ascend-PW-Warntime              207     integer
+ATTRIBUTE      Ascend-PW-Lifetime              208     integer
+ATTRIBUTE      Ascend-IP-Direct                209     ipaddr
+ATTRIBUTE      Ascend-PPP-VJ-Slot-Comp         210     integer
+ATTRIBUTE      Ascend-PPP-VJ-1172              211     integer
+ATTRIBUTE      Ascend-PPP-Async-Map            212     integer
+ATTRIBUTE      Ascend-Third-Prompt             213     string
+ATTRIBUTE      Ascend-Send-Secret              214     string
+ATTRIBUTE      Ascend-Receive-Secret           215     string
+ATTRIBUTE      Ascend-IPX-Peer-Mode            216     integer
+ATTRIBUTE      Ascend-IP-Pool-Definition       217     string
+ATTRIBUTE      Ascend-Assign-IP-Pool           218     integer
+ATTRIBUTE      Ascend-FR-Direct                219     integer
+ATTRIBUTE      Ascend-FR-Direct-Profile        220     string
+ATTRIBUTE      Ascend-FR-Direct-DLCI           221     integer
+ATTRIBUTE      Ascend-Handle-IPX               222     integer
+ATTRIBUTE      Ascend-Netware-timeout          223     integer
+ATTRIBUTE      Ascend-IPX-Alias                224     integer
+ATTRIBUTE      Ascend-Metric                   225     integer
+ATTRIBUTE      Ascend-PRI-Number-Type          226     integer
+ATTRIBUTE      Ascend-Dial-Number              227     string
+ATTRIBUTE      Ascend-Route-IP                 228     integer
+ATTRIBUTE      Ascend-Route-IPX                229     integer
+ATTRIBUTE      Ascend-Bridge                   230     integer
+ATTRIBUTE      Ascend-Send-Auth                231     integer
+ATTRIBUTE      Ascend-Send-Passwd              232     string
+ATTRIBUTE      Ascend-Link-Compression         233     integer
+ATTRIBUTE      Ascend-Target-Util              234     integer
+ATTRIBUTE      Ascend-Maximum-Channels         235     integer
+ATTRIBUTE      Ascend-Inc-Channel-Count        236     integer
+ATTRIBUTE      Ascend-Dec-Channel-Count        237     integer
+ATTRIBUTE      Ascend-Seconds-Of-History       238     integer
+ATTRIBUTE      Ascend-History-Weigh-Type       239     integer
+ATTRIBUTE      Ascend-Add-Seconds              240     integer
+ATTRIBUTE      Ascend-Remove-Seconds           241     integer
+ATTRIBUTE      Ascend-Idle-Limit               244     integer
+ATTRIBUTE      Ascend-Preempt-Limit            245     integer
+ATTRIBUTE      Ascend-Callback                 246     integer
+ATTRIBUTE      Ascend-Data-Svc                 247     integer
+ATTRIBUTE      Ascend-Force-56                 248     integer
+ATTRIBUTE      Ascend-Billing-Number           249     string
+ATTRIBUTE      Ascend-Call-By-Call             250     integer
+ATTRIBUTE      Ascend-Transit-Number           251     string
+ATTRIBUTE      Ascend-Host-Info                252     string
+ATTRIBUTE      Ascend-PPP-Address              253     ipaddr
+ATTRIBUTE      Ascend-MPP-Idle-Percent         254     integer
+ATTRIBUTE      Ascend-Xmit-Rate                255     integer
+
+
+
+# Ascend protocols
+VALUE          Service-Type            Dialout-Framed-User     5
+VALUE          Framed-Protocol         ARA                     255
+VALUE          Framed-Protocol         MPP                     256
+VALUE          Framed-Protocol         EURAW                   257
+VALUE          Framed-Protocol         EUUI                    258
+VALUE          Framed-Protocol         X25                     259
+VALUE          Framed-Protocol         COMB                    260
+VALUE          Framed-Protocol         FR                      261
+VALUE          Framed-Protocol         MP                      262
+VALUE          Framed-Protocol         FR-CIR                  263
+
+
+#
+#      Ascend specific extensions
+#      Used by ASCEND MAX/Pipeline products (see above)
+#
+
+VALUE          Ascend-FR-Direct        FR-Direct-No            0
+VALUE          Ascend-FR-Direct        FR-Direct-Yes           1
+VALUE          Ascend-Handle-IPX       Handle-IPX-None         0
+VALUE          Ascend-Handle-IPX       Handle-IPX-Client       1
+VALUE          Ascend-Handle-IPX       Handle-IPX-Server       2
+VALUE          Ascend-IPX-Peer-Mode    IPX-Peer-Router         0
+VALUE          Ascend-IPX-Peer-Mode    IPX-Peer-Dialin         1
+VALUE          Ascend-Call-Type        Nailed                  1
+VALUE          Ascend-Call-Type        Nailed/Mpp              2
+VALUE          Ascend-Call-Type        Perm/Switched           3
+VALUE          Ascend-FT1-Caller       FT1-No                  0
+VALUE          Ascend-FT1-Caller       FT1-Yes                 1
+VALUE          Ascend-PRI-Number-Type  Unknown-Number          0
+VALUE          Ascend-PRI-Number-Type  Intl-Number             1
+VALUE          Ascend-PRI-Number-Type  National-Number         2
+VALUE          Ascend-PRI-Number-Type  Local-Number            4
+VALUE          Ascend-PRI-Number-Type  Abbrev-Number           5
+VALUE          Ascend-Route-IPX        Route-IPX-No            0
+VALUE          Ascend-Route-IPX        Route-IPX-Yes           1
+VALUE          Ascend-Bridge           Bridge-No               0
+VALUE          Ascend-Bridge           Bridge-Yes              1
+VALUE                  Ascend-TS-Idle-Mode     TS-Idle-None            0
+VALUE          Ascend-TS-Idle-Mode     TS-Idle-Input           1
+VALUE                  Ascend-TS-Idle-Mode     TS-Idle-Input-Output    2
+VALUE          Ascend-Send-Auth        Send-Auth-None          0
+VALUE          Ascend-Send-Auth        Send-Auth-PAP           1
+VALUE          Ascend-Send-Auth        Send-Auth-CHAP          2
+VALUE          Ascend-Send-Auth        Send-Auth-MS-CHAP       3
+VALUE          Ascend-Link-Compression Link-Comp-None          0
+VALUE          Ascend-Link-Compression Link-Comp-Stac          1
+VALUE          Ascend-Link-Compression Link-Comp-Stac-Draft-9  2
+VALUE          Ascend-Link-Compression Link-Comp-MS-Stac       3
+VALUE          Ascend-History-Weigh-Type       History-Constant        0
+VALUE          Ascend-History-Weigh-Type       History-Linear          1
+VALUE          Ascend-History-Weigh-Type       History-Quadratic       2
+VALUE          Ascend-Callback         Callback-No             0
+VALUE          Ascend-Callback         Callback-Yes            1
+VALUE          Ascend-Expect-Callback  Expect-Callback-No      0
+VALUE          Ascend-Expect-Callback  Expect-Callback-Yes     1
+VALUE          Ascend-Data-Svc         Switched-Voice-Bearer   0
+VALUE          Ascend-Data-Svc         Switched-56KR           1
+VALUE          Ascend-Data-Svc         Switched-64K            2
+VALUE          Ascend-Data-Svc         Switched-64KR           3
+VALUE          Ascend-Data-Svc         Switched-56K            4
+VALUE          Ascend-Data-Svc         Switched-384KR          5
+VALUE          Ascend-Data-Svc         Switched-384K           6
+VALUE          Ascend-Data-Svc         Switched-1536K          7
+VALUE          Ascend-Data-Svc         Switched-1536KR         8
+VALUE          Ascend-Data-Svc         Switched-128K           9
+VALUE          Ascend-Data-Svc         Switched-192K           10
+VALUE          Ascend-Data-Svc         Switched-256K           11
+VALUE          Ascend-Data-Svc         Switched-320K           12
+VALUE          Ascend-Data-Svc         Switched-384K-MR        13
+VALUE          Ascend-Data-Svc         Switched-448K           14
+VALUE          Ascend-Data-Svc         Switched-512K           15
+VALUE          Ascend-Data-Svc         Switched-576K           16
+VALUE          Ascend-Data-Svc         Switched-640K           17
+VALUE          Ascend-Data-Svc         Switched-704K           18
+VALUE          Ascend-Data-Svc         Switched-768K           19
+VALUE          Ascend-Data-Svc         Switched-832K           20
+VALUE          Ascend-Data-Svc         Switched-896K           21
+VALUE          Ascend-Data-Svc         Switched-960K           22
+VALUE          Ascend-Data-Svc         Switched-1024K          23
+VALUE          Ascend-Data-Svc         Switched-1088K          24
+VALUE          Ascend-Data-Svc         Switched-1152K          25
+VALUE          Ascend-Data-Svc         Switched-1216K          26
+VALUE          Ascend-Data-Svc         Switched-1280K          27
+VALUE          Ascend-Data-Svc         Switched-1344K          28
+VALUE          Ascend-Data-Svc         Switched-1408K          29
+VALUE          Ascend-Data-Svc         Switched-1472K          30
+VALUE          Ascend-Data-Svc         Switched-1600K          31
+VALUE          Ascend-Data-Svc         Switched-1664K          32
+VALUE          Ascend-Data-Svc         Switched-1728K          33
+VALUE          Ascend-Data-Svc         Switched-1792K          34
+VALUE          Ascend-Data-Svc         Switched-1856K          35
+VALUE          Ascend-Data-Svc         Switched-1920K          36
+VALUE          Ascend-Data-Svc         Switched-inherited              37
+VALUE          Ascend-Data-Svc         Switched-restricted-bearer-x30  38
+VALUE          Ascend-Data-Svc         Switched-clear-bearer-v110      39
+VALUE          Ascend-Data-Svc         Switched-restricted-64-x30      40
+VALUE          Ascend-Data-Svc         Switched-clear-56-v110          41
+VALUE          Ascend-Data-Svc         Switched-modem                  42
+VALUE          Ascend-Data-Svc         Switched-atmodem                43
+VALUE          Ascend-Data-Svc         Nailed-56KR             1
+VALUE          Ascend-Data-Svc         Nailed-64K              2
+VALUE          Ascend-Force-56         Force-56-No             0
+VALUE          Ascend-Force-56         Force-56-Yes            1
+VALUE          Ascend-PW-Lifetime      Lifetime-In-Days        0
+VALUE          Ascend-PW-Warntime      Days-Of-Warning         0
+VALUE          Ascend-PPP-VJ-1172      PPP-VJ-1172             1
+VALUE          Ascend-PPP-VJ-Slot-Comp VJ-Slot-Comp-No         1
+VALUE          Ascend-Require-Auth     Not-Require-Auth        0
+VALUE          Ascend-Require-Auth     Require-Auth            1
+VALUE          Ascend-Token-Immediate  Tok-Imm-No              0
+VALUE          Ascend-Token-Immediate  Tok-Imm-Yes             1
+VALUE          Ascend-DBA-Monitor              DBA-Transmit            0
+VALUE          Ascend-DBA-Monitor      DBA-Transmit-Recv       1
+VALUE          Ascend-DBA-Monitor      DBA-None                2
+VALUE          Ascend-FR-Type          Ascend-FR-DTE           0
+VALUE          Ascend-FR-Type          Ascend-FR-DCE           1
+VALUE          Ascend-FR-Type          Ascend-FR-NNI           2
+VALUE          Ascend-FR-Link-Mgt      Ascend-FR-No-Link-Mgt   0
+VALUE          Ascend-FR-Link-Mgt      Ascend-FR-T1-617D       1
+VALUE          Ascend-FR-Link-Mgt      Ascend-FR-Q-933A        2
+VALUE          Ascend-FR-LinkUp        Ascend-LinkUp-Default   0
+VALUE          Ascend-FR-LinkUp        Ascend-LinkUp-AlwaysUp  1
+VALUE          Ascend-Multicast-Client Multicast-No            0
+VALUE          Ascend-Multicast-Client Multicast-Yes           1
+VALUE          Ascend-User-Acct-Type   Ascend-User-Acct-None   0
+VALUE          Ascend-User-Acct-Type   Ascend-User-Acct-User   1
+VALUE          Ascend-User-Acct-Type   Ascend-User-Acct-User-Default   2
+VALUE          Ascend-User-Acct-Base   Base-10                 0
+VALUE          Ascend-User-Acct-Base   Base-16                 1
+VALUE          Ascend-DHCP-Reply       DHCP-Reply-No           0
+VALUE          Ascend-DHCP-Reply       DHCP-Reply-Yes          1
+VALUE          Ascend-Client-Assign-DNS        DNS-Assign-No           0
+VALUE          Ascend-Client-Assign-DNS        DNS-Assign-Yes          1
+VALUE          Ascend-Event-Type       Ascend-ColdStart        1
+VALUE          Ascend-Event-Type       Ascend-Session-Event    2
+VALUE          Ascend-BACP-Enable      BACP-No                 0
+VALUE          Ascend-BACP-Enable      BACP-Yes                1
+VALUE          Ascend-Dialout-Allowed  Dialout-Not-Allowed     0
+VALUE          Ascend-Dialout-Allowed  Dialout-Allowed         1
+VALUE          Ascend-Shared-Profile-Enable    Shared-Profile-No       0
+VALUE          Ascend-Shared-Profile-Enable    Shared-Profile-Yes      1
+VALUE          Ascend-Temporary-Rtes   Temp-Rtes-No            0
+VALUE          Ascend-Temporary-Rtes   Temp-Rtes-Yes           1
diff --git a/pppd/plugins/radius/etc/dictionary.compat b/pppd/plugins/radius/etc/dictionary.compat
new file mode 100644 (file)
index 0000000..fe3f087
--- /dev/null
@@ -0,0 +1,45 @@
+#
+#      Obsolete names for backwards compatibility with older users files.
+#
+ATTRIBUTE      Client-Id               4       ipaddr
+ATTRIBUTE      Client-Port-Id          5       integer
+ATTRIBUTE      User-Service-Type       6       integer
+ATTRIBUTE      Framed-Address          8       ipaddr
+ATTRIBUTE      Framed-Netmask          9       ipaddr
+ATTRIBUTE      Framed-Filter-Id        11      string
+ATTRIBUTE      Login-Host              14      ipaddr
+ATTRIBUTE      Login-Port              16      integer
+ATTRIBUTE      Old-Password            17      string
+ATTRIBUTE      Port-Message            18      string
+ATTRIBUTE      Dialback-No             19      string
+ATTRIBUTE      Dialback-Name           20      string
+ATTRIBUTE      Challenge-State         24      string
+VALUE          Framed-Compression      Van-Jacobsen-TCP-IP     1
+VALUE          Framed-Compression      VJ-TCP-IP               1
+VALUE          Service-Type            Shell-User              6
+VALUE          Auth-Type               Unix                    1
+VALUE          Service-Type            Dialback-Login-User     3
+VALUE          Service-Type            Dialback-Framed-User    4
+
+#
+#      For compatibility with MERIT users files.
+#
+ATTRIBUTE      NAS-Port                5       integer
+ATTRIBUTE      Login-Host              14      ipaddr
+ATTRIBUTE      Login-Callback-Number   19      string
+ATTRIBUTE      Framed-Callback-Id      20      string
+ATTRIBUTE      Client-Port-DNIS        30      string
+ATTRIBUTE      Caller-ID               31      string
+VALUE          Service-Type            Login                   1
+VALUE          Service-Type            Framed                  2
+VALUE          Service-Type            Callback-Login          3
+VALUE          Service-Type            Callback-Framed         4
+VALUE          Service-Type            Exec-User               7
+
+#
+#      For compatibility with ESVA RADIUS, Old Cistron RADIUS
+#
+ATTRIBUTE      Session                 1034    integer
+ATTRIBUTE      User-Name-Is-Star       1035    integer
+VALUE          User-Name-Is-Star       No                      0
+VALUE          User-Name-Is-Star       Yes                     1
diff --git a/pppd/plugins/radius/etc/dictionary.merit b/pppd/plugins/radius/etc/dictionary.merit
new file mode 100644 (file)
index 0000000..7d675e5
--- /dev/null
@@ -0,0 +1,17 @@
+#
+#      Experimental extensions, configuration only (for check-items)
+#      Names/numbers as per the MERIT extensions (if possible).
+#
+ATTRIBUTE      NAS-Identifier          32      string
+ATTRIBUTE      Proxy-State             33      string
+ATTRIBUTE      Login-LAT-Service       34      string
+ATTRIBUTE      Login-LAT-Node          35      string
+ATTRIBUTE      Login-LAT-Group         36      string
+ATTRIBUTE      Framed-AppleTalk-Link   37      integer
+ATTRIBUTE      Framed-AppleTalk-Network 38     integer
+ATTRIBUTE      Framed-AppleTalk-Zone   39      string
+ATTRIBUTE       Acct-Input-Packets     47      integer
+ATTRIBUTE       Acct-Output-Packets    48      integer
+# 8 is a MERIT extension.
+VALUE          Service-Type            Authenticate-Only       8
+
diff --git a/pppd/plugins/radius/etc/dictionary.microsoft b/pppd/plugins/radius/etc/dictionary.microsoft
new file mode 100644 (file)
index 0000000..da3a317
--- /dev/null
@@ -0,0 +1,81 @@
+#
+#      Microsoft's VSA's, from RFC 2548
+#
+#      $Id: dictionary.microsoft,v 1.1 2004/11/14 07:26:26 paulus Exp $
+#
+
+VENDOR         Microsoft       311     Microsoft
+
+ATTRIBUTE      MS-CHAP-Response        1       string  Microsoft
+ATTRIBUTE      MS-CHAP-Error           2       string  Microsoft
+ATTRIBUTE      MS-CHAP-CPW-1           3       string  Microsoft
+ATTRIBUTE      MS-CHAP-CPW-2           4       string  Microsoft
+ATTRIBUTE      MS-CHAP-LM-Enc-PW       5       string  Microsoft
+ATTRIBUTE      MS-CHAP-NT-Enc-PW       6       string  Microsoft
+ATTRIBUTE      MS-MPPE-Encryption-Policy 7     string  Microsoft
+# This is referred to as both singular and plural in the RFC.
+# Plural seems to make more sense.
+ATTRIBUTE      MS-MPPE-Encryption-Type 8       string  Microsoft
+ATTRIBUTE      MS-MPPE-Encryption-Types  8     string  Microsoft
+ATTRIBUTE      MS-RAS-Vendor           9       integer Microsoft
+ATTRIBUTE      MS-CHAP-Domain          10      string  Microsoft
+ATTRIBUTE      MS-CHAP-Challenge       11      string  Microsoft
+ATTRIBUTE      MS-CHAP-MPPE-Keys       12      string  Microsoft
+ATTRIBUTE      MS-BAP-Usage            13      integer Microsoft
+ATTRIBUTE      MS-Link-Utilization-Threshold 14 integer        Microsoft
+ATTRIBUTE      MS-Link-Drop-Time-Limit 15      integer Microsoft
+ATTRIBUTE      MS-MPPE-Send-Key        16      string  Microsoft
+ATTRIBUTE      MS-MPPE-Recv-Key        17      string  Microsoft
+ATTRIBUTE      MS-RAS-Version          18      string  Microsoft
+ATTRIBUTE      MS-Old-ARAP-Password    19      string  Microsoft
+ATTRIBUTE      MS-New-ARAP-Password    20      string  Microsoft
+ATTRIBUTE      MS-ARAP-PW-Change-Reason 21     integer Microsoft
+
+ATTRIBUTE      MS-Filter               22      string  Microsoft
+ATTRIBUTE      MS-Acct-Auth-Type       23      integer Microsoft
+ATTRIBUTE      MS-Acct-EAP-Type        24      integer Microsoft
+
+ATTRIBUTE      MS-CHAP2-Response       25      string  Microsoft
+ATTRIBUTE      MS-CHAP2-Success        26      string  Microsoft
+ATTRIBUTE      MS-CHAP2-CPW            27      string  Microsoft
+
+ATTRIBUTE      MS-Primary-DNS-Server   28      ipaddr  Microsoft
+ATTRIBUTE      MS-Secondary-DNS-Server 29      ipaddr  Microsoft
+ATTRIBUTE      MS-Primary-NBNS-Server  30      ipaddr  Microsoft
+ATTRIBUTE      MS-Secondary-NBNS-Server 31     ipaddr  Microsoft
+
+#ATTRIBUTE     MS-ARAP-Challenge       33      string  Microsoft
+
+
+#
+#      Integer Translations
+#
+
+#      MS-BAP-Usage Values
+
+VALUE          MS-BAP-Usage            Not-Allowed     0
+VALUE          MS-BAP-Usage            Allowed         1
+VALUE          MS-BAP-Usage            Required        2
+
+#      MS-ARAP-Password-Change-Reason Values
+
+VALUE  MS-ARAP-PW-Change-Reason        Just-Change-Password            1
+VALUE  MS-ARAP-PW-Change-Reason        Expired-Password                2
+VALUE  MS-ARAP-PW-Change-Reason        Admin-Requires-Password-Change  3
+VALUE  MS-ARAP-PW-Change-Reason        Password-Too-Short              4
+
+#      MS-Acct-Auth-Type Values
+
+VALUE          MS-Acct-Auth-Type       PAP             1
+VALUE          MS-Acct-Auth-Type       CHAP            2
+VALUE          MS-Acct-Auth-Type       MS-CHAP-1       3
+VALUE          MS-Acct-Auth-Type       MS-CHAP-2       4
+VALUE          MS-Acct-Auth-Type       EAP             5
+
+#      MS-Acct-EAP-Type Values
+
+VALUE          MS-Acct-EAP-Type        MD5             4
+VALUE          MS-Acct-EAP-Type        OTP             5
+VALUE          MS-Acct-EAP-Type        Generic-Token-Card      6
+VALUE          MS-Acct-EAP-Type        TLS             13
+
diff --git a/pppd/plugins/radius/etc/issue b/pppd/plugins/radius/etc/issue
new file mode 100644 (file)
index 0000000..6254487
--- /dev/null
@@ -0,0 +1,5 @@
+(\I)
+-----------------------------------------------------
+\S \R (\N) (port \L)
+-----------------------------------------------------
+
diff --git a/pppd/plugins/radius/etc/port-id-map b/pppd/plugins/radius/etc/port-id-map
new file mode 100644 (file)
index 0000000..9088a0b
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# port-id-map
+#
+# This file describes the ttyname to port id mapping. The port id
+# is reported as part of a RADIUS authentication or accouting request.
+#
+#ttyname (as returned by ttyname(3))   port-id
+/dev/tty1      1
+/dev/tty2      2
+/dev/tty3      3
+/dev/tty4      4
+/dev/tty5      5
+/dev/tty6      6
+/dev/tty7      7
+/dev/tty8      8
+/dev/ttyS0     9
+/dev/ttyS1     10
+/dev/ttyS2     11
+/dev/ttyS3     12
+/dev/ttyS4     13
+/dev/ttyS5     14
+/dev/ttyS6     15
+/dev/ttyS7     16
\ No newline at end of file
diff --git a/pppd/plugins/radius/etc/radiusclient.conf b/pppd/plugins/radius/etc/radiusclient.conf
new file mode 100644 (file)
index 0000000..44c18a5
--- /dev/null
@@ -0,0 +1,91 @@
+# General settings
+
+# specify which authentication comes first respectively which
+# authentication is used. possible values are: "radius" and "local".
+# if you specify "radius,local" then the RADIUS server is asked
+# first then the local one. if only one keyword is specified only
+# this server is asked.
+auth_order     radius
+
+# maximum login tries a user has (default 4)
+login_tries    4
+
+# timeout for all login tries (default 60)
+# if this time is exceeded the user is kicked out 
+login_timeout  60
+
+# name of the nologin file which when it exists disables logins.
+# it may be extended by the ttyname which will result in
+# a terminal specific lock (e.g. /etc/nologin.ttyS2 will disable
+# logins on /dev/ttyS2)   (default /etc/nologin)
+nologin /etc/nologin
+
+# name of the issue file. it's only display when no username is passed
+# on the radlogin command line  (default /etc/radiusclient/issue)
+issue  /usr/local/etc/radiusclient/issue
+
+# RADIUS settings
+
+# RADIUS server to use for authentication requests. this config
+# item can appear more then one time. if multiple servers are
+# defined they are tried in a round robin fashion if one
+# server is not answering.
+# optionally you can specify a the port number on which is remote
+# RADIUS listens separated by a colon from the hostname. if
+# no port is specified /etc/services is consulted of the radius
+# service. if this fails also a compiled in default is used.
+authserver     localhost:1812
+
+# RADIUS server to use for accouting requests. All that I
+# said for authserver applies, too. 
+#
+acctserver     localhost:1813
+
+# file holding shared secrets used for the communication
+# between the RADIUS client and server
+servers                /usr/local/etc/radiusclient/servers
+
+# dictionary of allowed attributes and values
+# just like in the normal RADIUS distributions
+dictionary     /usr/local/etc/radiusclient/dictionary
+
+# program to call for a RADIUS authenticated login 
+# (default /usr/sbin/login.radius)
+login_radius   /usr/local/sbin/login.radius
+
+# file which holds sequence number for communication with the
+# RADIUS server
+seqfile                /var/run/radius.seq
+
+# file which specifies mapping between ttyname and NAS-Port attribute
+mapfile                /usr/local/etc/radiusclient/port-id-map
+
+# default authentication realm to append to all usernames if no
+# realm was explicitly specified by the user
+# the radiusd directly form Livingston doesnt use any realms, so leave
+# it blank then
+default_realm
+
+# time to wait for a reply from the RADIUS server
+radius_timeout 10
+
+# resend request this many times before trying the next server
+radius_retries 3
+
+# NAS-Identifier
+#
+# If supplied, this option will cause the client to send the given string
+# as the contents of the NAS-Identifier attribute in RADIUS requests.  No
+# NAS-IP-Address attribute will be sent in this case.
+#
+# The default behavior is to send a NAS-IP-Address option and not send
+# a NAS-Identifier.  The value of the NAS-IP-Address option is chosen
+# by resolving the system hostname.
+
+# nas_identifier MyUniqueNASName
+
+# LOCAL settings
+
+# program to execute for local login
+# it must support the -f flag for preauthenticated login
+login_local    /bin/login
diff --git a/pppd/plugins/radius/etc/radiusclient.conf.in b/pppd/plugins/radius/etc/radiusclient.conf.in
new file mode 100644 (file)
index 0000000..eae292c
--- /dev/null
@@ -0,0 +1,91 @@
+# General settings
+
+# specify which authentication comes first respectively which
+# authentication is used. possible values are: "radius" and "local".
+# if you specify "radius,local" then the RADIUS server is asked
+# first then the local one. if only one keyword is specified only
+# this server is asked.
+auth_order     radius
+
+# maximum login tries a user has (default 4)
+login_tries    4
+
+# timeout for all login tries (default 60)
+# if this time is exceeded the user is kicked out 
+login_timeout  60
+
+# name of the nologin file which when it exists disables logins.
+# it may be extended by the ttyname which will result in
+# a terminal specific lock (e.g. /etc/nologin.ttyS2 will disable
+# logins on /dev/ttyS2)   (default /etc/nologin)
+nologin /etc/nologin
+
+# name of the issue file. it's only display when no username is passed
+# on the radlogin command line  (default /etc/radiusclient/issue)
+issue  @pkgsysconfdir@/issue
+
+# RADIUS settings
+
+# RADIUS server to use for authentication requests. this config
+# item can appear more then one time. if multiple servers are
+# defined they are tried in a round robin fashion if one
+# server is not answering.
+# optionally you can specify a the port number on which is remote
+# RADIUS listens separated by a colon from the hostname. if
+# no port is specified /etc/services is consulted of the radius
+# service. if this fails also a compiled in default is used.
+authserver     localhost:1812
+
+# RADIUS server to use for accouting requests. All that I
+# said for authserver applies, too. 
+#
+acctserver     localhost:1813
+
+# file holding shared secrets used for the communication
+# between the RADIUS client and server
+servers                @pkgsysconfdir@/servers
+
+# dictionary of allowed attributes and values
+# just like in the normal RADIUS distributions
+dictionary     @pkgsysconfdir@/dictionary
+
+# program to call for a RADIUS authenticated login 
+# (default /usr/sbin/login.radius)
+login_radius   @sbindir@/login.radius
+
+# file which holds sequence number for communication with the
+# RADIUS server
+seqfile                /var/run/radius.seq
+
+# file which specifies mapping between ttyname and NAS-Port attribute
+mapfile                @pkgsysconfdir@/port-id-map
+
+# default authentication realm to append to all usernames if no
+# realm was explicitly specified by the user
+# the radiusd directly form Livingston doesnt use any realms, so leave
+# it blank then
+default_realm
+
+# time to wait for a reply from the RADIUS server
+radius_timeout 10
+
+# resend request this many times before trying the next server
+radius_retries 3
+
+# NAS-Identifier
+#
+# If supplied, this option will cause the client to send the given string
+# as the contents of the NAS-Identifier attribute in RADIUS requests.  No
+# NAS-IP-Address attribute will be sent in this case.
+#
+# The default behavior is to send a NAS-IP-Address option and not send
+# a NAS-Identifier.  The value of the NAS-IP-Address option is chosen
+# by resolving the system hostname.
+
+# nas_identifier MyUniqueNASName
+
+# LOCAL settings
+
+# program to execute for local login
+# it must support the -f flag for preauthenticated login
+login_local    /bin/login
diff --git a/pppd/plugins/radius/etc/realms b/pppd/plugins/radius/etc/realms
new file mode 100644 (file)
index 0000000..3440364
--- /dev/null
@@ -0,0 +1,22 @@
+# /etc/radiusclient/realms
+#
+# Handle realm @netservers.co.uk on an internal RADIUS server
+# (note the server must be told to strip the realm)
+
+#authserver netservers.co.uk 192.168.1.1:1812
+#acctserver netservers.co.uk 192.168.1.1:1813
+
+# users in realm @example.com are handled by separate servers
+
+#authserver example.com 10.0.0.1:1812
+#acctserver example.com 10.0.0.2:1813
+
+# the DEFAULT realm matches users that do not supply a realm
+
+#authserver DEFAULT 192.168.1.1:1812
+#acctserver DEFAULT 192.168.1.1:1813
+
+# Any realms that do not match in the realms file automatically fall 
+# through to the standard radius plugin which uses the servers in the 
+# radiusclient.conf file.  Note that this is different than the
+# DEFAULT realm match, above.
diff --git a/pppd/plugins/radius/etc/servers b/pppd/plugins/radius/etc/servers
new file mode 100644 (file)
index 0000000..b061bf9
--- /dev/null
@@ -0,0 +1,4 @@
+#Server Name or Client/Server pair             Key
+#----------------                              ---------------
+#portmaster.elemental.net                      hardlyasecret
+#portmaster2.elemental.net                     donttellanyone
diff --git a/pppd/plugins/radius/includes.h b/pppd/plugins/radius/includes.h
new file mode 100644 (file)
index 0000000..f48d9b7
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * $Id: includes.h,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1997 Lars Fenneberg
+ *
+ * Copyright 1992 Livingston Enterprises, Inc.
+ *
+ * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
+ * and Merit Network, Inc. All Rights Reserved
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include <sys/types.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <errno.h>
+#include <netdb.h>
+#include <syslog.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include <limits.h>
+
+#ifndef PATH_MAX
+#define PATH_MAX        1024
+#endif
+
+#ifndef UCHAR_MAX
+# define UCHAR_MAX       255
+#endif
+
+#include <pwd.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <time.h>
+
+#include "magic.h"
+
+/* rlib/lock.c */
+int do_lock_exclusive(int);
+int do_unlock(int);
diff --git a/pppd/plugins/radius/ip_util.c b/pppd/plugins/radius/ip_util.c
new file mode 100644 (file)
index 0000000..cd59e7b
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * $Id: ip_util.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1995,1996,1997 Lars Fenneberg
+ *
+ * Copyright 1992 Livingston Enterprises, Inc.
+ *
+ * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
+ * and Merit Network, Inc. All Rights Reserved
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include <includes.h>
+#include <radiusclient.h>
+
+/*
+ * Function: rc_get_ipaddr
+ *
+ * Purpose: return an IP address in host long notation from a host
+ *          name or address in dot notation.
+ *
+ * Returns: 0 on failure
+ */
+
+UINT4 rc_get_ipaddr (char *host)
+{
+       struct hostent *hp;
+
+       if (rc_good_ipaddr (host) == 0)
+       {
+               return ntohl(inet_addr (host));
+       }
+       else if ((hp = gethostbyname (host)) == (struct hostent *) NULL)
+       {
+               error("rc_get_ipaddr: couldn't resolve hostname: %s", host);
+               return ((UINT4) 0);
+       }
+       return ntohl((*(UINT4 *) hp->h_addr));
+}
+
+/*
+ * Function: rc_good_ipaddr
+ *
+ * Purpose: check for valid IP address in standard dot notation.
+ *
+ * Returns: 0 on success, -1 when failure
+ *
+ */
+
+int rc_good_ipaddr (char *addr)
+{
+       int             dot_count;
+       int             digit_count;
+
+       if (addr == NULL)
+               return (-1);
+
+       dot_count = 0;
+       digit_count = 0;
+       while (*addr != '\0' && *addr != ' ')
+       {
+               if (*addr == '.')
+               {
+                       dot_count++;
+                       digit_count = 0;
+               }
+               else if (!isdigit (*addr))
+               {
+                       dot_count = 5;
+               }
+               else
+               {
+                       digit_count++;
+                       if (digit_count > 3)
+                       {
+                               dot_count = 5;
+                       }
+               }
+               addr++;
+       }
+       if (dot_count != 3)
+       {
+               return (-1);
+       }
+       else
+       {
+               return (0);
+       }
+}
+
+/*
+ * Function: rc_ip_hostname
+ *
+ * Purpose: Return a printable host name (or IP address in dot notation)
+ *         for the supplied IP address.
+ *
+ */
+
+const char *rc_ip_hostname (UINT4 h_ipaddr)
+{
+       struct hostent  *hp;
+       UINT4           n_ipaddr = htonl (h_ipaddr);
+
+       if ((hp = gethostbyaddr ((char *) &n_ipaddr, sizeof (struct in_addr),
+                           AF_INET)) == NULL) {
+               error("rc_ip_hostname: couldn't look up host by addr: %08lX", h_ipaddr);
+       }
+
+       return ((hp==NULL)?"unknown":hp->h_name);
+}
+
+/*
+ * Function: rc_own_ipaddress
+ *
+ * Purpose: get the IP address of this host in host order
+ *
+ * Returns: IP address on success, 0 on failure
+ *
+ */
+
+UINT4 rc_own_ipaddress(void)
+{
+       static UINT4 this_host_ipaddr = 0;
+
+       if (!this_host_ipaddr) {
+               if ((this_host_ipaddr = rc_get_ipaddr (hostname)) == 0) {
+                       error("rc_own_ipaddress: couldn't get own IP address");
+                       return 0;
+               }
+       }
+
+       return this_host_ipaddr;
+}
diff --git a/pppd/plugins/radius/lock.c b/pppd/plugins/radius/lock.c
new file mode 100644 (file)
index 0000000..482e97c
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * $Id: lock.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1997 Lars Fenneberg
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#include "includes.h"
+#include <unistd.h>
+#include <fcntl.h>
+
+int do_lock_exclusive(int fd)
+{
+       struct flock fl;
+       int res;
+
+       memset((void *)&fl, 0, sizeof(fl));
+
+       fl.l_type = F_WRLCK;
+       fl.l_whence = fl.l_start = 0;
+       fl.l_len = 0; /* 0 means "to end of file" */
+
+       res = fcntl(fd, F_SETLK, &fl);
+
+       if ((res == -1) && (errno == EAGAIN))
+               errno = EWOULDBLOCK;
+
+       return res;
+}
+
+int do_unlock(int fd)
+{
+       struct flock fl;
+
+       memset((void *)&fl, 0, sizeof(fl));
+
+       fl.l_type = F_UNLCK;
+       fl.l_whence = fl.l_start = 0;
+       fl.l_len = 0; /* 0 means "to end of file" */
+
+       return fcntl(fd, F_SETLK, &fl);
+}
diff --git a/pppd/plugins/radius/md5.c b/pppd/plugins/radius/md5.c
new file mode 100644 (file)
index 0000000..8af03aa
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * $Id: md5.c,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ */
+#include "md5.h"
+
+void rc_md5_calc (unsigned char *output, unsigned char *input, unsigned int inlen)
+{
+       MD5_CTX         context;
+
+       MD5_Init (&context);
+       MD5_Update (&context, input, inlen);
+       MD5_Final (output, &context);
+}
diff --git a/pppd/plugins/radius/options.h b/pppd/plugins/radius/options.h
new file mode 100644 (file)
index 0000000..aa55305
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * $Id: options.h,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1996 Lars Fenneberg
+ *
+ * See the file COPYRIGHT for the respective terms and conditions. 
+ * If the file is missing contact me at lf@elemental.net 
+ * and I'll send you a copy.
+ *
+ */
+
+#define OPTION_LEN     64
+
+/* ids for different option types */
+#define OT_STR         (1<<0)    /* string */
+#define OT_INT         (1<<1)    /* integer */
+#define OT_SRV         (1<<2)    /* server list */
+#define OT_AUO         (1<<3)    /* authentication order */
+
+#define OT_ANY         ((unsigned int)~0) /* used internally */
+
+/* status types */
+#define ST_UNDEF       (1<<0)    /* option is undefined */
+
+typedef struct _option {
+       char name[OPTION_LEN];    /* name of the option */
+       int type, status;         /* type and status    */
+       void *val;                /* pointer to option value */
+} OPTION;
+
+static SERVER acctserver = {0};
+static SERVER authserver = {0};
+
+int default_tries = 4;
+int default_timeout = 60;
+
+static OPTION config_options[] = {
+/* internally used options */
+{"config_file",                OT_STR, ST_UNDEF, NULL},
+/* General options */
+{"auth_order",         OT_AUO, ST_UNDEF, NULL},
+{"login_tries",                OT_INT, ST_UNDEF, &default_tries},
+{"login_timeout",      OT_INT, ST_UNDEF, &default_timeout},
+{"nologin",            OT_STR, ST_UNDEF, "/etc/nologin"},
+{"issue",              OT_STR, ST_UNDEF, "/etc/radiusclient/issue"},
+/* RADIUS specific options */
+{"authserver",         OT_SRV, ST_UNDEF, &authserver},
+{"acctserver",         OT_SRV, ST_UNDEF, &acctserver},
+{"servers",            OT_STR, ST_UNDEF, NULL},
+{"dictionary",         OT_STR, ST_UNDEF, NULL},
+{"login_radius",       OT_STR, ST_UNDEF, "/usr/sbin/login.radius"},
+{"seqfile",            OT_STR, ST_UNDEF, NULL},
+{"mapfile",            OT_STR, ST_UNDEF, NULL},
+{"default_realm",      OT_STR, ST_UNDEF, NULL},
+{"radius_timeout",     OT_INT, ST_UNDEF, NULL},
+{"radius_retries",     OT_INT, ST_UNDEF, NULL},
+{"nas_identifier",      OT_STR, ST_UNDEF, ""},
+/* local options */
+{"login_local",                OT_STR, ST_UNDEF, NULL},
+};
+
+static int num_options = ((sizeof(config_options))/(sizeof(config_options[0])));
diff --git a/pppd/plugins/radius/pathnames.h b/pppd/plugins/radius/pathnames.h
new file mode 100644 (file)
index 0000000..5aa4c60
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * $Id: pathnames.h,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1995,1996 Lars Fenneberg
+ *
+ * Copyright 1992 Livingston Enterprises, Inc.
+ *
+ * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
+ * and Merit Network, Inc. All Rights Reserved
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#ifndef PATHNAMES_H
+#define PATHNAMES_H
+
+#define _PATH_DEV_URANDOM      "/dev/urandom"          /* Linux only */
+#define _PATH_ETC_ISSUE                "/etc/issue"
+
+/* normally defined in the Makefile */
+#ifndef _PATH_ETC_RADIUSCLIENT_CONF
+#define _PATH_ETC_RADIUSCLIENT_CONF       "/etc/radiusclient.conf"
+#endif
+
+#endif /* PATHNAMES_H */
index 264b0ade4a0391eeb7e520f39f563a02350599bb..e8d794671849fc5e2bd5132759b0704ccd6b94b3 100644 (file)
@@ -24,7 +24,7 @@
 *
 ***********************************************************************/
 static char const RCSID[] =
-"$Id: radius.c,v 1.26 2004/10/28 00:22:54 paulus Exp $";
+"$Id: radius.c,v 1.27 2004/11/14 07:26:26 paulus Exp $";
 
 #include "pppd.h"
 #include "chap-new.h"
@@ -41,6 +41,8 @@ static char const RCSID[] =
 #include <sys/types.h>
 #include <sys/time.h>
 #include <string.h>
+#include <netinet/in.h>
+#include <stdlib.h>
 
 #define BUF_LEN 1024
 
@@ -738,18 +740,18 @@ radius_setmppekeys(VALUE_PAIR *vp, REQUEST_INFO *req_info,
 
     memcpy(plain, vp->strvalue, sizeof(plain));
 
-    MD5Init(&Context);
-    MD5Update(&Context, req_info->secret, strlen(req_info->secret));
-    MD5Update(&Context, req_info->request_vector, AUTH_VECTOR_LEN);
-    MD5Final(buf, &Context);
+    MD5_Init(&Context);
+    MD5_Update(&Context, req_info->secret, strlen(req_info->secret));
+    MD5_Update(&Context, req_info->request_vector, AUTH_VECTOR_LEN);
+    MD5_Final(buf, &Context);
 
     for (i = 0; i < 16; i++)
        plain[i] ^= buf[i];
 
-    MD5Init(&Context);
-    MD5Update(&Context, req_info->secret, strlen(req_info->secret));
-    MD5Update(&Context, vp->strvalue, 16);
-    MD5Final(buf, &Context);
+    MD5_Init(&Context);
+    MD5_Update(&Context, req_info->secret, strlen(req_info->secret));
+    MD5_Update(&Context, vp->strvalue, 16);
+    MD5_Final(buf, &Context);
 
     for(i = 0; i < 16; i++)
        plain[i + 16] ^= buf[i];
@@ -802,11 +804,11 @@ radius_setmppekeys2(VALUE_PAIR *vp, REQUEST_INFO *req_info)
 
     memcpy(plain, crypt, 32);
 
-    MD5Init(&Context);
-    MD5Update(&Context, req_info->secret, strlen(req_info->secret));
-    MD5Update(&Context, req_info->request_vector, AUTH_VECTOR_LEN);
-    MD5Update(&Context, salt, 2);
-    MD5Final(buf, &Context);
+    MD5_Init(&Context);
+    MD5_Update(&Context, req_info->secret, strlen(req_info->secret));
+    MD5_Update(&Context, req_info->request_vector, AUTH_VECTOR_LEN);
+    MD5_Update(&Context, salt, 2);
+    MD5_Final(buf, &Context);
 
     for (i = 0; i < 16; i++)
        plain[i] ^= buf[i];
@@ -817,10 +819,10 @@ radius_setmppekeys2(VALUE_PAIR *vp, REQUEST_INFO *req_info)
        return -1;
     }
 
-    MD5Init(&Context);
-    MD5Update(&Context, req_info->secret, strlen(req_info->secret));
-    MD5Update(&Context, crypt, 16);
-    MD5Final(buf, &Context);
+    MD5_Init(&Context);
+    MD5_Update(&Context, req_info->secret, strlen(req_info->secret));
+    MD5_Update(&Context, crypt, 16);
+    MD5_Final(buf, &Context);
 
     plain[16] ^= buf[0]; /* only need the first byte */
 
diff --git a/pppd/plugins/radius/radiusclient.h b/pppd/plugins/radius/radiusclient.h
new file mode 100644 (file)
index 0000000..7b7933e
--- /dev/null
@@ -0,0 +1,455 @@
+/*
+ * $Id: radiusclient.h,v 1.1 2004/11/14 07:26:26 paulus Exp $
+ *
+ * Copyright (C) 1995,1996,1997,1998 Lars Fenneberg
+ *
+ * Copyright 1992 Livingston Enterprises, Inc.
+ *
+ * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan
+ * and Merit Network, Inc. All Rights Reserved
+ *
+ * See the file COPYRIGHT for the respective terms and conditions.
+ * If the file is missing contact me at lf@elemental.net
+ * and I'll send you a copy.
+ *
+ */
+
+#ifndef RADIUSCLIENT_H
+#define RADIUSCLIENT_H
+
+#include       <sys/types.h>
+#include       <stdio.h>
+#include       <time.h>
+#include "pppd.h"
+
+#ifndef _UINT4_T
+/* This works for all machines that Linux runs on... */
+typedef unsigned int UINT4;
+typedef int          INT4;
+#endif
+
+#define AUTH_VECTOR_LEN                16
+#define AUTH_PASS_LEN          (3 * 16) /* multiple of 16 */
+#define AUTH_ID_LEN            64
+#define AUTH_STRING_LEN                128      /* maximum of 253 */
+
+#define        BUFFER_LEN              8192
+
+#define NAME_LENGTH            32
+#define        GETSTR_LENGTH           128     /* must be bigger than AUTH_PASS_LEN */
+
+/* codes for radius_buildreq, radius_getport, etc. */
+#define AUTH                   0
+#define ACCT                   1
+
+/* defines for config.c */
+
+#define SERVER_MAX 8
+
+#define AUTH_LOCAL_FST (1<<0)
+#define AUTH_RADIUS_FST (1<<1)
+#define AUTH_LOCAL_SND  (1<<2)
+#define AUTH_RADIUS_SND (1<<3)
+
+typedef struct server {
+       int max;
+       char *name[SERVER_MAX];
+       unsigned short port[SERVER_MAX];
+} SERVER;
+
+typedef struct pw_auth_hdr
+{
+       u_char          code;
+       u_char          id;
+       u_short         length;
+       u_char          vector[AUTH_VECTOR_LEN];
+       u_char          data[2];
+} AUTH_HDR;
+
+#define AUTH_HDR_LEN                   20
+#define MAX_SECRET_LENGTH              (3 * 16) /* MUST be multiple of 16 */
+#define CHAP_VALUE_LENGTH              16
+
+#define PW_AUTH_UDP_PORT               1812
+#define PW_ACCT_UDP_PORT               1813
+
+#define PW_TYPE_STRING                 0
+#define PW_TYPE_INTEGER                        1
+#define PW_TYPE_IPADDR                 2
+#define PW_TYPE_DATE                   3
+
+/* standard RADIUS codes */
+
+#define        PW_ACCESS_REQUEST               1
+#define        PW_ACCESS_ACCEPT                2
+#define        PW_ACCESS_REJECT                3
+#define        PW_ACCOUNTING_REQUEST           4
+#define        PW_ACCOUNTING_RESPONSE          5
+#define        PW_ACCOUNTING_STATUS            6
+#define        PW_PASSWORD_REQUEST             7
+#define        PW_PASSWORD_ACK                 8
+#define        PW_PASSWORD_REJECT              9
+#define        PW_ACCOUNTING_MESSAGE           10
+#define        PW_ACCESS_CHALLENGE             11
+#define        PW_STATUS_SERVER                12
+#define        PW_STATUS_CLIENT                13
+
+
+/* standard RADIUS attribute-value pairs */
+
+#define        PW_USER_NAME                    1       /* string */
+#define        PW_USER_PASSWORD                2       /* string */
+#define        PW_CHAP_PASSWORD                3       /* string */
+#define        PW_NAS_IP_ADDRESS               4       /* ipaddr */
+#define        PW_NAS_PORT                     5       /* integer */
+#define        PW_SERVICE_TYPE                 6       /* integer */
+#define        PW_FRAMED_PROTOCOL              7       /* integer */
+#define        PW_FRAMED_IP_ADDRESS            8       /* ipaddr */
+#define        PW_FRAMED_IP_NETMASK            9       /* ipaddr */
+#define        PW_FRAMED_ROUTING               10      /* integer */
+#define        PW_FILTER_ID                    11      /* string */
+#define        PW_FRAMED_MTU                   12      /* integer */
+#define        PW_FRAMED_COMPRESSION           13      /* integer */
+#define        PW_LOGIN_IP_HOST                14      /* ipaddr */
+#define        PW_LOGIN_SERVICE                15      /* integer */
+#define        PW_LOGIN_PORT                   16      /* integer */
+#define        PW_OLD_PASSWORD                 17      /* string */ /* deprecated */
+#define        PW_REPLY_MESSAGE                18      /* string */
+#define        PW_LOGIN_CALLBACK_NUMBER        19      /* string */
+#define        PW_FRAMED_CALLBACK_ID           20      /* string */
+#define        PW_EXPIRATION                   21      /* date */ /* deprecated */
+#define        PW_FRAMED_ROUTE                 22      /* string */
+#define        PW_FRAMED_IPX_NETWORK           23      /* integer */
+#define        PW_STATE                        24      /* string */
+#define        PW_CLASS                        25      /* string */
+#define        PW_VENDOR_SPECIFIC              26      /* string */
+#define        PW_SESSION_TIMEOUT              27      /* integer */
+#define        PW_IDLE_TIMEOUT                 28      /* integer */
+#define        PW_TERMINATION_ACTION           29      /* integer */
+#define        PW_CALLED_STATION_ID            30      /* string */
+#define        PW_CALLING_STATION_ID           31      /* string */
+#define        PW_NAS_IDENTIFIER               32      /* string */
+#define        PW_PROXY_STATE                  33      /* string */
+#define        PW_LOGIN_LAT_SERVICE            34      /* string */
+#define        PW_LOGIN_LAT_NODE               35      /* string */
+#define        PW_LOGIN_LAT_GROUP              36      /* string */
+#define        PW_FRAMED_APPLETALK_LINK        37      /* integer */
+#define        PW_FRAMED_APPLETALK_NETWORK     38      /* integer */
+#define        PW_FRAMED_APPLETALK_ZONE        39      /* string */
+#define        PW_CHAP_CHALLENGE               60      /* string */
+#define        PW_NAS_PORT_TYPE                61      /* integer */
+#define        PW_PORT_LIMIT                   62      /* integer */
+#define PW_LOGIN_LAT_PORT               63      /* string */
+
+/* Vendor RADIUS attribute-value pairs */
+#define PW_MS_CHAP_CHALLENGE           11      /* string */
+#define PW_MS_CHAP_RESPONSE            1       /* string */
+#define PW_MS_CHAP2_RESPONSE           25      /* string */
+#define PW_MS_CHAP2_SUCCESS            26      /* string */
+#define PW_MS_MPPE_ENCRYPTION_POLICY   7       /* string */
+#define PW_MS_MPPE_ENCRYPTION_TYPE     8       /* string */
+#define PW_MS_MPPE_ENCRYPTION_TYPES PW_MS_MPPE_ENCRYPTION_TYPE
+#define PW_MS_CHAP_MPPE_KEYS           12      /* string */
+#define PW_MS_MPPE_SEND_KEY            16      /* string */
+#define PW_MS_MPPE_RECV_KEY            17      /* string */
+
+/*     Accounting */
+
+#define        PW_ACCT_STATUS_TYPE             40      /* integer */
+#define        PW_ACCT_DELAY_TIME              41      /* integer */
+#define        PW_ACCT_INPUT_OCTETS            42      /* integer */
+#define        PW_ACCT_OUTPUT_OCTETS           43      /* integer */
+#define        PW_ACCT_SESSION_ID              44      /* string */
+#define        PW_ACCT_AUTHENTIC               45      /* integer */
+#define        PW_ACCT_SESSION_TIME            46      /* integer */
+#define        PW_ACCT_INPUT_PACKETS           47      /* integer */
+#define        PW_ACCT_OUTPUT_PACKETS          48      /* integer */
+#define PW_ACCT_TERMINATE_CAUSE                49      /* integer */
+#define PW_ACCT_MULTI_SESSION_ID       50      /* string */
+#define PW_ACCT_LINK_COUNT             51      /* integer */
+
+/* From RFC 2869 */
+#define PW_ACCT_INTERIM_INTERVAL        85     /* integer */
+
+/*     Merit Experimental Extensions */
+
+#define PW_USER_ID                      222     /* string */
+#define PW_USER_REALM                   223     /* string */
+
+
+/*      Session limits */
+#define PW_SESSION_OCTETS_LIMIT                227    /* integer */
+#define PW_OCTETS_DIRECTION            228    /* integer */
+
+/*     Integer Translations */
+
+/*     SERVICE TYPES   */
+
+#define        PW_LOGIN                        1
+#define        PW_FRAMED                       2
+#define        PW_CALLBACK_LOGIN               3
+#define        PW_CALLBACK_FRAMED              4
+#define        PW_OUTBOUND                     5
+#define        PW_ADMINISTRATIVE               6
+#define PW_NAS_PROMPT                   7
+#define PW_AUTHENTICATE_ONLY           8
+#define PW_CALLBACK_NAS_PROMPT          9
+
+/*     FRAMED PROTOCOLS        */
+
+#define        PW_PPP                          1
+#define        PW_SLIP                         2
+#define PW_ARA                          3
+#define PW_GANDALF                      4
+#define PW_XYLOGICS                     5
+
+/*     FRAMED ROUTING VALUES   */
+
+#define        PW_NONE                         0
+#define        PW_BROADCAST                    1
+#define        PW_LISTEN                       2
+#define        PW_BROADCAST_LISTEN             3
+
+/*     FRAMED COMPRESSION TYPES        */
+
+#define        PW_VAN_JACOBSON_TCP_IP          1
+#define        PW_IPX_HEADER_COMPRESSION       2
+
+/*     LOGIN SERVICES  */
+
+#define PW_TELNET                       0
+#define PW_RLOGIN                       1
+#define PW_TCP_CLEAR                    2
+#define PW_PORTMASTER                   3
+#define PW_LAT                          4
+#define PW_X25_PAD                      5
+#define PW_X25_T3POS                    6
+
+/*     TERMINATION ACTIONS     */
+
+#define        PW_DEFAULT                      0
+#define        PW_RADIUS_REQUEST               1
+
+/*     PROHIBIT PROTOCOL  */
+
+#define PW_DUMB                0       /* 1 and 2 are defined in FRAMED PROTOCOLS */
+#define PW_AUTH_ONLY   3
+#define PW_ALL         255
+
+/*     ACCOUNTING STATUS TYPES    */
+
+#define PW_STATUS_START                1
+#define PW_STATUS_STOP         2
+#define PW_STATUS_ALIVE                3
+#define PW_STATUS_MODEM_START  4
+#define PW_STATUS_MODEM_STOP   5
+#define PW_STATUS_CANCEL       6
+#define PW_ACCOUNTING_ON       7
+#define PW_ACCOUNTING_OFF      8
+
+/*      ACCOUNTING TERMINATION CAUSES   */
+
+#define PW_USER_REQUEST         1
+#define PW_LOST_CARRIER         2
+#define PW_LOST_SERVICE         3
+#define PW_ACCT_IDLE_TIMEOUT    4
+#define PW_ACCT_SESSION_TIMEOUT 5
+#define PW_ADMIN_RESET          6
+#define PW_ADMIN_REBOOT         7
+#define PW_PORT_ERROR           8
+#define PW_NAS_ERROR            9
+#define PW_NAS_REQUEST          10
+#define PW_NAS_REBOOT           11
+#define PW_PORT_UNNEEDED        12
+#define PW_PORT_PREEMPTED       13
+#define PW_PORT_SUSPENDED       14
+#define PW_SERVICE_UNAVAILABLE  15
+#define PW_CALLBACK             16
+#define PW_USER_ERROR           17
+#define PW_HOST_REQUEST         18
+
+/*     NAS PORT TYPES    */
+
+#define PW_ASYNC               0
+#define PW_SYNC                        1
+#define PW_ISDN_SYNC           2
+#define PW_ISDN_SYNC_V120      3
+#define PW_ISDN_SYNC_V110      4
+#define PW_VIRTUAL             5
+
+/*        AUTHENTIC TYPES */
+#define PW_RADIUS      1
+#define PW_LOCAL       2
+#define PW_REMOTE      3
+
+/*    Session-Octets-Limit    */
+#define PW_OCTETS_DIRECTION_SUM        0
+#define PW_OCTETS_DIRECTION_IN 1
+#define PW_OCTETS_DIRECTION_OUT        2
+#define PW_OCTETS_DIRECTION_MAX        3
+
+
+/* Vendor codes */
+#define VENDOR_NONE     (-1)
+#define VENDOR_MICROSOFT       311
+
+/* Server data structures */
+
+typedef struct dict_attr
+{
+       char              name[NAME_LENGTH + 1];        /* attribute name */
+       int               value;                        /* attribute index */
+       int               type;                         /* string, int, etc. */
+       int               vendorcode;                   /* vendor code */
+       struct dict_attr *next;
+} DICT_ATTR;
+
+typedef struct dict_value
+{
+       char               attrname[NAME_LENGTH +1];
+       char               name[NAME_LENGTH + 1];
+       int                value;
+       struct dict_value *next;
+} DICT_VALUE;
+
+typedef struct vendor_dict
+{
+    char vendorname[NAME_LENGTH + 1];
+    int vendorcode;
+    DICT_ATTR *attributes;
+    struct vendor_dict *next;
+} VENDOR_DICT;
+
+typedef struct value_pair
+{
+       char               name[NAME_LENGTH + 1];
+       int                attribute;
+       int                vendorcode;
+       int                type;
+       UINT4              lvalue;
+       u_char             strvalue[AUTH_STRING_LEN + 1];
+       struct value_pair *next;
+} VALUE_PAIR;
+
+/* don't change this, as it has to be the same as in the Merit radiusd code */
+#define MGMT_POLL_SECRET       "Hardlyasecret"
+
+/*     Define return codes from "SendServer" utility */
+
+#define BADRESP_RC     -2
+#define ERROR_RC       -1
+#define OK_RC          0
+#define TIMEOUT_RC     1
+
+typedef struct send_data /* Used to pass information to sendserver() function */
+{
+       u_char          code;           /* RADIUS packet code */
+       u_char          seq_nbr;        /* Packet sequence number */
+       char           *server;         /* Name/addrress of RADIUS server */
+       int             svc_port;       /* RADIUS protocol destination port */
+       int             timeout;        /* Session timeout in seconds */
+       int             retries;
+       VALUE_PAIR     *send_pairs;     /* More a/v pairs to send */
+       VALUE_PAIR     *receive_pairs;  /* Where to place received a/v pairs */
+} SEND_DATA;
+
+typedef struct request_info
+{
+       char            secret[MAX_SECRET_LENGTH + 1];
+       u_char          request_vector[AUTH_VECTOR_LEN];
+} REQUEST_INFO;
+
+#ifndef MIN
+#define MIN(a, b)     ((a) < (b) ? (a) : (b))
+#endif
+#ifndef MAX
+#define MAX(a, b)     ((a) > (b) ? (a) : (b))
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX       1024
+#endif
+
+typedef struct env
+{
+       int maxsize, size;
+       char **env;
+} ENV;
+
+#define ENV_SIZE       128
+
+/*     Function prototypes     */
+
+/*     avpair.c                */
+
+VALUE_PAIR *rc_avpair_add __P((VALUE_PAIR **, int, void *, int, int));
+int rc_avpair_assign __P((VALUE_PAIR *, void *, int));
+VALUE_PAIR *rc_avpair_new __P((int, void *, int, int));
+VALUE_PAIR *rc_avpair_gen __P((AUTH_HDR *));
+VALUE_PAIR *rc_avpair_get __P((VALUE_PAIR *, UINT4));
+VALUE_PAIR *rc_avpair_copy __P((VALUE_PAIR *));
+void rc_avpair_insert __P((VALUE_PAIR **, VALUE_PAIR *, VALUE_PAIR *));
+void rc_avpair_free __P((VALUE_PAIR *));
+int rc_avpair_parse __P((char *, VALUE_PAIR **));
+int rc_avpair_tostr __P((VALUE_PAIR *, char *, int, char *, int));
+VALUE_PAIR *rc_avpair_readin __P((FILE *));
+
+/*     buildreq.c              */
+
+void rc_buildreq __P((SEND_DATA *, int, char *, unsigned short, int, int));
+unsigned char rc_get_seqnbr __P((void));
+int rc_auth __P((UINT4, VALUE_PAIR *, VALUE_PAIR **, char *, REQUEST_INFO *));
+int rc_auth_using_server __P((SERVER *, UINT4, VALUE_PAIR *, VALUE_PAIR **,
+                             char *, REQUEST_INFO *));
+int rc_auth_proxy __P((VALUE_PAIR *, VALUE_PAIR **, char *));
+int rc_acct __P((UINT4, VALUE_PAIR *));
+int rc_acct_using_server __P((SERVER *, UINT4, VALUE_PAIR *));
+int rc_acct_proxy __P((VALUE_PAIR *));
+int rc_check __P((char *, unsigned short, char *));
+
+/*     clientid.c              */
+
+int rc_read_mapfile __P((char *));
+UINT4 rc_map2id __P((char *));
+
+/*     config.c                */
+
+int rc_read_config __P((char *));
+char *rc_conf_str __P((char *));
+int rc_conf_int __P((char *));
+SERVER *rc_conf_srv __P((char *));
+int rc_find_server __P((char *, UINT4 *, char *));
+
+/*     dict.c                  */
+
+int rc_read_dictionary __P((char *));
+DICT_ATTR *rc_dict_getattr __P((int, int));
+DICT_ATTR *rc_dict_findattr __P((char *));
+DICT_VALUE *rc_dict_findval __P((char *));
+DICT_VALUE * rc_dict_getval __P((UINT4, char *));
+VENDOR_DICT * rc_dict_findvendor __P((char *));
+VENDOR_DICT * rc_dict_getvendor __P((int));
+
+/*     ip_util.c               */
+
+UINT4 rc_get_ipaddr __P((char *));
+int rc_good_ipaddr __P((char *));
+const char *rc_ip_hostname __P((UINT4));
+UINT4 rc_own_ipaddress __P((void));
+
+
+/*     sendserver.c            */
+
+int rc_send_server __P((SEND_DATA *, char *, REQUEST_INFO *));
+
+/*     util.c                  */
+
+void rc_str2tm __P((char *, struct tm *));
+char *rc_mksid __P((void));
+void rc_mdelay __P((int));
+
+/* md5.c                       */
+
+void rc_md5_calc __P((unsigned char *, unsigned char *, unsigned int));
+
+#endif /* RADIUSCLIENT_H */
diff --git a/pppd/plugins/radius/radiusclient/BUGS b/pppd/plugins/radius/radiusclient/BUGS
deleted file mode 100644 (file)
index 8d7954d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-$Id: BUGS,v 1.1 2002/01/22 16:03:00 dfs Exp $
-
-Testing can show the presense of bugs, but not their absence.
-                -- Dijkstra
-
-The get_seqnbr function in build_req.c sometimes returns the same
-number, if invoked from multiple processes at the same time. This
-occurs only if a lot of process try to read the sequence file,
-so I suspect a race condition in the locking code, but I can't
-find one. Any help is appreciated.
-
-Radlogin respectively send_server in sendserver.c does not honour a 
-ACCESS_CHALLENGE packet from the RADIUS server. 
-
-There are interoperability problems with radiusd 1.16... but all the Merit
-radiusds I tried worked (last one I tried 2.4.21). There is an option to
-configure (--enable-radius-116) to kludge around this... It turned out to be
-a bug in radiusd 1.16: it doesn't include the shared secret in the digest
-calculation. See patches/radiusd-1.16.accounting.diff for a real fix.
diff --git a/pppd/plugins/radius/radiusclient/CHANGES b/pppd/plugins/radius/radiusclient/CHANGES
deleted file mode 100644 (file)
index 8c73f11..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-$Id: CHANGES,v 1.1 2002/01/22 16:03:00 dfs Exp $
-
-This file only documents fixed bugs and new features.. well, if I am not
-too lazy...
-
-01-06-99       Added support for RFC compliant accounting request digest
-               calculation.
-               Added new attributes and value defines to radiusclient.h.
-               Deleted an fclose at the wrong place (could lead to SIGSEGV).
-               Add newlines when constructing message from Reply-Message
-               attributes.
-               Output warning message when --enable-radius-116 is enabled.
-
-07-19-98       Changed licensing terms (GPL -> BSD style).
-               Added pointer to pppd patches in patches/README.
-
-03-06-98       Added patch patches/radiusd-1.16.accounting.diff.
-
-02-10-98       IMPORTANT! Changed the name of the "clients" config file
-               directive and the file name itself to "servers". This should
-               better reflect its content. Furthermore "servers" is now
-               installed mode 600 and not 644. Thanks go to Tilman
-               Mueller-Gerbes <tmg@suse.de> for pointing this out.
-
-01-15-98       Fixed two bugs in lib/sendserver.c, rc_random_vector:
-                       - file descriptor leak (found by Michael Lausch)
-                       - vector was not increased with each read
-
-01-14-98       Portability changes for NetBSD and BSDI. It compiles cleanly
-               on both platforms, now. But I haven't been able to test the
-               resulting executables. Many thanks go to Meno Abels
-               <Meno.Abels@Technical.Adviser.com> for providing accounts on
-               a NetBSD and BSDI machine. Furthermore I'd like to thank
-               Dave Burgess <burgess@cynjut.neonramp.com> for his help.
-
-Dezember 1997,         Lots of portability changes. 
-January 1998   Switched to autconf, automake and libtool.
-               Change all occurences of radclient to radiusclient (in file and 
-               directory names). 
-               Added shared libradiusclient.
-               Removed check for login_radius in lib/config.c. 
-               Fixed bug in src/radacct.c which lead to a SIGSEGV
-               when calling ttyname(3).
-               Added support for longer passwords (mostly untested).
-               Integrated includes/config.h into the configure script.
-
-09-15-96       intermediate release: changed my email address and homepage.
-                       included the new (working) pppd patch.
-
-06-01-96       patch to pppd included, contributed by Matjaz Godec
-               <gody@elgo.si>, heavily changed and broken by me.
-
-06-01-96       ppptraffic is gone, it wasn't really useful as the kernel
-               ppp clears the stats right when the device goes done.
-               Maybe it's possible to add this functionality to pppd
-               directly.
-
-05-13-96       rc_mksid is back in libradiusclient.a
-
-05-12-96       Fixed some bugs in the files MCONFIG and Makefile (reported by
-               Matjaz Godec <gody@elgo.si>).
-
-05-12-96       rc_avpair_add, rc_avpair_new, rc_avpair_assign have a new
-               last argument: the length of the attribute. This can
-               normally always be zero and is needed only in the special
-               case when you want to send raw data strings which might
-               contain a \0 character.
-
-05-11-96       rc_map2id now preceeds its argument with /dev/ if neccessary
-
-05-03-96       I changed the tabbing style, so from now on tabs are 4
-               characters so that there's more space for full blown and
-               complicated if, switch, etc. structures. Remember this when
-               you look at the source.
-
-05-03-96       improved error checking in a few places and changed
-               logging so that now everything goes into syslog.
-               facility is configurable in config.h (SYSLOG_FACILITY)
-
-05-02-96       added admin logins: you can now change the radiusclient
-               config file from remote. much is still missing. to use this
-               feature define a RADIUS user with a service type of
-               Administrative.
-
-05-01-96       MERIT_GRANDFATHER compatability define removed again,
-               it's simply broken. You HAVE to compile Merit radiusd
-               without this define for outbound and admin logins to work.
-
-05-01-96       config.c rewritten, the syntax of more than one authserver
-               or acctserver directive in radiusclient.conf is no longer
-               supported. instead mutliple servers have to be specified
-               in one line seperated by comma.
-
-05-01-96       added outbound support to radlogin, usably via telnet or
-               pseudo tty (rport sets this tty up on a remote host).
-
-03-19-96       added support for /etc/nologin, new config option "nologin"
-               in radiusclient.conf
-
-03-18-96       Linux (>=1.3.x): added support for /dev/urandom for more
-               secure user passwords
-
-03-17-96       normal usage messages are now seperate in src/messages.h
-               (thanks go to Migs, who pointed out that this would
-               be usefull)
-
-03-15-96       added SCP define, to derive a service type from a user
-               name prefix and supply it to the RADIUS server
-
-03-14-96       added RADIUS_116 define, accounting should now "work" with
-               Livingston radiusd v1.16.
-
-               cleaned up the enviroment handling, the global setenv was
-               a mess.
-
-01-07-95       added ppptraffic which reads out the ppp statistics just
-               like pppstats.
-               this works only for ppp as slip has no such statistics
-               (besides packets sent/received which is not very
-                useful).
diff --git a/pppd/plugins/radius/radiusclient/COPYRIGHT b/pppd/plugins/radius/radiusclient/COPYRIGHT
deleted file mode 100644 (file)
index 3a0f999..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-See the respective source files to find out which copyrights apply.
-
-------------------------------------------------------------------------------
-Copyright (C) 2002 Roaring Penguin Software Inc.
-
-Permission to use, copy, modify, and distribute this software for any
-purpose and without fee is hereby granted, provided that this
-copyright and permission notice appear on all copies and supporting
-documentation, the name of Roaring Penguin Software Inc. not be used
-in advertising or publicity pertaining to distribution of the program
-without specific prior permission, and notice be given in supporting
-documentation that copying and distribution is by permission of
-Roaring Penguin Software Inc..
-
-Roaring Penguin Software Inc. makes no representations about the
-suitability of this software for any purpose.  It is provided "as is"
-without express or implied warranty.
-
-------------------------------------------------------------------------------
-Copyright (C) 1995,1996,1997,1998 Lars Fenneberg <lf@elemental.net>
-
-Permission to use, copy, modify, and distribute this software for any
-purpose and without fee is hereby granted, provided that this copyright and
-permission notice appear on all copies and supporting documentation, the
-name of Lars Fenneberg not be used in advertising or publicity pertaining to
-distribution of the program without specific prior permission, and notice be
-given in supporting documentation that copying and distribution is by
-permission of Lars Fenneberg.
-
-Lars Fenneberg makes no representations about the suitability of this
-software for any purpose.  It is provided "as is" without express or implied
-warranty.
-
-------------------------------------------------------------------------------
-Copyright 1992 Livingston Enterprises, Inc.
-Livingston Enterprises, Inc. 6920 Koll Center Parkway Pleasanton, CA  94566
-
-Permission to use, copy, modify, and distribute this software for any
-purpose and without fee is hereby granted, provided that this copyright
-and permission notice appear on all copies and supporting documentation,
-the name of Livingston Enterprises, Inc. not be used in advertising or
-publicity pertaining to distribution of the program without specific
-prior permission, and notice be given in supporting documentation that
-copying and distribution is by permission of Livingston Enterprises, Inc.
-
-Livingston Enterprises, Inc. makes no representations about the suitability
-of this software for any purpose.  It is provided "as is" without express
-or implied warranty.
-------------------------------------------------------------------------------
-[C] The Regents of the University of Michigan and Merit Network, Inc. 1992,
-1993, 1994, 1995 All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, provided
-that the above copyright notice and this permission notice appear in all
-copies of the software and derivative works or modified versions thereof,
-and that both the copyright notice and this permission and disclaimer
-notice appear in supporting documentation.
-
-THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE REGENTS OF THE
-UNIVERSITY OF MICHIGAN AND MERIT NETWORK, INC. DO NOT WARRANT THAT THE
-FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR
-THAT OPERATION WILL BE UNINTERRUPTED OR ERROR FREE.  The Regents of the
-University of Michigan and Merit Network, Inc. shall not be liable for any
-special, indirect, incidental or consequential damages with respect to any
-claim by Licensee or any third party arising from use of the software.
-------------------------------------------------------------------------------
-Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991.
-All rights reserved.
-
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
-
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD5 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
-
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-
-These notices must be retained in any copies of any part of this
-documentation and/or software.
-------------------------------------------------------------------------------
diff --git a/pppd/plugins/radius/radiusclient/Makefile.am b/pppd/plugins/radius/radiusclient/Makefile.am
deleted file mode 100644 (file)
index 06ee310..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# 
-#  $Id: Makefile.am,v 1.1 2002/01/22 16:03:00 dfs Exp $
-# 
-#  Copyright (C) 1997 Lars Fenneberg
-# 
-#  See the file COPYRIGHT for the respective terms and conditions. 
-#  If the file is missing contact me at lf@elemental.net 
-#  and I'll send you a copy.
-# 
-#
-
-AUTOMAKE_OPTIONS = foreign
-
-INCLUDES = -D_GNU_SOURCE
-
-ACLOCAL = @ACLOCAL@
-LTLIBOBJS = @LTLIBOBJS@
-
-SUBDIRS = include lib src etc man doc patches login.radius
-EXTRA_DIST = BUGS CHANGES COPYRIGHT README README.radexample
-
-CLEANFILES = *~
diff --git a/pppd/plugins/radius/radiusclient/Makefile.in b/pppd/plugins/radius/radiusclient/Makefile.in
deleted file mode 100644 (file)
index dc30ebf..0000000
+++ /dev/null
@@ -1,331 +0,0 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# 
-#  $Id: Makefile.in,v 1.1 2002/01/22 16:03:00 dfs Exp $
-# 
-#  Copyright (C) 1997 Lars Fenneberg
-# 
-#  See the file COPYRIGHT for the respective terms and conditions. 
-#  If the file is missing contact me at lf@elemental.net 
-#  and I'll send you a copy.
-# 
-#
-
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DISTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-CC = @CC@
-LD = @LD@
-LIBTOOL = @LIBTOOL@
-LIBVERSION = @LIBVERSION@
-LN_S = @LN_S@
-MAKEINFO = @MAKEINFO@
-NM = @NM@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-RC_LOG_FACILITY = @RC_LOG_FACILITY@
-RC_SECURE_PATH = @RC_SECURE_PATH@
-VERSION = @VERSION@
-pkgsysconfdir = @pkgsysconfdir@
-
-AUTOMAKE_OPTIONS = foreign
-
-INCLUDES = -D_GNU_SOURCE
-
-ACLOCAL = @ACLOCAL@
-LTLIBOBJS = @LTLIBOBJS@
-
-SUBDIRS = include lib src etc man doc patches login.radius
-EXTRA_DIST = BUGS CHANGES COPYRIGHT README README.radexample
-
-CLEANFILES = *~
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = 
-DIST_COMMON =  README Makefile.am Makefile.in acconfig.h aclocal.m4 \
-config.guess config.h.in config.sub configure configure.in install-sh \
-ltconfig ltmain.sh missing mkinstalldirs stamp-h.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP = --best
-all: all-recursive-am all-am
-
-.SUFFIXES:
-
-config.h: stamp-h
-       @:
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
-       cd $(top_builddir) \
-         && CONFIG_FILES= CONFIG_HEADERS=config.h \
-            $(SHELL) ./config.status
-       @echo timestamp > stamp-h
-$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
-       cd $(top_srcdir) && $(AUTOHEADER)
-       @echo timestamp > $(srcdir)/stamp-h.in
-
-mostlyclean-hdr:
-
-clean-hdr:
-
-distclean-hdr:
-       -rm -f config.h
-
-maintainer-clean-hdr:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive  \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
-       @set fnord $(MAKEFLAGS); amf=$$2; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         target=`echo $@ | sed s/-recursive//`; \
-         echo "Making $$target in $$subdir"; \
-         (cd $$subdir && $(MAKE) $$target) \
-          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
-       done && test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @set fnord $(MAKEFLAGS); amf=$$2; \
-       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
-         rev="$$subdir $$rev"; \
-       done; \
-       for subdir in $$rev; do \
-         target=`echo $@ | sed s/-recursive//`; \
-         echo "Making $$target in $$subdir"; \
-         (cd $$subdir && $(MAKE) $$target) \
-          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
-       done && test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         (cd $$subdir && $(MAKE) tags); \
-       done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
-       here=`pwd` && cd $(srcdir) \
-         && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-       done; \
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
-       -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-       -rm -rf $(distdir)
-       GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
-       mkdir $(distdir)/=build
-       mkdir $(distdir)/=inst
-       dc_install_base=`cd $(distdir)/=inst && pwd`; \
-       cd $(distdir)/=build \
-         && ../configure --srcdir=.. --prefix=$$dc_install_base \
-         && $(MAKE) \
-         && $(MAKE) dvi \
-         && $(MAKE) check \
-         && $(MAKE) install \
-         && $(MAKE) installcheck \
-         && $(MAKE) dist
-       -rm -rf $(distdir)
-       @echo "========================"; \
-       echo "$(distdir).tar.gz is ready for distribution"; \
-       echo "========================"
-dist: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-dist-all: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-distdir: $(DISTFILES)
-       -rm -rf $(distdir)
-       mkdir $(distdir)
-       -chmod 777 $(distdir)
-       @for file in $(DISTFILES); do \
-         d=$(srcdir); \
-         test -f $(distdir)/$$file \
-         || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-         || cp -p $$d/$$file $(distdir)/$$file; \
-       done
-       for subdir in $(SUBDIRS); do \
-         test -d $(distdir)/$$subdir \
-         || mkdir $(distdir)/$$subdir \
-         || exit 1; \
-         chmod 777 $(distdir)/$$subdir; \
-         (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
-           || exit 1; \
-       done
-info: info-recursive
-dvi: dvi-recursive
-check: all-am
-       $(MAKE) check-recursive
-installcheck: installcheck-recursive
-all-recursive-am: config.h
-       $(MAKE) all-recursive
-
-all-am: Makefile config.h
-
-install-exec: install-exec-recursive
-       @$(NORMAL_INSTALL)
-
-install-data: install-data-recursive
-       @$(NORMAL_INSTALL)
-
-install: install-recursive
-       @:
-
-uninstall: uninstall-recursive
-
-install-strip:
-       $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs: installdirs-recursive
-
-
-mostlyclean-generic:
-       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -rm -f Makefile $(DISTCLEANFILES)
-       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean-am:  mostlyclean-hdr mostlyclean-tags mostlyclean-generic
-
-clean-am:  clean-hdr clean-tags clean-generic mostlyclean-am
-
-distclean-am:  distclean-hdr distclean-tags distclean-generic clean-am
-
-maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-tags \
-               maintainer-clean-generic distclean-am
-
-mostlyclean:  mostlyclean-recursive mostlyclean-am
-
-clean:  clean-recursive clean-am
-
-distclean:  distclean-recursive distclean-am
-       -rm -f config.status
-       -rm -f libtool
-
-maintainer-clean:  maintainer-clean-recursive maintainer-clean-am
-       @echo "This command is intended for maintainers to use;"
-       @echo "it deletes files that may require special tools to rebuild."
-       -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-install-data-recursive uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
-installcheck all-recursive-am all-am install-exec install-data install \
-uninstall all installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/pppd/plugins/radius/radiusclient/README b/pppd/plugins/radius/radiusclient/README
deleted file mode 100644 (file)
index 4f7accd..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-$Id: README,v 1.1 2002/01/22 16:03:00 dfs Exp $
-
-Please view doc/instop.html with your favourite WWW browser, e.g lynx or
-netscape.
-
-Currently radiusclient will compile on the following platforms:
-
-       Compiled on:
-
-               i386-pc-bsdi2.1
-               sparc-unknown-netbsd1.2.1
-               i386-unknown-freebsd2.2.6
-       
-       Compiled and tested on:
-
-               i486-pc-linux
-               sparc-sun-solaris2.5.1
diff --git a/pppd/plugins/radius/radiusclient/README.radexample b/pppd/plugins/radius/radiusclient/README.radexample
deleted file mode 100644 (file)
index ce80c4d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-$Id: README.radexample,v 1.1 2002/01/22 16:03:00 dfs Exp $
-
-In src/radexample.c is a small example on how to use the library
-lib/libradclient.a. 
-
-You only need to include radiusclient.h into your applications and link
-against the library. For this example to work your radiusclient config file
-has to be setup right.
-
-I make no guarantees that the library interface stays the same as
-radiusclient evolves, but I think that the whole thing is so simple that the
-changes to source code which uses this library should always be trivial.
diff --git a/pppd/plugins/radius/radiusclient/acconfig.h b/pppd/plugins/radius/radiusclient/acconfig.h
deleted file mode 100644 (file)
index f1d8e13..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * $Id: acconfig.h,v 1.1 2002/01/22 16:03:00 dfs Exp $
- *
- * Copyright (C) 1996,1997 Lars Fenneberg
- *
- * See the file COPYRIGHT for the respective terms and conditions. 
- * If the file is missing contact me at lf@elemental.net 
- * and I'll send you a copy.
- *
- */
-
-@TOP@
-
-/* does /dev/urandom exist ? */
-#undef HAVE_DEV_URANDOM
-
-/* shadow password support */
-#undef HAVE_SHADOW_PASSWORDS
-
-/* struct utsname has domainname field */
-#undef HAVE_STRUCT_UTSNAME_DOMAINNAME
-
-/* do you need the sig* prototypes ? */
-#undef NEED_SIG_PROTOTYPES
-
-/* package name */
-#undef PACKAGE
-
-/* include code to kludge aroung Livingston's RADIUS server 1.16 */
-#undef RADIUS_116
-
-/* SCP support */
-#undef SCP
-
-/* package version */
-#undef VERSION
diff --git a/pppd/plugins/radius/radiusclient/aclocal.m4 b/pppd/plugins/radius/radiusclient/aclocal.m4
deleted file mode 100644 (file)
index 6cb12d4..0000000
+++ /dev/null
@@ -1,331 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.3
-
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# Do all the work for Automake.  This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
-   if test "[$]*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftestfile`
-   fi
-   if test "[$]*" != "X $srcdir/configure conftestfile" \
-      && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "[$]2" = conftestfile
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
-   $1=$2
-   AC_MSG_RESULT(found)
-else
-   $1="$3/missing $2"
-   AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-
-# serial 18 AM_PROG_LIBTOOL
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_RANLIB])
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AM_PROG_LD])
-AC_REQUIRE([AM_PROG_NM])
-AC_REQUIRE([AC_PROG_LN_S])
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)
-
-dnl Allow the --disable-shared flag to stop us from building shared libs.
-AC_ARG_ENABLE(shared,
-[  --enable-shared         build shared libraries [default=yes]],
-[if test "$enableval" = no; then
-  libtool_enable_shared=no
-else
-  libtool_enable_shared=yes
-fi])
-test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
-libtool_shared=
-test "$enable_shared" = no && libtool_shared=" --disable-shared"
-
-dnl Allow the --disable-static flag to stop us from building static libs.
-AC_ARG_ENABLE(static,
-[  --enable-static         build static libraries [default=yes]],
-[if test "$enableval" = no; then
-  libtool_enable_static=no
-else
-  libtool_enable_static=yes
-fi])
-test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
-libtool_static=
-test "$enable_static" = no && libtool_static=" --disable-static"
-
-libtool_flags="$libtool_shared$libtool_static"
-test "$silent" = yes && libtool_flags="$libtool_flags --silent"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-[case "$host" in
-*-*-irix6*)
-  ac_save_CFLAGS="$CFLAGS"
-  flag_passed=no
-  for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do
-    case "$f" in
-    ABI)
-      test -n "$SGI_ABI" && flag_passed=yes
-      if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then
-       # Choose the ABI flag according to GCC's specs.
-       if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[         ]-32' >/dev/null; then
-         LD="${LD-ld} -32"
-       else
-         LD="${LD-ld} -n32"
-       fi
-      fi
-      ;;
-
-    *)
-      if echo " $CC $CFLAGS " | egrep -e "[    ]$f[     ]" > /dev/null; then
-       flag_passed=yes
-       LD="${LD-ld} $f"
-      fi
-      ;;
-    esac
-  done
-  CFLAGS="$ac_save_CFLAGS"
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  CFLAGS="$CFLAGS -belf"
-  ;;
-esac]
-
-# Actually configure libtool.  ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-])
-
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  ac_prog=`($CC -print-prog-name=ld) 2>&5`
-  case "$ac_prog" in
-  # Accept absolute paths.
-  /*)
-    test -z "$LD" && LD="$ac_prog"
-    ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog"; then
-      ac_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-       test "$with_gnu_ld" != no && break
-      else
-        test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
-])
-
-AC_DEFUN(AM_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  ac_cv_prog_gnu_ld=yes
-else
-  ac_cv_prog_gnu_ld=no
-fi])
-])
-
-# AM_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AM_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[case "$NM" in
-/*)
-  ac_cv_path_NM="$NM" # Let the user override the test with a path.
-  ;;
-*)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
-    test -z "$ac_dir" && dir=.
-    if test -f $ac_dir/nm; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1!d' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
-        ac_cv_path_NM="$ac_dir/nm -B"
-      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
-        ac_cv_path_NM="$ac_dir/nm -p"
-      else
-        ac_cv_path_NM="$ac_dir/nm"
-      fi
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-  ;;
-esac])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
-])
-
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated.  We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
-  case " <<$>>CONFIG_HEADERS " in
-  *" <<$>>am_file "*<<)>>
-    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
-    ;;
-  esac
-  am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
diff --git a/pppd/plugins/radius/radiusclient/config.guess b/pppd/plugins/radius/radiusclient/config.guess
deleted file mode 100755 (executable)
index d0e202f..0000000
+++ /dev/null
@@ -1,693 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Written by Per Bothner <bothner@cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    alpha:OSF1:*:*)
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
-       exit 0 ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit 0 ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-cbm-sysv4
-       exit 0;;
-    amiga:NetBSD:*:*)
-      echo m68k-cbm-netbsd${UNAME_RELEASE}
-      exit 0 ;;
-    amiga:OpenBSD:*:*)
-      echo m68k-cbm-openbsd${UNAME_RELEASE}
-      exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit 0 ;;
-    NILE:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit 0 ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    i86pc:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit 0 ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit 0 ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit 0 ;;
-    atari*:NetBSD:*:*)
-       echo m68k-atari-netbsd${UNAME_RELEASE}
-       exit 0 ;;
-    atari*:OpenBSD:*:*)
-       echo m68k-atari-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sun3*:NetBSD:*:*)
-       echo m68k-sun-netbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sun3*:OpenBSD:*:*)
-       echo m68k-sun-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mac68k:NetBSD:*:*)
-       echo m68k-apple-netbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mac68k:OpenBSD:*:*)
-       echo m68k-apple-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit 0 ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit 0 ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit 0 ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       sed 's/^        //' << EOF >dummy.c
-       int main (argc, argv) int argc; char **argv; {
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       ${CC-cc} dummy.c -o dummy \
-         && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-         && rm dummy.c dummy && exit 0
-       rm -f dummy.c dummy
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit 0 ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit 0 ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit 0 ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit 0 ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit 0 ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
-       if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-            -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-       else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-       fi
-        else echo i586-dg-dgux${UNAME_RELEASE}
-        fi
-       exit 0 ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit 0 ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit 0 ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit 0 ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
-    i?86:AIX:*:*)
-       echo i386-ibm-aix
-       exit 0 ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               sed 's/^                //' << EOF >dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-               rm -f dummy.c dummy
-               echo rs6000-ibm-aix3.2.5
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit 0 ;;
-    *:AIX:*:4)
-       if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=4.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit 0 ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit 0 ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit 0 ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit 0 ;;                           # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
-           9000/8?? )            HP_ARCH=hppa1.0 ;;
-       esac
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit 0 ;;
-    3050*:HI-UX:*:*)
-       sed 's/^        //' << EOF >dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-       rm -f dummy.c dummy
-       echo unknown-hitachi-hiuxwe2
-       exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit 0 ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit 0 ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit 0 ;;
-    i?86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit 0 ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-       echo xmp-cray-unicos
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE}
-       exit 0 ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-       exit 0 ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE}
-       exit 0 ;;
-    CRAY-2:*:*:*)
-       echo cray2-cray-unicos
-        exit 0 ;;
-    F300:UNIX_System_V:*:*)
-        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
-    F301:UNIX_System_V:*:*)
-       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
-       exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-       echo m68k-hp-netbsd${UNAME_RELEASE}
-       exit 0 ;;
-    hp3[0-9][05]:OpenBSD:*:*)
-       echo m68k-hp-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    i?86:BSD/386:*:* | *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit 0 ;;
-    *:FreeBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit 0 ;;
-    *:NetBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-       exit 0 ;;
-    *:OpenBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-       exit 0 ;;
-    i*:CYGWIN*:*)
-       echo i386-pc-cygwin32
-       exit 0 ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin32
-       exit 0 ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit 0 ;;
-    *:GNU:*:*)
-       echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit 0 ;;
-    *:Linux:*:*)
-       # The BFD linker knows what the default object file format is, so
-       # first see if it will tell us.
-       ld_help_string=`ld --help 2>&1`
-       if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-         echo "${UNAME_MACHINE}-pc-linux" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-         echo "${UNAME_MACHINE}-pc-linux-aout" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-         echo "${UNAME_MACHINE}-pc-linux-coff" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-         echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-         echo "${UNAME_MACHINE}-unknown-linux-aout" ; exit 0
-       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-         echo "powerpc-unknown-linux" ; exit 0
-       elif test "${UNAME_MACHINE}" = "alpha" ; then
-         echo alpha-unknown-linux ; exit 0
-       elif test "${UNAME_MACHINE}" = "sparc" ; then
-         echo sparc-unknown-linux ; exit 0
-       else
-         # Either a pre-BFD a.out linker (linux-oldld) or one that does not give us
-         # useful --help.  Gcc wants to distinguish between linux-oldld and linux-aout.
-         test ! -d /usr/lib/ldscripts/. \
-           && echo "${UNAME_MACHINE}-pc-linux-oldld" && exit 0
-         # Determine whether the default compiler is a.out or elf
-         cat >dummy.c <<EOF
-main(argc, argv)
-int argc;
-char *argv[];
-{
-#ifdef __ELF__
-  printf ("%s-pc-linux\n", argv[1]);
-#else
-  printf ("%s-pc-linux-aout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
-         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
-         rm -f dummy.c dummy
-       fi ;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
-# are messed up and put the nodename in both sysname and nodename.
-    i?86:DYNIX/ptx:4*:*)
-       echo i386-sequent-sysv4
-       exit 0 ;;
-    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
-       fi
-       exit 0 ;;
-    i?86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit 0 ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit 0 ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit 0 ;;
-    M68*:*:R3V[567]*:*)
-       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m68*:LynxOS:2.*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit 0 ;;
-    i?86:LynxOS:2.*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit 0 ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit 0 ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit 0 ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit 0 ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit 0 ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit 0 ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-        exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-cat >dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-         ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-#if !defined (ultrix)
-  printf ("vax-dec-bsd\n"); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit 0 ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit 0 ;;
-    c34*)
-       echo c34-convex-bsd
-       exit 0 ;;
-    c38*)
-       echo c38-convex-bsd
-       exit 0 ;;
-    c4*)
-       echo c4-convex-bsd
-       exit 0 ;;
-    esac
-fi
-
-#echo '(Unable to guess system type)' 1>&2
-
-exit 1
diff --git a/pppd/plugins/radius/radiusclient/config.h.in b/pppd/plugins/radius/radiusclient/config.h.in
deleted file mode 100644 (file)
index 9e054b5..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
-/*
- * $Id: config.h.in,v 1.3 2002/07/25 16:29:16 dfs Exp $
- *
- * Copyright (C) 1996,1997 Lars Fenneberg
- *
- * See the file COPYRIGHT for the respective terms and conditions. 
- * If the file is missing contact me at lf@elemental.net 
- * and I'll send you a copy.
- *
- */
-
-
-/* Define to empty if the keyword does not work.  */
-#undef const
-
-/* Define if you have the strftime function.  */
-#undef HAVE_STRFTIME
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define as the return type of signal handlers (int or void).  */
-#undef RETSIGTYPE
-
-/* Define if the setvbuf function takes the buffering type as its second
-   argument and the buffer pointer as the third, as on System V
-   before release 3.  */
-#undef SETVBUF_REVERSED
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-#undef TIME_WITH_SYS_TIME
-
-/* Define if your <sys/time.h> declares struct tm.  */
-#undef TM_IN_SYS_TIME
-
-/* does /dev/urandom exist ? */
-#undef HAVE_DEV_URANDOM
-
-/* shadow password support */
-#undef HAVE_SHADOW_PASSWORDS
-
-/* struct utsname has domainname field */
-#undef HAVE_STRUCT_UTSNAME_DOMAINNAME
-
-/* package name */
-#undef PACKAGE
-
-/* include code to kludge aroung Livingston's RADIUS server 1.16 */
-#undef RADIUS_116
-
-/* SCP support */
-#undef SCP
-
-/* package version */
-#undef VERSION
-
-/* Define if you have the fcntl function.  */
-#undef HAVE_FCNTL
-
-/* Define if you have the flock function.  */
-#undef HAVE_FLOCK
-
-/* Define if you have the getdomainname function.  */
-#undef HAVE_GETDOMAINNAME
-
-/* Define if you have the gethostname function.  */
-#undef HAVE_GETHOSTNAME
-
-/* Define if you have the rand function.  */
-#undef HAVE_RAND
-
-/* Define if you have the random function.  */
-#undef HAVE_RANDOM
-
-/* Define if you have the snprintf function.  */
-#undef HAVE_SNPRINTF
-
-/* Define if you have the strcasecmp function.  */
-#undef HAVE_STRCASECMP
-
-/* Define if you have the strdup function.  */
-#undef HAVE_STRDUP
-
-/* Define if you have the strerror function.  */
-#undef HAVE_STRERROR
-
-/* Define if you have the stricmp function.  */
-#undef HAVE_STRICMP
-
-/* Define if you have the sysinfo function.  */
-#undef HAVE_SYSINFO
-
-/* Define if you have the uname function.  */
-#undef HAVE_UNAME
-
-/* Define if you have the vsnprintf function.  */
-#undef HAVE_VSNPRINTF
-
-/* Define if you have the <crypt.h> header file.  */
-#undef HAVE_CRYPT_H
-
-/* Define if you have the <dirent.h> header file.  */
-#undef HAVE_DIRENT_H
-
-/* Define if you have the <fcntl.h> header file.  */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <getopt.h> header file.  */
-#undef HAVE_GETOPT_H
-
-/* Define if you have the <ndir.h> header file.  */
-#undef HAVE_NDIR_H
-
-/* Define if you have the <signal.h> header file.  */
-#undef HAVE_SIGNAL_H
-
-/* Define if you have the <sys/dir.h> header file.  */
-#undef HAVE_SYS_DIR_H
-
-/* Define if you have the <sys/fcntl.h> header file.  */
-#undef HAVE_SYS_FCNTL_H
-
-/* Define if you have the <sys/file.h> header file.  */
-#undef HAVE_SYS_FILE_H
-
-/* Define if you have the <sys/ioctl.h> header file.  */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define if you have the <sys/ndir.h> header file.  */
-#undef HAVE_SYS_NDIR_H
-
-/* Define if you have the <sys/signal.h> header file.  */
-#undef HAVE_SYS_SIGNAL_H
-
-/* Define if you have the <sys/stat.h> header file.  */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/utsname.h> header file.  */
-#undef HAVE_SYS_UTSNAME_H
-
-/* Define if you have the <termios.h> header file.  */
-#undef HAVE_TERMIOS_H
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the crypt library (-lcrypt).  */
-#undef HAVE_LIBCRYPT
-
-/* Define if you have the nsl library (-lnsl).  */
-#undef HAVE_LIBNSL
-
-/* Define if you have the socket library (-lsocket).  */
-#undef HAVE_LIBSOCKET
diff --git a/pppd/plugins/radius/radiusclient/config.sub b/pppd/plugins/radius/radiusclient/config.sub
deleted file mode 100755 (executable)
index 08cbd46..0000000
+++ /dev/null
@@ -1,921 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-if [ x$1 = x ]
-then
-       echo Configuration name missing. 1>&2
-       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
-       echo "or     $0 ALIAS" 1>&2
-       echo where ALIAS is a recognized configuration type. 1>&2
-       exit 1
-fi
-
-# First pass through any local machine types.
-case $1 in
-       *local*)
-               echo $1
-               exit 0
-               ;;
-       *)
-       ;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  linux*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple)
-               os=
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco5)
-               os=sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
-               | arme[lb] | pyramid \
-               | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-               | alpha | we32k | ns16k | clipper | i370 | sh \
-               | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
-               | pdp11 | mips64el | mips64orion | mips64orionel \
-               | sparc | sparclet | sparclite | sparc64)
-               basic_machine=$basic_machine-unknown
-               ;;
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i[3456]86)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
-             | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
-             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
-             | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
-             | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
-             | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
-             | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
-             | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-cbm
-               ;;
-       amigados)
-               basic_machine=m68k-cbm
-               os=-amigados
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-cbm
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       cray2)
-               basic_machine=cray2-cray
-               os=-unicos
-               ;;
-       [ctj]90-cray)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-       i[3456]86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i[3456]86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i[3456]86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i[3456]86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-        pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pentium | p5)
-               basic_machine=i586-intel
-               ;;
-       pentiumpro | p6)
-               basic_machine=i686-intel
-               ;;
-       pentium-* | p5-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       k5)
-               # We don't have specific support for AMD's K5 yet, so just call it a Pentium
-               basic_machine=i586-amd
-               ;;
-       nexen)
-               # We don't have specific support for Nexgen yet, so just call it a Pentium
-               basic_machine=i586-nexgen
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=rs6000-ibm
-               ;;
-       ppc)    basic_machine=powerpc-unknown
-               ;;
-       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       xmp)
-               basic_machine=xmp-cray
-               os=-unicos
-               ;;
-        xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       mips)
-               basic_machine=mips-mips
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sparc)
-               basic_machine=sparc-sun
-               ;;
-        cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -unixware* | svr4*)
-               os=-sysv4
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-             | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -linux* | -uxpv*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-        pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigados
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-        *-gould)
-               os=-sysv
-               ;;
-        *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-        *-sgi)
-               os=-irix
-               ;;
-        *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f301-fujitsu)
-               os=-uxpv
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -aix*)
-                               vendor=ibm
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -vxsim* | -vxworks*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
diff --git a/pppd/plugins/radius/radiusclient/configure b/pppd/plugins/radius/radiusclient/configure
deleted file mode 100755 (executable)
index 020ed23..0000000
+++ /dev/null
@@ -1,3275 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
-  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
-  --enable-shared         build shared libraries [default=yes]"
-ac_help="$ac_help
-  --enable-static         build static libraries [default=yes]"
-ac_help="$ac_help
-  --enable-shadow         Enable shadow password support"
-ac_help="$ac_help
-  --with-secure-path      PATH setting for exec'ed programs"
-ac_help="$ac_help
-  --with-facility         Syslog facility to use"
-ac_help="$ac_help
-  --enable-radius-116     Include support for Livingston's RADIUS server 1.16"
-ac_help="$ac_help
-  --enable-scp            Add service type hints derived from username prefix"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=src/radlogin.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='       '
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:585: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`$ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`$ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:606: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
-  case $nonopt in
-  NONE) target_alias=$host_alias ;;
-  *) target_alias=$nonopt ;;
- &nb