- Make autothrottle.so understand cisco lcp:interface-config - Yuri
- Show filter stats in show session - Yuri
- Cleanup from Michael to change sid to unique_id
+- Add plugin to remove domain name from auth requests
* Tue Jul 13 2004 Brendan O'Dea <bod@optusnet.com.au> 2.0.1
- Update INSTALL, Docs/manual.html documentation.
tbf.o \
bgp.o \
-PLUGINS=garden.so autothrottle.so autosnoop.so
+PLUGINS=garden.so autothrottle.so autosnoop.so stripdomain.so
+TARGETS=l2tpns nsctl generateload bounce $(PLUGINS)
-all: l2tpns nsctl generateload bounce $(PLUGINS)
+all: $(TARGETS)
clean:
- /bin/rm -f *.o *.so l2tpns nsctl
+ /bin/rm -f *.o *.so $(TARGETS)
depend:
(sed -n 'p; /^## Dependencies: (autogenerated) ##/q' Makefile && \
--- /dev/null
+#include <string.h>
+#include "l2tpns.h"
+#include "plugin.h"
+
+char const *cvs_id = "$Id: stripdomain.c,v 1.1 2004/09/02 04:29:30 fred_nerk Exp $";
+
+int __plugin_api_version = 1;
+static struct pluginfuncs *p = 0;
+
+int plugin_pre_auth(struct param_pre_auth *data)
+{
+ char *x;
+
+ if (!data->continue_auth) return PLUGIN_RET_STOP;
+
+ // Strip off @domain
+ if ((x = strchr(data->username, '@')))
+ {
+ p->log(3, 0, 0, 0, "Stripping off trailing domain name \"%s\"\n", x);
+ *x = 0;
+ }
+
+ return PLUGIN_RET_OK;
+}
+
+int plugin_init(struct pluginfuncs *funcs)
+{
+ return ((p = funcs)) ? 1 : 0;
+}