+Ver 1.78:
+* Add a snmp_clearsession which can disconnect a user by using the Cisco AAA Session MIB
+* Add a configuration directive general_sessionclear_bin
+* Add a session disconnect button in the 'clear open sessions' page
+* Also clear sessions from the sql extra servers in the 'clear open sessions' page
Ver 1.75:
* A LOT of security related fixes. Now dialupadmin should hopefully be secure enough to
be accessed by normal users (not administrators).
--- /dev/null
+#!/usr/bin/perl
+
+$SNMPGET="/usr/local/bin/snmpget";
+$SNMPSET="/usr/local/bin/snmpset";
+$host=shift;
+$comm=shift || 'public';
+$sessionid=shift;
+$username=shift;
+
+die "Could not find snmpwalk binary. Please make sure that the \$SNMPGET variable points to the right location\n" if (! -x $SNMPGET);
+die "Could not find snmpset binary. Please make sure that the \$SNMPSET variable points to the right location\n" if (! -x $SNMPSET);
+die "Usage: snmp_clearsession \$host \$community \$sessionid \$username\n" if ($username eq '');
+
+if ($sessionid ne '' && $username ne ''){
+ $walk =`$SNMPGET -v2c -c $comm $host .iso.org.dod.internet.private.enterprises.9.9.150.1.1.3.1.2.$sessionid`;
+ unless ($walk =~ /^$/){
+ if ($walk =~ /$username/){
+ print "FOUND: $username\n";
+ `$SNMPSET -v2c -c $comm $host .iso.org.dod.internet.private.enterprises.9.9.150.1.1.3.1.5.$sessionid i 1`;
+ }
+ }
+}
#
general_nas_type: cisco
general_snmpfinger_bin: %{general_base_dir}/bin/snmpfinger
+#
+# Used by the 'Disconnect User' button in the Clear Open Sessions page
+# Uses the Cisco AAA Session MIB
+#
+general_sessionclear_bin: %{general_base_dir}/bin/snmp_clearsession
general_radclient_bin: %{general_radiusd_base_dir}/bin/radclient
#
# this information is used from the server check page