1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
diff -Nru freeradius-server-2.1.6.orig/configure.in freeradius-server-2.1.6/configure.in
--- freeradius-server-2.1.6.orig/configure.in 2009-05-18 13:13:55.000000000 +0200
+++ freeradius-server-2.1.6/configure.in 2009-08-23 10:48:53.000000000 +0200
@@ -544,7 +544,19 @@
],
[ AC_MSG_WARN([pcap library not found, silently disabling the RADIUS sniffer.]) ])
-AC_LIB_READLINE
+AC_CHECK_LIB(readline, readline,
+ [ LIBREADLINE="-lreadline"
+ AC_DEFINE(HAVE_LIBREADLINE, 1,
+ [Define to 1 if you have a readline compatible library.])
+ AC_DEFINE(HAVE_READLINE_READLINE_H, 1,
+ [Define to 1 if you have the <readline/readline.h> header file.])
+ AC_DEFINE(HAVE_READLINE_HISTORY, 1,
+ [Define if your readline library has \`add_history'])
+ AC_DEFINE(HAVE_READLINE_HISTORY_H, 1,
+ [Define to 1 if you have the <readline/history.h> header file.])
+ ],
+ [ LIBREADLINE="" ])
+AC_SUBST(LIBREADLINE)
dnl #############################################################
dnl #
diff -Nru freeradius-server-2.1.6.orig/src/lib/Makefile freeradius-server-2.1.6/src/lib/Makefile
--- freeradius-server-2.1.6.orig/src/lib/Makefile 2009-08-23 10:46:57.000000000 +0200
+++ freeradius-server-2.1.6/src/lib/Makefile 2009-08-23 10:48:53.000000000 +0200
@@ -41,7 +41,7 @@
$(TARGET).la: $(LT_OBJS)
$(LIBTOOL) --mode=link $(CC) -release $(RADIUSD_VERSION) \
- $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^
+ $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ $(LIBS)
$(LT_OBJS): $(INCLUDES)
diff -Nru freeradius-server-2.1.6.orig/src/main/listen.c freeradius-server-2.1.6/src/main/listen.c
--- freeradius-server-2.1.6.orig/src/main/listen.c 2009-05-18 13:13:55.000000000 +0200
+++ freeradius-server-2.1.6/src/main/listen.c 2009-08-23 10:48:53.000000000 +0200
@@ -45,6 +45,9 @@
#include <fcntl.h>
#endif
+#ifdef WITH_UDPFROMTO
+#include <freeradius-devel/udpfromto.h>
+#endif
/*
* We'll use this below.
diff -Nru freeradius-server-2.1.6.orig/src/include/radiusd.h freeradius-server-2.1.6/src/include/radiusd.h
--- freeradius-server-2.1.6.orig/src/include/radiusd.h 2009-05-18 13:13:55.000000000 +0200
+++ freeradius-server-2.1.6/src/include/radiusd.h 2009-08-23 11:34:17.000000000 +0200
@@ -637,6 +637,7 @@
void event_new_fd(rad_listen_t *listener);
/* evaluate.c */
+int radius_get_vp(REQUEST *request, const char *name, VALUE_PAIR **vp_p);
int radius_evaluate_condition(REQUEST *request, int modreturn, int depth,
const char **ptr, int evaluate_it, int *presult);
int radius_update_attrlist(REQUEST *request, CONF_SECTION *cs,
diff -Nru freeradius-server-2.1.6.orig/src/modules/rlm_passwd/rlm_passwd.c freeradius-server-2.1.6/src/modules/rlm_passwd/rlm_passwd.c
--- freeradius-server-2.1.6.orig/src/modules/rlm_passwd/rlm_passwd.c 2009-05-18 13:13:55.000000000 +0200
+++ freeradius-server-2.1.6/src/modules/rlm_passwd/rlm_passwd.c 2009-08-23 11:29:38.000000000 +0200
@@ -247,8 +247,7 @@
static struct mypasswd * get_next(char *name, struct hashtable *ht)
{
-#define passwd ((struct mypasswd *) ht->buffer)
- struct mypasswd * hashentry;
+ struct mypasswd * hashentry, * passwd;
char buffer[1024];
int len;
char *list, *nextlist;
@@ -267,6 +266,7 @@
}
/* printf("try to find in file\n"); */
if (!ht->fp) return NULL;
+ passwd = (struct mypasswd *) ht->buffer;
while (fgets(buffer, 1024,ht->fp)) {
if(*buffer && *buffer!='\n' && (len = string_to_entry(buffer, ht->nfields, ht->delimiter, passwd, sizeof(ht->buffer)-1)) &&
(!ht->ignorenis || (*buffer !='-' && *buffer != '+') ) ){
@@ -288,7 +288,6 @@
fclose(ht->fp);
ht->fp = NULL;
return NULL;
-#undef passwd
}
static struct mypasswd * get_pw_nam(char * name, struct hashtable* ht)
|