Title: Cygwin 2.427 patches for Freeradius 0.9.3

Many thanks to Phil Blow for the doc/CYGWIN instructions...here's an update to the patches for compiling the 0.9.3 release under Cygwin v2.427.  I have no idea where else to submit them, and apologize if this was incorrect. I will not respond to queries for support and make no warranties about the code below (other than it compiles for me :)

Doug.
------------------------------------------------

In the same directory:
-Untar the distribution tarball
-Save the patch file as patch.txt
#cd freeradius-0.9.3
#patch -p1 ../patch.txt
patching file Make.inc.in
patching file src/main/Makefile.in
patching file src/modules/rlm_dbm/Makefile.in
patching file src/modules/rlm_ippool/Makefile.in
patching file src/modules/rlm_ippool/rlm_ippool_tool.c
patching file src/modules/rlm_mschap/Makefile
#./configure -without-snmp -disable-shared -enable-static ; make ; make install ; /usr/local/sbin/check-radiusd-config

Save contents betweeen <start> and <end> as patch.txt:
<start>
diff -urN freeradius-0.9.3.orig/Make.inc.in cyg2.427_FR093/Make.inc.in
--- freeradius-0.9.3.orig/Make.inc.in   2003-01-27 13:21:28.000000000 -0500
+++ cyg2.427_FR093/Make.inc.in  2004-06-01 03:59:19.718750000 -0400
@@ -54,7 +54,7 @@
 
 USE_SHARED_LIBS        = @USE_SHARED_LIBS@
 USE_STATIC_LIBS = @USE_STATIC_LIBS@
-STATIC_MODULES = @STATIC_MODULES@
+STATIC_MODULES = @STATIC_MODULES@ -dlpreopen ../modules/rlm_eap/types/rlm_eap_md5/rlm_eap_md5.la -dlpreopen ../modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.la -dlpreopen ../modules/rlm_eap/types/rlm_eap_leap/rlm_eap_leap.la

 
 SNMP_INCLUDE   = @SNMP_INCLUDE@
 SNMP_LIBS      = @SNMP_LIBS@
diff -urN freeradius-0.9.3.orig/src/main/Makefile.in cyg2.427_FR093/src/main/Makefile.in
--- freeradius-0.9.3.orig/src/main/Makefile.in  2003-05-01 14:57:23.000000000 -0400
+++ cyg2.427_FR093/src/main/Makefile.in 2004-06-01 04:29:08.421875000 -0400
@@ -12,7 +12,7 @@
 
 CFLAGS         += -I../include $(SNMP_INCLUDE)
 LDFLAGS                += -L../lib
-LIBS           += -lradius $(SNMP_LIBS)
+LIBS           += -lradius -lcrypt $(SNMP_LIBS)
 MODULE_LIBS    = $(STATIC_MODULES)
 MODULE_OBJS    =
 VFLAGS         = -DRADIUSD_MAJOR_VERSION=$(RADIUSD_MAJOR_VERSION)
@@ -130,12 +130,12 @@
        rm -rf *.o *.so *~ $(BINARIES) .libs
 
 install:
-       $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) radiusd     $(R)$(sbindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) radwho                $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) radzap                $(R)$(bindir)
+       $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(INSTALLSTRIP) radiusd.exe $(R)$(sbindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) radwho.exe            $(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) radzap.exe            $(R)$(bindir)
        $(INSTALL) -m 755    radlast            $(R)$(bindir)
-       $(INSTALL) -m 755    radclient          $(R)$(bindir)
-       $(INSTALL) -m 755    radrelay           $(R)$(bindir)
+       $(INSTALL) -m 755    radclient.exe              $(R)$(bindir)
+       $(INSTALL) -m 755    radrelay.exe               $(R)$(bindir)
        $(INSTALL) -m 755    radtest            $(R)$(bindir)
        $(INSTALL) -d -m 755                    $(R)$(logdir)
        $(INSTALL) -d -m 755                    $(R)$(radacctdir)
diff -urN freeradius-0.9.3.orig/src/modules/rlm_dbm/Makefile.in cyg2.427_FR093/src/modules/rlm_dbm/Makefile.in
--- freeradius-0.9.3.orig/src/modules/rlm_dbm/Makefile.in       2001-10-26 12:59:38.000000000 -0400
+++ cyg2.427_FR093/src/modules/rlm_dbm/Makefile.in      2004-06-01 00:18:00.437500000 -0400
@@ -19,5 +19,5 @@
 #
 rlm_dbm_install:
        $(INSTALL) -d -m 755                            $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_parser $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_cat    $(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_parser.exe $(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_dbm_cat.exe    $(R)$(bindir)
diff -urN freeradius-0.9.3.orig/src/modules/rlm_ippool/Makefile.in cyg2.427_FR093/src/modules/rlm_ippool/Makefile.in
--- freeradius-0.9.3.orig/src/modules/rlm_ippool/Makefile.in    2003-10-17 11:08:03.000000000 -0400
+++ cyg2.427_FR093/src/modules/rlm_ippool/Makefile.in   2004-06-01 03:57:30.250000000 -0400
@@ -3,7 +3,7 @@
 HEADERS     =
 RLM_UTILS      = @ippool_utils@
 RLM_CFLAGS  = @ippool_cflags@
-RLM_LIBS    = @ippool_ldflags@
+RLM_LIBS    = @ippool_ldflags@ -lcrypt
 RLM_INSTALL = @ippool_install@
 
 include ../rules.mak
@@ -21,7 +21,7 @@
 # Install binary files into the bin directory
 rlm_ippool_install: rlm_ippool_tool.8
        $(INSTALL) -m 755 -d                                                            $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_ippool_tool       $(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) rlm_ippool_tool.exe   $(R)$(bindir)
        $(INSTALL) -m 755 -d                                                            $(R)$(mandir)/man8
        $(INSTALL) -m 644 rlm_ippool_tool.8                                     $(R)$(mandir)/man8
 
diff -urN freeradius-0.9.3.orig/src/modules/rlm_ippool/rlm_ippool_tool.c cyg2.427_FR093/src/modules/rlm_ippool/rlm_ippool_tool.c

--- freeradius-0.9.3.orig/src/modules/rlm_ippool/rlm_ippool_tool.c      2003-10-08 21:05:17.000000000 -0400
+++ cyg2.427_FR093/src/modules/rlm_ippool/rlm_ippool_tool.c     2004-06-01 04:50:09.109375000 -0400
@@ -112,7 +112,7 @@
     sessiondb=gdbm_open(sessiondbname,512,mode,0,NULL);
     indexdb=gdbm_open(indexdbname,512,mode,0,NULL);
 
-       if (inet_pton(AF_INET, ipaddress, &ipaddr) == 0)
+       if (inet_aton( (ipaddress), (struct in_addr *)(&ipaddr) ) == 0)
        {
                printf("rlm_ippool_tool: Unable to convert IP address '%s'\n", ipaddress);
                return;
diff -urN freeradius-0.9.3.orig/src/modules/rlm_mschap/Makefile cyg2.427_FR093/src/modules/rlm_mschap/Makefile
--- freeradius-0.9.3.orig/src/modules/rlm_mschap/Makefile       2003-03-26 17:58:09.000000000 -0500
+++ cyg2.427_FR093/src/modules/rlm_mschap/Makefile      2004-05-31 04:36:23.062500000 -0400
@@ -17,4 +17,4 @@
 
 smbencrypt-install:
        $(INSTALL) -d -m 755 $(R)$(bindir)
-       $(INSTALL) -m 755 $(INSTALLSTRIP) smbencrypt $(R)$(bindir)
+       $(INSTALL) -m 755 $(INSTALLSTRIP) smbencrypt.exe $(R)$(bindir)
<end>

Reply via email to