فهرست منبع

Merge branch 'radius' of https://192.168.14.200:3000/dtelenkov/bt-670x into radius

TelenkovDmitry 7 سال پیش
والد
کامیت
393b55c201

+ 6 - 4
modules/HTTP_Server/http_server.c

@@ -18,6 +18,7 @@
 #include "megatec.h"
 #include "log.h"
 #include "hal.h"
+#include "radius_user.h"
 
 #ifdef PRINTF_STDLIB
 #include <stdio.h>
@@ -1721,9 +1722,10 @@ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
 
 	  /* Add " " to the string in order GetParamValue() can be able to parse the param */
 	  strcat(tempStr, " ");
+	  GetParamValue(tempStr, "login=", login, &valueLen);
+	  GetParamValue(tempStr, "password=", password, &valueLen);
 
-	  if (GetParamValue(tempStr, "login=", login, &valueLen) &&
-	      GetParamValue(tempStr, "password=", password, &valueLen))
+	  if (RC_Login(login, password) == RC_LOGIN_ADMIN_OK)
 	  {
 	      for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) {
 
@@ -1731,8 +1733,8 @@ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
 	        GetUserPassword(user_id, WebPassword, &valueLen);
 
 	        /* Check login and password */
-	        if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) &&
-	            (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) {
+	        if ((strncmp(WebLogin, "admin", MAX_WEB_LOGIN_LEN) == 0) &&
+	            (strncmp(WebPassword, "12345", MAX_WEB_PASSWD_LEN) == 0)) {
 
 	            /* Login and pass are valid */
 

+ 10 - 0
modules/Makefile

@@ -45,6 +45,7 @@ INCLUDES += -Icommon
 INCLUDES += -Imonitor
 INCLUDES += -Ilog
 INCLUDES += -Itesting
+INCLUDES += -Iradius
 CSRC += $(wildcard leds/*.c)
 CSRC += $(wildcard buttons/*.c)
 CSRC += $(wildcard jumper/*.c)
@@ -54,6 +55,7 @@ CSRC += $(wildcard common/*.c)
 CSRC += $(wildcard monitor/*.c)
 CSRC += $(wildcard log/*.c)
 CSRC += $(wildcard testing/*.c)
+CSRC += $(wildcard radius/*.c)
 
 CFLAGS += -DOS_FREERTOS
 CFLAGS += -DHARDWARE_$(shell echo $(HARDWARE) | tr a-z A-Z)
@@ -104,6 +106,14 @@ INCLUDES += -I../thirdparty/PolarSSL/include/polarssl/
 INCLUDES += -I../thirdparty/PolarSSL/include/
 
 CSRC += $(wildcard ../thirdparty/PolarSSL/library/*.c)
+
+#RADDIUS_SERVER
+
+INCLUDES += -I../thirdparty/FreeRadius/
+INCLUDES += -I../thirdparty/FreeRadius/include/
+INCLUDES += -I../thirdparty/FreeRadius/lib/
+
+CSRC += $(wildcard ../thirdparty/FreeRadius/lib/*.c)
     
     
 CFLAGS += -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DLOG_ENABLE

+ 2 - 2
modules/radius/radius_user.c

@@ -148,7 +148,7 @@ RadiusClientResult RC_Login(char* login, char* pas)
         return RC_ERROR;
     break;
     }
-    
+    return RC_ERROR;
     //printf("\r\n");
     //printf("Radius client result: %i\r\n", result);
     
@@ -321,4 +321,4 @@ int RC_GetAccessRights(char* buf)
 }
 
 
-/********************************* (C) РОТЕК **********************************/
+/********************************* (C) РОТЕК **********************************/

+ 1 - 1
modules/radius/radius_user.h

@@ -56,4 +56,4 @@ int RC_GetAccessRights(char* buf);
 
 #endif /* #ifndef __RADIUS_USER_H */
 
-/****************************** (C) LiteMesh ***************** end of file ****/
+/****************************** (C) LiteMesh ***************** end of file ****/

+ 1 - 0
modules/settings_api.c

@@ -22,6 +22,7 @@
 
 #include "FreeRTOS.h"
 #include "task.h"
+#include "main.h"
 
 #include <string.h>
 #include <stdlib.h>

+ 2 - 1
peripheral_modules/src/usart.c

@@ -28,7 +28,7 @@
 
 #ifdef __ICCARM__
   #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)    
-#endif  
+
 
 PUTCHAR_PROTOTYPE   
 {   
@@ -36,6 +36,7 @@ PUTCHAR_PROTOTYPE
   while(USART_GetFlagStatus(USER_USART, USART_FLAG_TXE) == RESET) {}   
   return ch;   
 }   
+#endif
 
 #ifdef BT6702_SERVICE
 #define UPS_RBUF_SIZE 1024

+ 0 - 15
thirdparty/FreeRadius/include/Makefile.am

@@ -1,15 +0,0 @@
-# 
-#  $Id: Makefile.am,v 1.3 2007/01/06 20:15:28 pnixon 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
-
-noinst_HEADERS = pathnames.h messages.h includes.h
-include_HEADERS = freeradius-client.h

+ 0 - 572
thirdparty/FreeRadius/include/Makefile.in

@@ -1,572 +0,0 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 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.
-
-@SET_MAKE@
-
-# 
-#  $Id: Makefile.am,v 1.3 2007/01/06 20:15:28 pnixon 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.
-# 
-#
-
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = include
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/mkinstalldirs $(include_HEADERS) \
-	$(noinst_HEADERS)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(includedir)"
-HEADERS = $(include_HEADERS) $(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
-CRYPTO_LIBS = @CRYPTO_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBVERSION = @LIBVERSION@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NETTLE_CFLAGS = @NETTLE_CFLAGS@
-NETTLE_LIBS = @NETTLE_LIBS@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-RC_LOG_FACILITY = @RC_LOG_FACILITY@
-RC_SECURE_PATH = @RC_SECURE_PATH@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgsysconfdir = @pkgsysconfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign
-noinst_HEADERS = pathnames.h messages.h includes.h
-include_HEADERS = freeradius-client.h
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign include/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-includeHEADERS: $(include_HEADERS)
-	@$(NORMAL_INSTALL)
-	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
-	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
-	done
-
-uninstall-includeHEADERS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(HEADERS)
-installdirs:
-	for dir in "$(DESTDIR)$(includedir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-includeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-includeHEADERS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool cscopelist-am ctags ctags-am distclean \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-includeHEADERS install-info install-info-am \
-	install-man install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am tags tags-am uninstall uninstall-am \
-	uninstall-includeHEADERS
-
-
-# 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:

+ 6 - 1
thirdparty/FreeRadius/include/freeradius-client.h

@@ -34,7 +34,12 @@
  */
 #include	<stdint.h>
 /* #include	<inttypes.h> */
-#include	<stdio.h>
+#ifdef PRINTF_STDLIB
+#include <stdio.h>
+#endif
+#ifdef PRINTF_CUSTOM
+#include "tinystdio.h"
+#endif
 #include	<time.h>
 
 

+ 1 - 0
thirdparty/FreeRadius/include/includes.h

@@ -19,6 +19,7 @@
 
 #include "radius_config.h"
 #include "rtc.h"
+#include "rng.h"
 
 /* AIX requires this to be the first thing in the file.  */
 #ifndef __GNUC__

+ 0 - 32
thirdparty/FreeRadius/lib/Makefile.am

@@ -1,32 +0,0 @@
-#
-# $Id: Makefile.am,v 1.7 2010/02/04 10:27:09 aland Exp $
-#
-# Copyright (C) 1995,1997,1998 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
-
-RC_LOG_FACILITY = @RC_LOG_FACILITY@
-LIBVERSION = @LIBVERSION@
-
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)/include -I$(top_builddir) $(CRYPTO_CFLAGS)
-DEFS = @DEFS@ -DRC_LOG_FACILITY=$(RC_LOG_FACILITY)
-
-CLEANFILES = *~
-
-lib_LTLIBRARIES =   libfreeradius-client.la
-libfreeradius_client_la_SOURCES = buildreq.c clientid.c env.c sendserver.c \
-	avpair.c config.c dict.c ip_util.c log.c util.c  \
-	options.h rc-md5.h rc-md5.c util.h
-
-if !ENABLE_NETTLE
-libfreeradius_client_la_SOURCES += md5.c md5.h
-endif
-
-libfreeradius_client_la_LDFLAGS = -version-info $(LIBVERSION)
-
-libfreeradius_client_la_LIBADD = $(CRYPTO_LIBS)

+ 0 - 682
thirdparty/FreeRadius/lib/Makefile.in

@@ -1,682 +0,0 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 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.
-
-@SET_MAKE@
-
-#
-# $Id: Makefile.am,v 1.7 2010/02/04 10:27:09 aland Exp $
-#
-# Copyright (C) 1995,1997,1998 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.
-#
-
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-@ENABLE_NETTLE_FALSE@am__append_1 = md5.c md5.h
-subdir = lib
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(libdir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-am__DEPENDENCIES_1 =
-libfreeradius_client_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am__libfreeradius_client_la_SOURCES_DIST = buildreq.c clientid.c env.c \
-	sendserver.c avpair.c config.c dict.c ip_util.c log.c util.c \
-	options.h rc-md5.h rc-md5.c md5.c md5.h
-@ENABLE_NETTLE_FALSE@am__objects_1 = md5.lo
-am_libfreeradius_client_la_OBJECTS = buildreq.lo clientid.lo env.lo \
-	sendserver.lo avpair.lo config.lo dict.lo ip_util.lo log.lo \
-	util.lo rc-md5.lo $(am__objects_1)
-libfreeradius_client_la_OBJECTS =  \
-	$(am_libfreeradius_client_la_OBJECTS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-libfreeradius_client_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(AM_CFLAGS) $(CFLAGS) $(libfreeradius_client_la_LDFLAGS) \
-	$(LDFLAGS) -o $@
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(libfreeradius_client_la_SOURCES)
-DIST_SOURCES = $(am__libfreeradius_client_la_SOURCES_DIST)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
-CRYPTO_LIBS = @CRYPTO_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@ -DRC_LOG_FACILITY=$(RC_LOG_FACILITY)
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBVERSION = @LIBVERSION@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NETTLE_CFLAGS = @NETTLE_CFLAGS@
-NETTLE_LIBS = @NETTLE_LIBS@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-RC_LOG_FACILITY = @RC_LOG_FACILITY@
-RC_SECURE_PATH = @RC_SECURE_PATH@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgsysconfdir = @pkgsysconfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)/include -I$(top_builddir) $(CRYPTO_CFLAGS)
-CLEANFILES = *~
-lib_LTLIBRARIES = libfreeradius-client.la
-libfreeradius_client_la_SOURCES = buildreq.c clientid.c env.c \
-	sendserver.c avpair.c config.c dict.c ip_util.c log.c util.c \
-	options.h rc-md5.h rc-md5.c $(am__append_1)
-libfreeradius_client_la_LDFLAGS = -version-info $(LIBVERSION)
-libfreeradius_client_la_LIBADD = $(CRYPTO_LIBS)
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign lib/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
-	}
-
-uninstall-libLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
-	done
-
-clean-libLTLIBRARIES:
-	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; \
-	locs=`for p in $$list; do echo $$p; done | \
-	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
-	      sort -u`; \
-	test -z "$$locs" || { \
-	  echo rm -f $${locs}; \
-	  rm -f $${locs}; \
-	}
-
-libfreeradius-client.la: $(libfreeradius_client_la_OBJECTS) $(libfreeradius_client_la_DEPENDENCIES) $(EXTRA_libfreeradius_client_la_DEPENDENCIES) 
-	$(AM_V_CCLD)$(libfreeradius_client_la_LINK) -rpath $(libdir) $(libfreeradius_client_la_OBJECTS) $(libfreeradius_client_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avpair.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildreq.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientid.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dict.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_util.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rc-md5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendserver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES)
-installdirs:
-	for dir in "$(DESTDIR)$(libdir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-libLTLIBRARIES
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
-	ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-libLTLIBRARIES install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
-
-
-# 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:

+ 0 - 137
thirdparty/FreeRadius/lib/clientid.c

@@ -1,137 +0,0 @@
-/*
- * $Id: clientid.c,v 1.7 2007/07/11 17:29:29 cparker 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 <config.h>
-#include <includes.h>
-#include <freeradius-client.h>
-#include "util.h"
-
-struct map2id_s {
-	char *name;
-	uint32_t id;
-
-	struct map2id_s *next;
-};
-
-/** Read in the ttyname to port id map file
- *
- * @param rh a handle to parsed configuration.
- * @param filename the file name of the map file.
- * @return zero on success, negative integer on failure.
- */
-int rc_read_mapfile(rc_handle *rh, char const *filename)
-{
-	char buffer[1024];
-	FILE *mapfd;
-	char *c, *name, *id, *q;
-	struct map2id_s *p;
-	int lnr = 0;
-
-        if ((mapfd = fopen(filename,"r")) == NULL)
-        {
-		rc_log(LOG_ERR,"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) {
-				rc_log(LOG_CRIT,"rc_read_mapfile: out of memory");
-				fclose(mapfd);
-				return -1;
-			}
-
-			p->name = strdup(name);
-			p->id = atoi(id);
-			p->next = rh->map2id_list;
-			rh->map2id_list = p;
-
-		} else {
-
-			rc_log(LOG_ERR, "rc_read_mapfile: malformed line in %s, line %d", filename, lnr);
-			fclose(mapfd);
-			return -1;
-
-		}
-	}
-
-#undef SKIP
-
-	fclose(mapfd);
-
-	return 0;
-}
-
-/** Maps ttyname to port id
- *
- * @param rh a handle to parsed configuration.
- * @param name full pathname of the tty.
- * @return port id, or zero if no entry found.
- */
-uint32_t rc_map2id(rc_handle const *rh, char const *name)
-{
-	struct map2id_s *p;
-	char ttyname[PATH_MAX];
-	unsigned pos = 0;
-
-	*ttyname = '\0';
-	if (*name != '/') {
-		strcpy(ttyname, "/dev/");
-		pos = 5;
-	}
-
-	strlcpy(&ttyname[pos], name, sizeof(ttyname)-pos);
-
-	for(p = rh->map2id_list; p; p = p->next)
-		if (!strcmp(ttyname, p->name)) return p->id;
-
-	rc_log(LOG_WARNING,"rc_map2id: can't find tty %s in map database", ttyname);
-
-	return 0;
-}
-
-/** Free allocated map2id list
- *
- * @param rh a handle to parsed configuration.
- */
-void rc_map2id_free(rc_handle *rh)
-{
-	struct map2id_s *p, *np;
-
-	if (rh->map2id_list == NULL)
-		return;
-
-	for(p = rh->map2id_list; p != NULL; p = np) {
-		np = p->next;
-		free(p->name);
-		free(p);
-	}
-	rh->map2id_list = NULL;
-}

+ 6 - 0
thirdparty/FreeRadius/lib/config.c

@@ -54,6 +54,7 @@ static OPTION *find_option(rc_handle const *rh, char const *optname, unsigned in
  */
 static int set_option_str(char const *filename, int line, OPTION *option, char const *p)
 {
+#if 0
 	if (p) {
 		option->val = (void *) strdup(p);
 		if (option->val == NULL) {
@@ -65,6 +66,7 @@ static int set_option_str(char const *filename, int line, OPTION *option, char c
 	}
 
 	return 0;
+#endif
 }
 
 static int set_option_int(char const *filename, int line, OPTION *option, char const *p)
@@ -221,6 +223,7 @@ static int set_option_srv(char const *filename, int line, OPTION *option, char c
 
 static int set_option_auo(char const *filename, int line, OPTION *option, char const *p)
 {
+#if 0
 	int *iptr;
 	char *p_dupe = NULL;
 	char *p_pointer = NULL;
@@ -272,6 +275,7 @@ static int set_option_auo(char const *filename, int line, OPTION *option, char c
 
 	free(p_dupe);
 	return 0;
+#endif
 }
 
 /** Allow a config option to be added to rc_handle from inside a program
@@ -761,6 +765,7 @@ static int rc_is_myname(const struct addrinfo *info)
 int rc_find_server_addr(rc_handle const *rh, char const *server_name,
                         struct addrinfo** info, char *secret, unsigned flags)
 {
+#if 0
 	int		i;
 	int             result = 0;
 	FILE           *clientfd;
@@ -899,6 +904,7 @@ int rc_find_server_addr(rc_handle const *rh, char const *server_name,
  		//freeaddrinfo(tmpinfo);
 
 	return result;
+#endif
 }
 
 /**

+ 3 - 0
thirdparty/FreeRadius/lib/dict.c

@@ -17,6 +17,9 @@
 #include <radius_config.h>
 #include <includes.h>
 #include <freeradius-client.h>
+#if defined ( __GNUC__ )
+#include <my_strings.h>
+#endif
 
 /** Initialize the dictionary
  *

+ 0 - 138
thirdparty/FreeRadius/lib/env.c

@@ -1,138 +0,0 @@
-/*
- * $Id: env.c,v 1.6 2007/06/21 18:07:23 cparker 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 <config.h>
-#include <includes.h>
-#include <freeradius-client.h>
-
-/** Allocate space for a new environment
- *
- * @param size the maximum size of the environment.
- * @return the initialized environment.
- */
-ENV *rc_new_env(int size)
-{
-	ENV *p;
-
-	if (size < 1)
-		return NULL;
-
-	if ((p = malloc(sizeof(*p))) == NULL)
-		return NULL;
-
-	if ((p->env = malloc(size * sizeof(char *))) == NULL)
-	{
-		rc_log(LOG_CRIT, "rc_new_env: out of memory");
-		free(p);
-		return NULL;
-	}
-
-	p->env[0] = NULL;
-
-	p->size = 0;
-	p->maxsize = size;
-
-	return p;
-}
-
-/** Free the space used by an env structure
- *
- * @param env an initialized environment value.
- */
-void rc_free_env(ENV *env)
-{
-	free(env->env);
-	free(env);
-}
-
-/** Add an environment entry
- *
- * @param env an initialized environment value.
- * @return 0 on success or -1 on error.
- */
-int rc_add_env(ENV *env, char const *name, char const *value)
-{
-	int i;
-	size_t len;
-	char *new_env;
-
-	for (i = 0; env->env[i] != NULL; i++)
-	{
-		if (strncmp(env->env[i], name, MAX(strchr(env->env[i], '=') - env->env[i], (int)strlen(name))) == 0)
-			break;
-	}
-
-	if (env->env[i])
-	{
-		len = strlen(name)+strlen(value)+2;
-		if ((new_env = realloc(env->env[i], len)) == NULL)
-			return -1;
-
-		env->env[i] = new_env;
-
-		snprintf(env->env[i], len, "%s=%s", name, value);
-	} else {
-		if (env->size == (env->maxsize-1)) {
-			rc_log(LOG_CRIT, "rc_add_env: not enough space for environment (increase ENV_SIZE)");
-			return -1;
-		}
-
-		len = strlen(name)+strlen(value)+2;
-		if ((env->env[env->size] = malloc(len)) == NULL) {
-			rc_log(LOG_CRIT, "rc_add_env: out of memory");
-			return -1;
-		}
-
-		snprintf(env->env[env->size], len, "%s=%s", name, value);
-
-		env->size++;
-
-		env->env[env->size] = NULL;
-	}
-
-	return 0;
-}
-
-/** Imports an array of null-terminated strings
- *
- * @param env an initialized environment value.
- * @return 0 on success or -1 on error.
- */
-int rc_import_env(ENV *env, char const **import)
-{
-	char *es;
-
-	while (*import)
-	{
-		es = strchr(*import, '=');
-
-		if (!es)
-		{
-			import++;
-			continue;
-		}
-
-		/* ok, i grant thats not very clean... */
-		*es = '\0';
-
-		if (rc_add_env(env, *import, es+1) < 0)
-		{
-			*es = '=';
-			return -1;
-		}
-
-		*es = '=';
-
-		import++;
-	}
-
-	return 0;
-}

+ 0 - 184
thirdparty/FreeRadius/lib/ip_util.c

@@ -1,184 +0,0 @@
-/*
- * $Id: ip_util.c,v 1.14 2010/03/17 18:57:01 aland 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 <config.h>
-#include <includes.h>
-#include <freeradius-client.h>
-#include "util.h"
-
-#define HOSTBUF_SIZE 1024
-
- /** Return a struct addrinfo from a host name or address in textual notation.
-  * @param host the name of the host
-  * @param flags should be a combinations of %PW_AI flags
-  * @return address which should be deallocated using freeaddrinfo() or NULL on failure
-  **/
- 
-struct addrinfo *rc_getaddrinfo (char const *host, unsigned flags)
- {
-	struct addrinfo hints, *res;
-	int err;
-	const char *service = NULL;
- 
-	memset(&hints, 0, sizeof(hints));
-	hints.ai_socktype = SOCK_DGRAM;
-	if (flags & PW_AI_PASSIVE)
-		hints.ai_flags = AI_PASSIVE;
-
-	if (flags & PW_AI_AUTH)
-		service = "radius";
-	else if (flags & PW_AI_ACCT)
-		service = "radius-acct";
- 
-	err = getaddrinfo(host, service, &hints, &res);
-	if (err != 0) {
- 		return NULL;
- 	}
-
-	return res;
-}
-
-/** Get the port number for the supplied request type
- *
- * @param type %AUTH or %ACCT.
- * @return the port number.
- */
-unsigned short rc_getport(int type)
-{
-	struct servent *svp;
-
-	if ((svp = getservbyname ((type==AUTH)?"radius" : "radacct", "udp")) == NULL)
-	{
-		return (type==AUTH) ? PW_AUTH_UDP_PORT : PW_ACCT_UDP_PORT;
-	} else {
-		return ntohs ((unsigned short) svp->s_port);
-	}
-}
-
-/** Get the hostname of this machine
- *
- * @param hostname will hold the name of the host.
- * @param len the size of hostname.
- * @return -1 on failure, 0 on success.
- */
-int
-rc_own_hostname(char *hostname, int len)
-{
-#ifdef HAVE_UNAME
-	struct	utsname uts;
-#endif
-
-#if defined(HAVE_UNAME)
-	if (uname(&uts) < 0)
-	{
-		rc_log(LOG_ERR,"rc_own_hostname: couldn't get own hostname");
-		return -1;
-	}
-	strlcpy(hostname, uts.nodename, len);
-#elif defined(HAVE_GETHOSTNAME)
-	if (gethostname(hostname, len) < 0)
-	{
-		rc_log(LOG_ERR,"rc_own_hostname: couldn't get own hostname");
-		return -1;
-	}
-#elif defined(HAVE_SYSINFO)
-	if (sysinfo(SI_HOSTNAME, hostname, len) < 0)
-	{
-		rc_log(LOG_ERR,"rc_own_hostname: couldn't get own hostname");
-		return -1;
-	}
-#else
-	return -1;
-#endif
-
-	return 0;
-}
-
-/** Find outbound interface address for a given destination
- *
- * Given remote address find local address which the system will use as a source address for sending
- * datagrams to that remote address.
- *
- * @param lia local address.
- * @param ria the remove address.
- * @return 0 in success, -1 on failure, address is filled into the first argument.
- */
-int rc_get_srcaddr(struct sockaddr *lia, const struct sockaddr *ria)
-{
-	int temp_sock;
-	socklen_t namelen;
-
-	temp_sock = socket(ria->sa_family, SOCK_DGRAM, 0);
-	if (temp_sock == -1) {
-		rc_log(LOG_ERR, "rc_get_srcaddr: socket: %s", strerror(errno));
-		return -1;
-	}
-
-	if (connect(temp_sock, ria, SA_LEN(ria)) != 0) {
-		rc_log(LOG_ERR, "rc_get_srcaddr: connect: %s",
-		    strerror(errno));
-		close(temp_sock);
-		return -1;
-	}
-
-	namelen = SA_LEN(ria);
-	if (getsockname(temp_sock, lia, &namelen) != 0) {
-		rc_log(LOG_ERR, "rc_get_srcaddr: getsockname: %s",
-		    strerror(errno));
-		close(temp_sock);
-		return -1;
-	}
-
-	close(temp_sock);
-	return 0;
-}
-
-/** rc_own_bind_addr:
- * @rh: a handle to parsed configuration
- * @lia: the local address to listen to
- *
- * Get the IP address to be used as a source address
- * for sending requests in host order.
- *
- **/
-void rc_own_bind_addr(rc_handle *rh, struct sockaddr_storage *lia)
-{
-	char *txtaddr = rc_conf_str(rh, "bindaddr");
-	struct addrinfo *info;
-
-	if (rh->own_bind_addr_set) {
-		memcpy(lia, &rh->own_bind_addr, SS_LEN(&rh->own_bind_addr));
-		return;
-	}
-
-	memset(lia, 0, sizeof(*lia));
-	if (txtaddr == NULL || txtaddr[0] == '*') {
-		((struct sockaddr_in*)lia)->sin_family = AF_INET;
-		((struct sockaddr_in*)lia)->sin_addr.s_addr = INADDR_ANY;
-	} else {
-		info = rc_getaddrinfo (txtaddr, PW_AI_PASSIVE);
-		if (info == NULL) {
-			rc_log(LOG_ERR, "rc_own_ipaddress: couldn't get IP address from bindaddr");
-			((struct sockaddr_in*)lia)->sin_family = AF_INET;
-			((struct sockaddr_in*)lia)->sin_addr.s_addr = INADDR_ANY;
-			return;
-		}
-
-		memcpy(lia, info->ai_addr, info->ai_addrlen);
-       }
-
-       return;
-}

+ 0 - 28
thirdparty/FreeRadius/src/Makefile.am

@@ -1,28 +0,0 @@
-#
-# $Id: Makefile.am,v 1.7 2007/03/01 17:50:38 cparker Exp $
-#
-# Copyright (C) 1995,1997,1998 Lars Fenneberg
-#
-# See the file COPYRIGHT for the respective terms and conditions. 
-#
-
-AUTOMAKE_OPTIONS = foreign
-
-pkgsysconfdir=@pkgsysconfdir@
-
-DEFS = @DEFS@ -DRC_CONFIG_FILE=\"${pkgsysconfdir}/radiusclient.conf\" \
-	      -DRC_SECURE_PATH=\"@RC_SECURE_PATH@\"
-INCLUDES = -I$(srcdir) -I$(top_srcdir)/include -I$(top_builddir)
-LDADD = ../lib/libfreeradius-client.la
-
-CLEANFILES = *~
-
-noinst_HEADERS = radlogin.h
-
-sbin_PROGRAMS = radlogin radstatus radacct radexample radiusclient radembedded
-radlogin_SOURCES = radlogin.c radius.c local.c
-radacct_SOURCES = radacct.c
-radstatus_SOURCES = radstatus.c
-radexample_SOURCES = radexample.c
-radiusclient_SOURCES = radiusclient.c
-radembedded_SOURCES = radembedded.c

+ 0 - 706
thirdparty/FreeRadius/src/Makefile.in

@@ -1,706 +0,0 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 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.
-
-@SET_MAKE@
-
-#
-# $Id: Makefile.am,v 1.7 2007/03/01 17:50:38 cparker Exp $
-#
-# Copyright (C) 1995,1997,1998 Lars Fenneberg
-#
-# See the file COPYRIGHT for the respective terms and conditions. 
-#
-
-
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-sbin_PROGRAMS = radlogin$(EXEEXT) radstatus$(EXEEXT) radacct$(EXEEXT) \
-	radexample$(EXEEXT) radiusclient$(EXEEXT) radembedded$(EXEEXT)
-subdir = src
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \
-	$(noinst_HEADERS)
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(sbindir)"
-PROGRAMS = $(sbin_PROGRAMS)
-am_radacct_OBJECTS = radacct.$(OBJEXT)
-radacct_OBJECTS = $(am_radacct_OBJECTS)
-radacct_LDADD = $(LDADD)
-radacct_DEPENDENCIES = ../lib/libfreeradius-client.la
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
-am_radembedded_OBJECTS = radembedded.$(OBJEXT)
-radembedded_OBJECTS = $(am_radembedded_OBJECTS)
-radembedded_LDADD = $(LDADD)
-radembedded_DEPENDENCIES = ../lib/libfreeradius-client.la
-am_radexample_OBJECTS = radexample.$(OBJEXT)
-radexample_OBJECTS = $(am_radexample_OBJECTS)
-radexample_LDADD = $(LDADD)
-radexample_DEPENDENCIES = ../lib/libfreeradius-client.la
-am_radiusclient_OBJECTS = radiusclient.$(OBJEXT)
-radiusclient_OBJECTS = $(am_radiusclient_OBJECTS)
-radiusclient_LDADD = $(LDADD)
-radiusclient_DEPENDENCIES = ../lib/libfreeradius-client.la
-am_radlogin_OBJECTS = radlogin.$(OBJEXT) radius.$(OBJEXT) \
-	local.$(OBJEXT)
-radlogin_OBJECTS = $(am_radlogin_OBJECTS)
-radlogin_LDADD = $(LDADD)
-radlogin_DEPENDENCIES = ../lib/libfreeradius-client.la
-am_radstatus_OBJECTS = radstatus.$(OBJEXT)
-radstatus_OBJECTS = $(am_radstatus_OBJECTS)
-radstatus_LDADD = $(LDADD)
-radstatus_DEPENDENCIES = ../lib/libfreeradius-client.la
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-SOURCES = $(radacct_SOURCES) $(radembedded_SOURCES) \
-	$(radexample_SOURCES) $(radiusclient_SOURCES) \
-	$(radlogin_SOURCES) $(radstatus_SOURCES)
-DIST_SOURCES = $(radacct_SOURCES) $(radembedded_SOURCES) \
-	$(radexample_SOURCES) $(radiusclient_SOURCES) \
-	$(radlogin_SOURCES) $(radstatus_SOURCES)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-HEADERS = $(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
-CRYPTO_LIBS = @CRYPTO_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@ -DRC_CONFIG_FILE=\"${pkgsysconfdir}/radiusclient.conf\" \
-	      -DRC_SECURE_PATH=\"@RC_SECURE_PATH@\"
-
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIBVERSION = @LIBVERSION@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NETTLE_CFLAGS = @NETTLE_CFLAGS@
-NETTLE_LIBS = @NETTLE_LIBS@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-RANLIB = @RANLIB@
-RC_LOG_FACILITY = @RC_LOG_FACILITY@
-RC_SECURE_PATH = @RC_SECURE_PATH@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgsysconfdir = @pkgsysconfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(srcdir) -I$(top_srcdir)/include -I$(top_builddir)
-LDADD = ../lib/libfreeradius-client.la
-CLEANFILES = *~
-noinst_HEADERS = radlogin.h
-radlogin_SOURCES = radlogin.c radius.c local.c
-radacct_SOURCES = radacct.c
-radstatus_SOURCES = radstatus.c
-radexample_SOURCES = radexample.c
-radiusclient_SOURCES = radiusclient.c
-radembedded_SOURCES = radembedded.c
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign src/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-install-sbinPROGRAMS: $(sbin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
-	fi; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p \
-	 || test -f $$p1 \
-	  ; then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' \
-	    -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
-	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-sbinPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' \
-	`; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(sbindir)" && rm -f $$files
-
-clean-sbinPROGRAMS:
-	@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
-radacct$(EXEEXT): $(radacct_OBJECTS) $(radacct_DEPENDENCIES) $(EXTRA_radacct_DEPENDENCIES) 
-	@rm -f radacct$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(radacct_OBJECTS) $(radacct_LDADD) $(LIBS)
-
-radembedded$(EXEEXT): $(radembedded_OBJECTS) $(radembedded_DEPENDENCIES) $(EXTRA_radembedded_DEPENDENCIES) 
-	@rm -f radembedded$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(radembedded_OBJECTS) $(radembedded_LDADD) $(LIBS)
-
-radexample$(EXEEXT): $(radexample_OBJECTS) $(radexample_DEPENDENCIES) $(EXTRA_radexample_DEPENDENCIES) 
-	@rm -f radexample$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(radexample_OBJECTS) $(radexample_LDADD) $(LIBS)
-
-radiusclient$(EXEEXT): $(radiusclient_OBJECTS) $(radiusclient_DEPENDENCIES) $(EXTRA_radiusclient_DEPENDENCIES) 
-	@rm -f radiusclient$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(radiusclient_OBJECTS) $(radiusclient_LDADD) $(LIBS)
-
-radlogin$(EXEEXT): $(radlogin_OBJECTS) $(radlogin_DEPENDENCIES) $(EXTRA_radlogin_DEPENDENCIES) 
-	@rm -f radlogin$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(radlogin_OBJECTS) $(radlogin_LDADD) $(LIBS)
-
-radstatus$(EXEEXT): $(radstatus_OBJECTS) $(radstatus_DEPENDENCIES) $(EXTRA_radstatus_DEPENDENCIES) 
-	@rm -f radstatus$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(radstatus_OBJECTS) $(radstatus_LDADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radacct.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radembedded.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radexample.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radius.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radiusclient.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radlogin.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radstatus.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-
-ID: $(am__tagged_files)
-	$(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	set x; \
-	here=`pwd`; \
-	$(am__define_uniq_tagged_files); \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: ctags-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-	$(am__define_uniq_tagged_files); \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-	list='$(am__tagged_files)'; \
-	case "$(srcdir)" in \
-	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-	  *) sdir=$(subdir)/$(srcdir) ;; \
-	esac; \
-	for i in $$list; do \
-	  if test -f "$$i"; then \
-	    echo "$(subdir)/$$i"; \
-	  else \
-	    echo "$$sdir/$$i"; \
-	  fi; \
-	done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
-installdirs:
-	for dir in "$(DESTDIR)$(sbindir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
-	mostlyclean-am
-
-distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-sbinPROGRAMS
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-sbinPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
-	distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-sbinPROGRAMS install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS
-
-
-# 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:

+ 0 - 84
thirdparty/FreeRadius/src/local.c

@@ -1,84 +0,0 @@
-/*
- * $Id: local.c,v 1.5 2007/01/06 20:15:35 pnixon 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.
- *
- */
-
-#include <config.h>
-#include <includes.h>
-#include <freeradius-client.h>
-#include <messages.h>
-#include <radlogin.h>
-
-extern ENV *env;
-
-LFUNC auth_local(char const *username, char const *passwd)
-{
-	struct passwd	*pw;
-	char		*xpasswd;
-#ifdef SHADOW_PASSWORD
-	struct spwd	*spw;
-#endif
-
-	if ((pw = getpwnam(username)) == NULL) {
-		endpwent();
-		rc_log(LOG_NOTICE, "authentication FAILED, type local, username %s", username);
-		printf(SC_LOCAL_FAILED);
-		return NULL;
-	}
-	endpwent();
-
-#ifdef SHADOW_PASSWORD
-        if((spw = getspnam(pw->pw_name)) == NULL) {
-			endspent();
-			rc_log(LOG_NOTICE, "authentication FAILED, type local, username %s", username);
-			printf(SC_LOCAL_FAILED);
-			return NULL;
-        }
-        else
-        {
-        	pw->pw_passwd = spw->sp_pwdp;
-        }
-        endspent();
-#endif /* SHADOW_PASSWORD */
-
-	xpasswd = crypt(passwd, pw->pw_passwd);
-
-	if (*pw->pw_passwd == '\0' || !xpasswd || strcmp(xpasswd, pw->pw_passwd)) {
-		rc_log(LOG_NOTICE, "authentication FAILED, type local, username %s", username);
-		printf(SC_LOCAL_FAILED);
-		return NULL;
-	}
-
-	rc_log(LOG_NOTICE, "authentication OK, type local, username %s", username);
-	printf(SC_LOCAL_OK);
-
-	return local_login;
-}
-
-void
-local_login(rc_handle *rh, char const *username)
-{
-	char *login_local = rc_conf_str(rh, "login_local");
-
-	/* login should spot this... but who knows what old /bin/logins
-	 * may be still around
-	 */
-	if (*username == '-') {
-		rc_log(LOG_WARNING, "username can't start with a dash");
-		exit(ERROR_RC);
-	}
-	/* the new shadow login seems to require either a -r or a -h
-	 * flag for -f to work (so source code, lmain.c) so we supply
-	 * it here. shouldn't hurt on other systems,	-lf, 03/13/96
-	 */
-	execle(login_local, login_local, "-h", "localhost", "-f", username, NULL, env->env);
-	rc_log(LOG_ERR, "couldn't execute %s: %s", login_local, strerror(errno));
-	sleep(1);	/* give the user time to read */
-	exit(ERROR_RC);
-}

+ 0 - 150
thirdparty/FreeRadius/src/radacct.c

@@ -1,150 +0,0 @@
-/*
- * $Id: radacct.c,v 1.6 2007/07/11 17:29:30 cparker Exp $
- *
- * Copyright (C) 1995,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.
- *
- */
-
-static char	rcsid[] =
-		"$Id: radacct.c,v 1.6 2007/07/11 17:29:30 cparker Exp $";
-
-#include <config.h>
-#include <includes.h>
-#include <freeradius-client.h>
-#include <messages.h>
-#include <pathnames.h>
-
-static char *pname;
-
-void usage(void)
-{
-	fprintf(stderr,"Usage: %s [-Vh] [-f <config_file>] [-i <client_port>]\n\n", pname);
-	fprintf(stderr,"  -V            output version information\n");
-	fprintf(stderr,"  -h            output this text\n");
-	fprintf(stderr,"  -f		filename of alternate config file\n");
-	fprintf(stderr,"  -i            ttyname to send to the server\n");
-	exit(ERROR_RC);
-}
-
-void version(void)
-{
-	fprintf(stderr,"%s: %s\n", pname ,rcsid);
-	exit(ERROR_RC);
-}
-
-int
-main (int argc, char **argv)
-{
-	int			result = ERROR_RC;
-	VALUE_PAIR	*send = NULL;
-   	uint32_t		client_port;
-   	int			c;
-	VALUE_PAIR	*vp;
-	DICT_VALUE  *dval;
-	char *username, *service, *fproto, *type;
-	char *path_radiusclient_conf = RC_CONFIG_FILE;
-	char *ttyn = NULL;
-	rc_handle *rh;
-
-	extern char *optarg;
-
-	pname = (pname = strrchr(argv[0],'/'))?pname+1:argv[0];
-
-	rc_openlog(pname);
-
-	while ((c = getopt(argc,argv,"f:i:hV")) > 0)
-	{
-		switch(c)
-		{
-			case 'f':
-				path_radiusclient_conf = optarg;
-				break;
-			case 'i':
-				ttyn = optarg;
-				break;
-			case 'V':
-				version();
-				break;
-			case 'h':
-				usage();
-				break;
-			default:
-				exit(ERROR_RC);
-				break;
-		}
-	}
-
-	if ((rh = rc_read_config(path_radiusclient_conf)) == NULL)
-		exit(ERROR_RC);
-
-	if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary")) != 0)
-		exit (ERROR_RC);
-
-	if (rc_read_mapfile(rh, rc_conf_str(rh, "mapfile")) != 0)
-		exit (ERROR_RC);
-
-	if (ttyn != NULL)
-	{
-		client_port = rc_map2id(rh, ttyn);
-	}
-	else
-	{
-		/* we take stdout here, because stdin is usually connected
-	 	 *  to our input file
-	 	 */
-	 	if ((ttyn = ttyname(1)) != NULL)
-	 	{
-			client_port = rc_map2id(rh, ttyn);
-		}
-		else
-		{
-			client_port = 0;
-		}
-	}
-
-	if ((send = rc_avpair_readin(rh, stdin))) {
-
-		username = service = type = "(unknown)";
-		fproto = NULL;
-
-		if ((vp = rc_avpair_get(send, PW_ACCT_STATUS_TYPE, 0)) != NULL)
-				if ((dval = rc_dict_getval(rh, vp->lvalue, vp->name)) != NULL) {
-					type = dval->name;
-				}
-
-		if ((vp = rc_avpair_get(send, PW_USER_NAME, 0)) != NULL)
-				username = vp->strvalue;
-
-		if ((vp = rc_avpair_get(send, PW_SERVICE_TYPE, 0)) != NULL)
-				if ((dval = rc_dict_getval(rh, vp->lvalue, vp->name)) != NULL) {
-					service = dval->name;
-				}
-
-		if (vp && (vp->lvalue == PW_FRAMED) &&
-			((vp = rc_avpair_get(send, PW_FRAMED_PROTOCOL, 0)) != NULL))
-				if ((dval = rc_dict_getval(rh, vp->lvalue, vp->name)) != NULL) {
-					fproto = dval->name;
-				}
-
-		result = rc_acct(rh, client_port, send);
-		if (result == OK_RC)
-		{
-			fprintf(stderr, SC_ACCT_OK);
-			rc_log(LOG_NOTICE, "accounting OK, type %s, username %s, service %s%s%s",
-				   type, username, service,(fproto)?"/":"", (fproto)?fproto:"");
-		}
-		else
-		{
-			fprintf(stderr, SC_ACCT_FAILED, result);
-			rc_log(LOG_NOTICE, "accounting FAILED, type %s, username %s, service %s%s%s",
-				   type, username, service,(fproto)?"/":"", (fproto)?fproto:"");
-		}
-		rc_avpair_free(send);
-	}
-
-	exit (result);
-}

+ 0 - 156
thirdparty/FreeRadius/src/radembedded.c

@@ -1,156 +0,0 @@
-/*
- * radembedded.c - a sample c program showing how to embed the configuration of a radius
- * client, using the FreeRADIUS Client Library without an external configuration file.
- */
-
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <syslog.h>
-#include <freeradius-client.h>
-
-
-int
-main (int argc, char **argv)
-{
-	int		retval = 0;
-	rc_handle 	*rh = NULL;
-
-	uint32_t 		client_port = 0;
-	uint32_t		status_type = PW_STATUS_STOP; 
-        VALUE_PAIR      *send = NULL;
-	char		username[255] = "bob@somedomain.here";
-	char		callfrom[255] = "8475551212";
-	char		callto[255] = "8479630116";
-	char		myuuid[255] = "981743-asdf-90834klj234";
-
-	/* Initialize the 'rh' structure */
-
-	rh = rc_new();
-	if (rh == NULL) 
-	{
-		printf("ERROR: Failed to allocate initial structure\n");
-		exit(1);
-	}
-
-	/* Initialize the config structure */
-
-	rh = rc_config_init(rh);
-	if (rh == NULL)
-	{
-		printf("ERROR: Failed to initialze configuration\n");
-		exit(1);
-	}
-
-	/* 
-	 * Set the required options for configuration
-	 */
-
-	/* set auth_order to be radius only */
-
-	if (rc_add_config(rh, "auth_order", "radius", "config", 0) != 0) 
-	{
-		printf("ERROR: Unable to set auth_order.\n");
-		rc_destroy(rh);
-		exit(1);
-	}
-
-	if (rc_add_config(rh, "login_tries", "4", "config", 0) != 0) 
-	{
-		printf("ERROR: Unable to set login_tries.\n");
-		rc_destroy(rh);
-		exit(1);
-	}
-
-	if (rc_add_config(rh, "dictionary", "/usr/local/radius/dictionary", "config", 0) != 0)
-	{
-		printf("ERROR: Unable to set dictionary.\n");
-		rc_destroy(rh);
-		exit(1);
-	}
-	
-	if (rc_add_config(rh, "radius_retries", "3", "config", 0) != 0) 
-	{
-		printf("ERROR: Unable to set radius_retries.\n");
-		rc_destroy(rh);
-		exit(1);
-	}
-
-	if (rc_add_config(rh, "radius_timeout", "5", "config", 0) != 0) 
-	{
-		printf("ERROR: Unable to set radius_timeout.\n");
-		rc_destroy(rh);
-		exit(1);
-	}
-
-	/* auth/acct servers are added in the form: host[:port[:secret]]
-	 * If you don't set the secret via the add_config option, you must set a 'servers'
-         * entry to specify the location of the 'servers' file which stores the secrets to
-         * be used.
-         */
-
-	if (rc_add_config(rh, "authserver", "localhost::testing123", "config", 0) != 0) 
-	{
-		printf("ERROR: Unable to set authserver.\n");
-		rc_destroy(rh);
-		exit(1);
-	}
-
-	if (rc_add_config(rh, "acctserver", "localhost:1813:testing123", "config", 0) != 0) 
-	{
-		printf("ERROR: Unable to set acctserver.\n");
-		rc_destroy(rh);
-		exit(1);
-	}
-
-	/* Done setting configuration items */
-	
-	/* Read in the dictionary file(s) */
-
-	if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary")) != 0) 
-	{
-		printf("ERROR: Failed to initialize radius dictionary\n");
-		exit(1);
-	}
-
-        if (rc_avpair_add(rh, &send, PW_ACCT_STATUS_TYPE, &status_type, -1, 0) == NULL)
-	{	
-		printf("ERROR: Failed adding Acct-Status-Type: to %d\n", status_type);		
-                exit(1);
-	}
-        if (rc_avpair_add(rh, &send, PW_ACCT_SESSION_ID, myuuid, -1, 0) == NULL)
-	{	
-		printf("ERROR: Failed adding Acct-Session-ID: to %s\n", myuuid);		
-                exit(1);
-	}
-        if (rc_avpair_add(rh, &send, PW_USER_NAME, username, -1, 0) == NULL)
-	{	
-		printf("ERROR: Failed adding User-Name: to %s\n", username);		
-                exit(1);
-	}
-        if (rc_avpair_add(rh, &send, PW_CALLED_STATION_ID, callto, -1, 0) == NULL)
-	{	
-		printf("ERROR: Failed adding Called-Station-ID: to %s\n", callto);		
-                exit(1);
-	}
-        if (rc_avpair_add(rh, &send, PW_CALLING_STATION_ID, callfrom, -1, 0) == NULL)
-	{	
-		printf("ERROR: Failed adding Calling-Station-ID: to %s\n", callfrom);		
-                exit(1);
-	}
-
-	if(rc_acct(rh, client_port, send) == OK_RC)
-	{
-		printf("INFO: Accounting OK: %s\n", username);
-		retval = 0;
-	}
-	else
-	{
-		printf("INFO: Accounting Failed: %s\n", username);
-		retval = -1;
-	}
-	rc_destroy(rh);
-	rc_avpair_free(send);
-
-	exit(retval);
-}

+ 0 - 96
thirdparty/FreeRadius/src/radexample.c

@@ -1,96 +0,0 @@
-/*
- * $Id: radexample.c,v 1.8 2007/07/11 17:29:30 cparker 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.
- *
- */
-
-
-static char	rcsid[] =
-		"$Id: radexample.c,v 1.8 2007/07/11 17:29:30 cparker Exp $";
-
-#include	<config.h>
-#include	<includes.h>
-#include	<freeradius-client.h>
-#include	<pathnames.h>
-
-static char *pname = NULL;
-
-int
-main (int argc, char **argv)
-{
-	int             result;
-	char		username[128];
-	char            passwd[AUTH_PASS_LEN + 1];
-	VALUE_PAIR 	*send, *received;
-	uint32_t		service;
-	char 		msg[PW_MAX_MSG_SIZE], username_realm[256];
-	char		*default_realm;
-	rc_handle	*rh;
-
-	pname = (pname = strrchr(argv[0],'/'))?pname+1:argv[0];
-
-	rc_openlog(pname);
-
-	if ((rh = rc_read_config(RC_CONFIG_FILE)) == NULL)
-		return ERROR_RC;
-
-	if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary")) != 0)
-		return ERROR_RC;
-
-	default_realm = rc_conf_str(rh, "default_realm");
-
-	strncpy(username, rc_getstr (rh, "login: ",1), sizeof(username));
-	strncpy (passwd, rc_getstr(rh, "Password: ",0), sizeof (passwd));
-
-	send = NULL;
-
-	/*
-	 * Fill in User-Name
-	 */
-
-	strncpy(username_realm, username, sizeof(username_realm));
-
-	/* Append default realm */
-	if ((strchr(username_realm, '@') == NULL) && default_realm &&
-	    (*default_realm != '\0'))
-	{
-		strncat(username_realm, "@", sizeof(username_realm)-strlen(username_realm)-1);
-		strncat(username_realm, default_realm, sizeof(username_realm)-strlen(username_realm)-1);
-	}
-
-	if (rc_avpair_add(rh, &send, PW_USER_NAME, username_realm, -1, 0) == NULL)
-		return ERROR_RC;
-
-	/*
-	 * Fill in User-Password
-	 */
-
-	if (rc_avpair_add(rh, &send, PW_USER_PASSWORD, passwd, -1, 0) == NULL)
-		return ERROR_RC;
-
-	/*
-	 * Fill in Service-Type
-	 */
-
-	service = PW_AUTHENTICATE_ONLY;
-	if (rc_avpair_add(rh, &send, PW_SERVICE_TYPE, &service, -1, 0) == NULL)
-		return ERROR_RC;
-
-	result = rc_auth(rh, 0, send, &received, msg);
-
-	if (result == OK_RC)
-	{
-		fprintf(stderr, "\"%s\" RADIUS Authentication OK\n", username);
-	}
-	else
-	{
-		fprintf(stderr, "\"%s\" RADIUS Authentication failure (RC=%i)\n", username, result);
-	}
-
-	return result;
-}

+ 0 - 197
thirdparty/FreeRadius/src/radius.c

@@ -1,197 +0,0 @@
-/*
- * $Id: radius.c,v 1.9 2007/07/11 17:29:30 cparker 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.
- *
- */
-
-#include <config.h>
-#include <includes.h>
-#include <freeradius-client.h>
-#include <messages.h>
-#include <radlogin.h>
-
-extern ENV *env;
-
-LFUNC auth_radius(rc_handle *rh, uint32_t client_port, char const *username, char const *passwd)
-{
-
-	VALUE_PAIR 	*send, *received, *vp, *service_vp;
-	uint32_t		service, ftype, ctype;
-	char 		msg[PW_MAX_MSG_SIZE], *p, username_realm[256];
-	char            name[2048], value[2048]; /* more than enough */
-	int		result;
-	char		*default_realm, *service_str, *ftype_str;
-	DICT_VALUE	*dval;
-
-	send = received = NULL;
-	memset(msg, 0, sizeof(msg));
-
-	/*
-	 * Determine and fill in Service-Type
-	 */
-
-	service = PW_LOGIN;
-	ftype = 0;
-	ctype = 0;
-
-	if (rc_avpair_add(rh, &send, PW_SERVICE_TYPE, &service, -1, 0) == NULL)
-		return NULL;
-
-	/* Fill in Framed-Protocol, if neccessary */
-
-	if (ftype != 0)
-	{
-		if (rc_avpair_add(rh, &send, PW_FRAMED_PROTOCOL, &ftype, -1, 0) == NULL)
-			return NULL;
-	}
-
-	/* Fill in Framed-Compression, if neccessary */
-
-	if (ctype != 0)
-	{
-		if (rc_avpair_add(rh, &send, PW_FRAMED_COMPRESSION, &ctype, -1, 0) == NULL)
-			return NULL;
-	}
-
-	/*
-	 * Fill in User-Name
-	 */
-
-	 strncpy(username_realm, username, sizeof(username_realm));
-
-	 /* Append default realm */
-	 default_realm = rc_conf_str(rh, "default_realm");
-
-	 if ((strchr(username_realm, '@') == NULL) && default_realm &&
-	     ((*default_realm) != '\0'))
-	 {
-		strncat(username_realm, "@", sizeof(username_realm)-strlen(username_realm)-1);
-		strncat(username_realm, default_realm, sizeof(username_realm)-strlen(username_realm)-1);
-	 }
-
-	if (rc_avpair_add(rh, &send, PW_USER_NAME, username_realm, -1, 0) == NULL)
-		return NULL;
-
-	/*
-	 * Fill in User-Password
-	 */
-
-	if (rc_avpair_add(rh, &send, PW_USER_PASSWORD, passwd, -1, 0) == NULL)
-		return NULL;
-
-	result = rc_auth(rh, client_port, send, &received, msg);
-
-	if (result == OK_RC)
-	{
-		/* Set up a running count of attributes saved. */
-		int acount[256], attr;
-
-		memset(acount, 0, sizeof(acount));
-
-		rc_add_env(env, "RADIUS_USER_NAME", username);
-
-		vp = received;
-
-		/* map-- keep track of the attributes so that we know
-		   when to add the delimiters. Note that we can only
-		   handle attributes < 256, which is the standard anyway. */
-
-		while (vp)
-		{
-			strcpy(name, "RADIUS_");
-			if (rc_avpair_tostr(rh, vp, name+7, sizeof(name)-7, value, sizeof(value)) < 0) {
-				rc_avpair_free(send);
-				rc_avpair_free(received);
-				return NULL;
-			}
-
-			/* Translate "-" => "_" and uppercase*/
-			for(p = name; *p; p++) {
-				*p = toupper(*p);
-				if (*p == '-') *p = '_';
-			}
-
-			/* Add to the attribute count and append the var
-			   if necessary. */
-			if ((attr = vp->attribute) < 256)
-			{
-				int count;
-				if ((count = acount[attr]++) > 0) {
-					char buf[10];
-					snprintf(buf, sizeof(buf), "_%d", count);
-					strcat(name,buf);
-				}
-			}
-
-			if (rc_add_env(env, name, value) < 0)
-			{
-				rc_avpair_free(send);
-				rc_avpair_free(received);
-				return NULL;
-			}
-
-			vp = vp->next;
-		}
-
-		service_str = "(unknown)";
-		ftype_str = NULL;
-
-		if ((service_vp = rc_avpair_get(received, PW_SERVICE_TYPE, 0)) != NULL)
-				if ((dval = rc_dict_getval(rh, service_vp->lvalue, service_vp->name)) != NULL) {
-					service_str = dval->name;
-				}
-
-		if (service_vp && (service_vp->lvalue == PW_FRAMED) &&
-			((vp = rc_avpair_get(received, PW_FRAMED_PROTOCOL, 0)) != NULL))
-				if ((dval = rc_dict_getval(rh, vp->lvalue, vp->name)) != NULL) {
-					ftype_str = dval->name;
-				}
-
-		rc_log(LOG_NOTICE, "authentication OK, username %s, service %s%s%s",
-				username, service_str,(ftype_str)?"/":"", (ftype_str)?ftype_str:"");
-
-		if (*msg != '\0')
-			printf(SC_SERVER_REPLY, msg);
-		else
-			printf(SC_RADIUS_OK);
-
-		rc_avpair_free(send);
-		rc_avpair_free(received);
-
-		return radius_login;
-	}
-	else
-	{
-		rc_log(LOG_NOTICE, "authentication FAILED, type RADIUS, username %s",
-			   username_realm);
-		if (*msg != '\0')
-			printf(SC_SERVER_REPLY, msg);
-		else
-			printf(SC_RADIUS_FAILED);
-	}
-
-	rc_avpair_free(send);
-	if (received)
-		rc_avpair_free(received);
-
-	return NULL;
-}
-
-void
-radius_login(rc_handle *rh, char const *username)
-{
-	char *login_radius = rc_conf_str(rh, "login_radius");
-
-	execle(login_radius, login_radius, NULL, env->env);
-
-	rc_log(LOG_ERR, "couldn't execute %s: %s", login_radius, strerror(errno));
-	fprintf(stderr, "couldn't execute %s: %s", login_radius, strerror(errno));
-
-	sleep(1);	/* give the user time to read */
-	exit(ERROR_RC);
-}

+ 0 - 183
thirdparty/FreeRadius/src/radiusclient.c

@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 2004 Maxim Sobolev <sobomax@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: radiusclient.c,v 1.8 2010/02/04 10:30:26 aland Exp $
- */
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <freeradius-client.h>
-
-#define BUF_LEN 4096
-
-int process(void *, VALUE_PAIR *, int, int);
-
-static void
-usage(void)
-{
-
-    fprintf(stderr, "usage: radiusclient [-f config_file] [-p nas_port] [-s | [-a] a1=v1 [a2=v2[...[aN=vN]...]]]\n");
-    exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
-    int i, nas_port, ch, acct, server, ecount, firstline, theend;
-    void *rh;
-    size_t len;
-    VALUE_PAIR *send, **vp;
-    char *rc_conf, *cp;
-    char lbuf[4096];
-
-    rc_conf = RC_CONFIG_FILE;
-    nas_port = 5060;
-
-    acct = 0;
-    server = 0;
-    while ((ch = getopt(argc, argv, "af:p:s")) != -1) {
-        switch (ch) {
-        case 'f':
-            rc_conf = optarg;
-            break;
-
-        case 'p':
-            nas_port = atoi(optarg);
-            break;
-
-        case 'a':
-            acct = 1;
-            break;
-
-        case 's':
-            server = 1;
-            break;
-
-        default:
-            usage();
-        }
-    }
-    argc -= optind;
-    argv += optind;
-
-    if ((argc == 0 && server == 0) || (argc != 0 && server != 0))
-        usage();
-
-    if ((rh = rc_read_config(rc_conf)) == NULL) {
-        fprintf(stderr, "error opening radius configuration file\n");
-        exit(1);
-    }
-
-    if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary")) != 0) {
-        fprintf(stderr, "error reading radius dictionary\n");
-        exit(2);
-    }
-
-    if (server == 0) {
-        send = NULL;
-        vp = &send;
-        for (i = 0; i < argc; i++) {
-            if (rc_avpair_parse(rh, argv[i], vp) < 0) {
-                fprintf(stderr, "%s: can't parse AV pair\n", argv[i]);
-                exit(3);
-            }
-            vp = &send->next;
-        }
-        exit(process(rh, send, acct, nas_port));
-    }
-    while (1 == 1) {
-        send = NULL;
-        vp = &send;
-        ecount = 0;
-        firstline = 1;
-        acct = 0;
-        do {
-            len = 0;
-            cp = rc_fgetln(stdin, &len);
-            theend = 1;
-            if (cp != NULL && len > 0) {
-                if (firstline != 0) {
-                    if (len >= 4 && memcmp(cp, "ACCT", 4) == 0)
-                        acct = 1;
-                    firstline = 0;
-                    theend = 0;
-                    continue;
-                }
-                for (i = 0; i < len; i++) {
-                    if (!isspace(cp[i])) {
-                        theend = 0;
-                        break;
-                    }
-                }
-                if (theend == 0) {
-                    memcpy(lbuf, cp, len);
-                    lbuf[len] = '\0';
-                    if (rc_avpair_parse(rh, lbuf, vp) < 0) {
-                        fprintf(stderr, "%s: can't parse AV pair\n", lbuf);
-                        ecount++;
-                    } else {
-                        vp = &send->next;
-                    }
-                }
-            }
-        } while (theend == 0);
-        if (send != NULL && ecount == 0)
-            printf("%d\n\n", process(rh, send, acct, nas_port));
-        else
-            printf("%d\n\n", -1);
-        fflush(stdout);
-        if (send != NULL)
-            rc_avpair_free(send);
-		if (cp == NULL || len == 0)
-            break;
-    }
-    exit(0);
-}
-
-int
-process(void *rh, VALUE_PAIR *send, int acct, int nas_port)
-{
-    VALUE_PAIR *received;
-    char msg[PW_MAX_MSG_SIZE];
-    char buf[BUF_LEN];
-    int i;
-
-    received = NULL;
-    if (acct == 0) {
-        i = rc_auth(rh, nas_port, send, &received, msg);
-        if (received != NULL) {
-            printf("%s", rc_avpair_log(rh, received, buf, BUF_LEN));
-            rc_avpair_free(received);
-        }
-    } else {
-        i = rc_acct(rh, nas_port, send);
-    }
-
-    return (i == OK_RC) ? 0 : 1;
-}

+ 0 - 388
thirdparty/FreeRadius/src/radlogin.c

@@ -1,388 +0,0 @@
-/*
- * radlogin.c  RADIUS based /bin/login replacement
- *
- * Version:    $Id: radlogin.c,v 1.9 2008/01/09 07:04:18 sobomax Exp $
- *
- * Copyright (C) 1995,1996 Lars Fenneberg
- * Copyright (C) 2007 The FreeRADIUS Project
- *
- * See the file COPYRIGHT for the respective terms and conditions.
- *
- */
-
-static char	rcsid[] =
-		"$Id: radlogin.c,v 1.9 2008/01/09 07:04:18 sobomax Exp $";
-
-#include	<config.h>
-#include	<includes.h>
-#include	<freeradius-client.h>
-#include	<messages.h>
-#include	<pathnames.h>
-#include	<radlogin.h>
-
-ENV *env = NULL;
-static char *pname = NULL;
-static rc_handle *rh = NULL;
-
-static RETSIGTYPE
-alarm_handler(int sn)
-{
-	fprintf(stderr, SC_TIMEOUT, rc_conf_int(rh, "login_timeout"));
-	sleep(1);
-	exit(ERROR_RC);
-}
-
-static int
-login_allowed(char *tty)
-{
-	FILE *fp;
-	char fname[PATH_MAX];
-	int c;
-
-	strcpy(fname, rc_conf_str(rh, "nologin"));
-	if (access(fname, F_OK) < 0) {
-		if (tty) {
-			snprintf(fname, sizeof(fname), "%s.%s", rc_conf_str(rh, "nologin"), tty);
-			if (access(fname, F_OK) < 0)
-				return 1;
-		} else {
-			return 1;
-		}
-	}
-
-	if ((fp = fopen(fname, "r")) != NULL)
-	{
-		while ((c = fgetc(fp)) != EOF)
-		{
-			if (c == '\n')
-				fputc('\r', stdout);
-			fputc(c, stdout);
-		}
-		fflush(stdout);
-		fclose(fp);
-	} else {
-		printf(SC_NOLOGIN);
-	}
-	return 0;
-}
-
-static char *
-subst_placeholders(char *str, char *tty)
-{
-	char *p,*q;
-	static char buf[4096];
-#if defined(HAVE_UNAME)
-	struct utsname uts;
-#endif
-#if !defined(HAVE_STRUCT_UTSNAME_DOMAINNAME) && defined(HAVE_GETDOMAINNAME)
-	char domainname[256];
-#endif
-
-#if defined(HAVE_UNAME)
-	uname(&uts);
-#endif
-
-	p = str;
-	q = buf;
-
-	while (*p != '\0') {
-		switch (*p) {
-			case '\\':
-				if (*(p+1) == '\0')
-					break;
-				p++;
-				switch (*p) {
-					case 'I':
-						strcpy(q, rcsid);
-						q += strlen(rcsid);
-						break;
-					case 'L':
-					case 'P':
-						strcpy(q, tty);
-						q += strlen(tty);
-						break;
-#if defined(HAVE_UNAME)
-					case 'S':
-						strcpy(q, uts.sysname);
-						q += strlen(uts.sysname);
-						break;
-					case 'N':
-						strcpy(q, uts.nodename);
-						q += strlen(uts.nodename);
-						break;
-					case 'R':
-						strcpy(q, uts.release);
-						q += strlen(uts.release);
-						break;
-					case 'V':
-						strcpy(q, uts.version);
-						q += strlen(uts.version);
-						break;
-					case 'M':
-						strcpy(q, uts.machine);
-						q += strlen(uts.machine);
-						break;
-#endif
-					case 'D':
-#if defined(HAVE_STRUCT_UTSNAME_DOMAINNAME)
-						strcpy(q, uts.domainname);
-						q += strlen(uts.domainname);
-#elif defined(HAVE_GETDOMAINNAME)
-						getdomainname(domainname, sizeof(domainname));
-						strcpy(q, domainname);
-						q += strlen(domainname);
-#endif
-						break;
-					case '\\':
-						*q = '\\';
-						q++;
-						break;
-				}
-				break;
-#if defined(HAVE_UNAME)
-			case '@':
-				strcpy(q, uts.nodename);
-				q += strlen(uts.nodename);
-				break;
-#endif
-			case '\n':
-				strcpy(q,"\r\n");
-				q += 2;
-				break;
-			default:
-				*q = *p;
-				q++;
-				break;
-		}
-
-		p++;
-	}
-	*q = '\0';
-
-	return buf;
-}
-
-static void
-usage(void)
-{
-	fprintf(stderr,"Usage: %s [-Vhnd] [-f <config_file>] [-i <client_port>] [-m <login_tries>]\n\n", pname);
-	fprintf(stderr,"  -V		output version information\n");
-	fprintf(stderr,"  -h		output this text\n");
-	fprintf(stderr,"  -n		don't display issue file\n");
-	fprintf(stderr,"  -f		filename of alternate config file\n");
-	fprintf(stderr,"  -i		ttyname to send to the server\n");
-	fprintf(stderr,"  -m		maximum login tries (overrides value in config file)\n");
-        exit(ERROR_RC);
-}
-
-static void
-version(void)
-{
-	fprintf(stderr,"%s: %s\n", pname ,rcsid);
-	exit(ERROR_RC);
-}
-
-int
-main (int argc, char **argv)
-{
-	char		username[128];
-	char		passwd[AUTH_PASS_LEN + 1];
-	int 		tries, remaining, c;
-	uint32_t		client_port;
-	void 		(*login_func)(rc_handle *, char const *);
-	FILE		*fp;
-	char 		buf[4096];
-	char		tty[1024], *p;
-	int		noissue = 0;
-	int		maxtries = 0;
-	char		*ttyn  = NULL;
-	char            *path_radiusclient_conf = RC_CONFIG_FILE;
-
-        extern char *optarg;
-        extern int optind;
-
-	pname = (pname = strrchr(argv[0],'/'))?pname+1:argv[0];
-
-	rc_openlog(pname);
-
-	while ((c = getopt(argc,argv,"f:m:i:nhV")) > 0)
-	{
-		switch(c) {
-			case 'f':
-				path_radiusclient_conf = optarg;
-				break;
-			case 'i':
-				ttyn = optarg;
-				break;
-			case 'n':
-				noissue = 1;
-				break;
-			case 'm':
-				maxtries = atoi(optarg);
-				break;
-			case 'V':
-				version();
-				break;
-			case 'h':
-				usage();
-				break;
-			default:
-				exit(ERROR_RC);
-				break;
-		}
-	}
-
-	if ((rh = rc_read_config(path_radiusclient_conf)) == NULL)
-		exit(ERROR_RC);
-
-	if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary")) != 0)
-		exit (ERROR_RC);
-
-	if (rc_read_mapfile(rh, rc_conf_str(rh, "mapfile")) != 0)
-		exit (ERROR_RC);
-
-	if (ttyn != NULL)
-	{
-		client_port = rc_map2id(rh, ttyn);
-
-		if ((p = strrchr(ttyn, '/')) == NULL)
-			strncpy(tty, ttyn, sizeof(tty));
-		else
-			strncpy(tty, p+1, sizeof(tty));
-	}
-	else
-	{
-		ttyn = ttyname(0);
-		if (ttyn)
-		{
-			if ((p = strrchr(ttyn, '/')) == NULL)
-				strncpy(tty, ttyn, sizeof(tty));
-			else
-				strncpy(tty, p+1, sizeof(tty));
-
-			client_port = rc_map2id(rh, ttyn);
-		}
-		else
-		{
-			*tty = '\0';
-			client_port = 0;
-		}
-	}
-
-#ifdef SETVBUF_REVERSED
-	setvbuf(stdout, _IONBF, NULL, 0);
-#else
-	setvbuf(stdout, NULL, _IONBF, 0);
-#endif
-
-	if ((argc - optind) == 1)
-	{
-		strncpy(username,argv[optind], sizeof(username));
-	}
-	else
-	{
-		*username = '\0';
-
-		if (!noissue) {
-			if (rc_conf_str(rh, "issue") && ((fp = fopen(rc_conf_str(rh, "issue"), "r")) != NULL))
-			{
-				while (fgets(buf, sizeof(buf), fp) != NULL)
-					fputs(subst_placeholders(buf, tty), stdout);
-
-				fflush(stdout);
-				fclose(fp);
-			} else {
-				fputs(subst_placeholders(SC_DEFAULT_ISSUE, tty), stdout);
-				fflush(stdout);
-			}
-		}
-	}
-
-	if ((env = rc_new_env(ENV_SIZE)) == NULL)
-	{
-		rc_log(LOG_CRIT, "rc_new_env: FATAL: out of memory");
-		abort();
-	}
-
-#ifdef SECURITY_DISABLED
-	if (rc_import_env(env,environ) < 0)
-	{
-		rc_log(LOG_CRIT, "rc_import_env: FATAL: not enough space for environment (increase ENV_SIZE)");
-		abort();
-	}
-#else
-	rc_add_env(env, "IFS", " ");
-	rc_add_env(env, "PATH", RC_SECURE_PATH);
-#endif
-
-	signal(SIGALRM, alarm_handler);
-
-	remaining = rc_conf_int(rh, "login_timeout");
-
-	if (!maxtries)
-		maxtries = rc_conf_int(rh, "login_tries");
-
-	tries = 1;
-	while (tries <= maxtries)
-	{
-	 alarm(remaining);
-
-	 while (!*username) {
-	 	p = rc_getstr (rh, SC_LOGIN, 1);
-	 	if (p)
-	 		strncpy(username, p, sizeof(username));
-	 	else
-	 		exit (ERROR_RC);
-	 }
-	 p = rc_getstr(rh, SC_PASSWORD,0);
-	 if (p)
-	 	strncpy (passwd, p, sizeof (passwd));
-	 else
-		exit (ERROR_RC);
-
-	 remaining = alarm(0);
-
-	 login_func = NULL;
-
- 	 if (rc_conf_int(rh, "auth_order") & AUTH_LOCAL_FST)
- 	 {
- 	 	login_func = auth_local(username, passwd);
-
- 	 	if (!login_func)
- 	 		if (rc_conf_int(rh, "auth_order") & AUTH_RADIUS_SND)
- 	 			login_func = auth_radius(rh, client_port, username, passwd);
- 	 }
- 	 else
- 	 {
-		login_func = auth_radius(rh, client_port, username, passwd);
- 	 	if (!login_func)
- 	 		if (rc_conf_int(rh, "auth_order") & AUTH_LOCAL_SND)
- 	 			login_func = auth_local(username, passwd);
- 	 }
-
-	 memset(passwd, '\0', sizeof(passwd));
-
-	 if (login_func != NULL) {
-	 	if (login_allowed(tty)) {
-	 		(*login_func)(rh, username);
-		} else {
-			sleep(1);
-			exit (ERROR_RC);
-		}
-	}
-
-	 *username = '\0';
-
-	 if ((++tries) <= maxtries) {
-		alarm(remaining);
-	 	sleep(tries * 2);
-	 	remaining = alarm(0);
-	 }
-
-	}
-
-	fprintf(stderr, SC_EXCEEDED);
-	sleep(1);
-
-	exit (ERROR_RC);
-}

+ 0 - 25
thirdparty/FreeRadius/src/radlogin.h

@@ -1,25 +0,0 @@
-/*
- * $Id: radlogin.h,v 1.4 2007/07/11 17:29:31 cparker 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.
- *
- */
-
-#ifndef RADLOGIN_H
-#define RADLOGIN_H
-
-typedef void (*LFUNC)(rc_handle *, char const *);
-
-/* radius.c */
-LFUNC auth_radius(rc_handle *, uint32_t, char const *, char const *);
-void radius_login(rc_handle *, char const *);
-
-/* local.c */
-LFUNC auth_local(char const *, char const *);
-void local_login(rc_handle *, char const *);
-
-#endif /* RADLOGIN_H */

+ 0 - 130
thirdparty/FreeRadius/src/radstatus.c

@@ -1,130 +0,0 @@
-/*
- * $Id: radstatus.c,v 1.8 2007/04/13 14:20:44 pnixon Exp $
- *
- * Copyright (C) 1995,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.
- *
- */
-
-/* FIX ME FIX ME FIX ME
- * This is broken, now that send_server requires the secret to be passed
- * It will need to be collected as an additional argument on command line
- */
-
-#define FIX_ME_SECRET "fixme"
-
-static char	rcsid[] =
-		"$Id: radstatus.c,v 1.8 2007/04/13 14:20:44 pnixon Exp $";
-
-#include <config.h>
-#include <includes.h>
-#include <freeradius-client.h>
-#include <pathnames.h>
-#include <messages.h>
-
-static char *pname;
-
-
-void usage(void)
-{
-	fprintf(stderr,"Usage: %s [-Vh] [-f <config_file>] [server[:port[:secret]] ...\n\n", pname);
-	fprintf(stderr,"  -V            output version information\n");
-	fprintf(stderr,"  -h            output this text\n");
-	fprintf(stderr,"  -f		filename of alternate config file\n");
-	exit(ERROR_RC);
-}
-
-void version(void)
-{
-	fprintf(stderr,"%s: %s\n", pname ,rcsid);
-	exit(ERROR_RC);
-}
-
-int main (int argc, char **argv)
-{
-	int	result = ERROR_RC;
-   	int	c,i;
-	char	*p, msg[PW_MAX_MSG_SIZE];
-	SERVER	*srv;
-	char	*path_radiusclient_conf = RC_CONFIG_FILE;
-	rc_handle *rh;
-
-	extern int optind;
-
-	pname = (pname = strrchr(argv[0],'/'))?pname+1:argv[0];
-
-	rc_openlog(pname);
-
-	while ((c = getopt(argc,argv,"hVf:")) > 0)
-	{
-		switch(c) {
-			case 'f':
-				path_radiusclient_conf = optarg;
-				break;
-			case 'V':
-				version();
-				break;
-			case 'h':
-				usage();
-				break;
-			default:
-				exit(ERROR_RC);
-				break;
-		}
-	}
-
-	argc -= optind;
-	argv += optind;
-
-	if ((rh = rc_read_config(path_radiusclient_conf)) == NULL)
-		exit(ERROR_RC);
-
-	if (rc_read_dictionary(rh, rc_conf_str(rh, "dictionary")) != 0)
-		exit (ERROR_RC);
-
-	if (argc > 0) {
-		for (i = 0; i < argc; i++) {
-			if ((p = strchr(argv[i], ':')) == NULL) {
-				result = rc_check(rh, argv[i],FIX_ME_SECRET,rc_getport(AUTH), msg);
-			} else if (!strcmp(p+1, "auth")) {
-				*p = '\0';
-				result = rc_check(rh, argv[i],FIX_ME_SECRET,rc_getport(AUTH), msg);
-			} else if (!strcmp(p+1, "acct")) {
-				*p = '\0';
-				result = rc_check(rh, argv[i],FIX_ME_SECRET,rc_getport(ACCT), msg);
-			} else {
-				*p = '\0';
-				result = rc_check(rh, argv[i],FIX_ME_SECRET,atoi(p+1), msg);
-			}
-			if (result == OK_RC)
-				fputs(msg, stdout);
-			else
-				printf(SC_STATUS_FAILED);
-		}
-	} else {
-		srv = rc_conf_srv(rh, "authserver");
-		for(i=0; i<srv->max ; i++)
-		{
-			result = rc_check(rh, srv->name[i], srv->secret[i], srv->port[i], msg);
-			if (result == OK_RC)
-				fputs(msg, stdout);
-			else
-				printf(SC_STATUS_FAILED);
-		}
-
-		srv = rc_conf_srv(rh, "acctserver");
-		for(i=0; i<srv->max ; i++)
-		{
-			result = rc_check(rh, srv->name[i], srv->secret[i], srv->port[i], msg);
-			if (result == OK_RC)
-				fputs(msg, stdout);
-			else
-				printf(SC_STATUS_FAILED);
-		}
-	}
-
-	return 0;
-}

+ 1 - 1
user/init_task.c

@@ -195,7 +195,7 @@ void InitTask(void *params)
  
   SETTINGS_ResetBootTry();
 
-  RC_Login("test1","12345");
+ // RC_Login("test1", "12345");
   
   // Отправка трапа о перезагрузке в случае статического IP
  /* if (!dhcp)

+ 2 - 2
user/main.h

@@ -58,9 +58,9 @@
 #define __packed		__attribute__(( packed ))
 #endif
    
-//#define DEBUG
+//#define OUR_DEBUG
 
-#ifdef DEBUG
+#ifdef OUR_DEBUG
 #define DBG
 #else
 #define DBG if (0)