void version(void);
/* log.c */
-int radlogdir_iswritable(const char *);
+int radlogdir_iswritable(const char *);
int vradlog(int, const char *, va_list ap);
int radlog(int, const char *, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
+void vp_listdebug(VALUE_PAIR *vp);
/* proxy.c */
int proxy_receive(REQUEST *request);
return r;
}
+
+
+/*
+ * Dump a whole list of attributes to DEBUG2
+ */
+void vp_listdebug(VALUE_PAIR *vp)
+{
+ char tmpPair[70];
+ for (; vp; vp = vp->next) {
+ vp_prints(tmpPair, sizeof(tmpPair), vp);
+ DEBUG2(" %s", tmpPair);
+ }
+}
+
+
+
+
pairdelete(&request->packet->vps, PW_SQL_USER_NAME);
return RLM_MODULE_NOTFOUND;
}
-#if 0 /* FIXME: Debug being printed elsewhere? */
+
/*
* Uncomment these lines for debugging
* Recompile, and run 'radiusd -X'
- *
- DEBUG2("rlm_sql: check items");
- vp_printlist(stderr, check_tmp);
- DEBUG2("rlm_sql: reply items");
- vp_printlist(stderr, reply_tmp);
*/
-#endif
-#if 0 /* FIXME: this is the *real* authorizing */
- vp_printlist(stderr, check_tmp);
-#endif
+ /*
+ DEBUG2("rlm_sql: check items");
+ vp_listdebug(check_tmp);
+ DEBUG2("rlm_sql: reply items");
+ vp_listdebug(reply_tmp);
+ */
+
if (paircmp(request, request->packet->vps, check_tmp, &reply_tmp) != 0) {
radlog(L_INFO, "rlm_sql: Pairs do not match [%s]", sqlusername);
/* Remove the username we (maybe) added above */