--- /home/joe/xdb_auth_cpile.pl 2002-10-16 08:08:45.000000000 -0400 +++ /etc/jabber/xdb_auth_cpile.pl 2006-08-12 15:25:08.000000000 -0400 @@ -61,7 +61,7 @@ #### use strict; -use lib qw(/usr/local/jabber/xdb_auth_cpile); +use lib qw(/etc/jabber/); # There is a memory leak in Jabber::Connection 0.03 use Jabber::Connection 0.04; use Jabber::NodeFactory; @@ -78,7 +78,7 @@ # Set up vars my $file = $ARGV[0]; -my $configdir = "."; +my $configdir = "/etc/jabber/"; my $config; #### @@ -132,14 +132,18 @@ sub xdb { my $node = shift; + debug("[xdb]"); return unless($node->attr('ns') eq NS_AUTH); debug("--> auth request"); my $user = getUserID($node->attr('to')); $node = toFrom($node); + $user = $node->attr('from'); + $user =~ s/jabber\.//g; $node->attr('from', $config->{connection}->{id}); + # For 'get's, we return an empty namespace, flagging that they exist but a check action must be used if($node->attr('type') eq "get") { @@ -157,7 +161,7 @@ { debug(" --> set/check"); my $pass = $node->getTag('password')->data; - + debug(" checking authentication for user: ".$user); # This is the bit you change when extending the authentication