r24644 - in /scripts/KGB: client/KGB_sendcommit debian/changelog server/KGB server/kgb.conf.sample

tincho at users.alioth.debian.org tincho at users.alioth.debian.org
Wed Aug 27 08:08:31 UTC 2008


Author: tincho
Date: Wed Aug 27 08:08:29 2008
New Revision: 24644

URL: http://svn.debian.org/wsvn/?sc=1&rev=24644
Log:
  Protocol versions: use a hardcoded hash of the *really* supported
  versions, and then a configuration option to filter them out.

Modified:
    scripts/KGB/client/KGB_sendcommit
    scripts/KGB/debian/changelog
    scripts/KGB/server/KGB
    scripts/KGB/server/kgb.conf.sample

Modified: scripts/KGB/client/KGB_sendcommit
URL: http://svn.debian.org/wsvn/scripts/KGB/client/KGB_sendcommit?rev=24644&op=diff
==============================================================================
--- scripts/KGB/client/KGB_sendcommit (original)
+++ scripts/KGB/client/KGB_sendcommit Wed Aug 27 08:08:29 2008
@@ -31,7 +31,7 @@
 #my $uri = "http://asterix.decidir.net:9999/";
 #my $proxy = "http://asterix.decidir.net:9999/?session=KGB";
 
-my($uri, $proxy, $repoid, $password $path, $rev) = @ARGV;
+my($uri, $proxy, $repoid, $password, $path, $rev) = @ARGV;
 die "$0 URI proxy repoid password path [revision]\n" unless($repoid and $path);
 
 my $repo = SVN::Repos::open($path);

Modified: scripts/KGB/debian/changelog
URL: http://svn.debian.org/wsvn/scripts/KGB/debian/changelog?rev=24644&op=diff
==============================================================================
--- scripts/KGB/debian/changelog (original)
+++ scripts/KGB/debian/changelog Wed Aug 27 08:08:29 2008
@@ -10,8 +10,8 @@
     restart the server (with complete close and disconnect).
   * server/KGB: support for reloading the configuration file with SIGHUP.
   * server/KGB: fixed an error in the password verification (protocol 1).
-    Tried to make more sense of the protocol versions, by not making it
-    configurable but a hardcoded hash of the *really* supported versions.
+    Protocol versions: use a hardcoded hash of the *really* supported
+    versions, and then a configuration option to filter them out.
   * server/KGB, Makefile: match the /etc directory name with the package name.
   * client/*: remove hardcodings.
 

Modified: scripts/KGB/server/KGB
URL: http://svn.debian.org/wsvn/scripts/KGB/server/KGB?rev=24644&op=diff
==============================================================================
--- scripts/KGB/server/KGB (original)
+++ scripts/KGB/server/KGB Wed Aug 27 08:08:29 2008
@@ -80,7 +80,13 @@
     $conf->{soap}{service_name} ||= "KGB";
     $conf->{soap}{server_port}  ||= 9999;
     $conf->{soap}{server_addr}  ||= "127.0.0.1";
-
+    $conf->{min_protocol_ver}   ||= 1;
+ 
+    unless($KGB::supported_protos{$conf->{min_protocol_ver}}) {
+        die("Unrecognised min_protocol_ver (", $conf->{min_protocol_ver},
+            "). I only know about protocols ",
+            join(", ", keys %KGB::supported_protos), ".\n");
+    }
     foreach(keys %{$conf->{networks}}) {
         $conf->{networks}{$_}{nick}     ||= "KGB";
         $conf->{networks}{$_}{ircname}  ||= "KGB bot";

Modified: scripts/KGB/server/kgb.conf.sample
URL: http://svn.debian.org/wsvn/scripts/KGB/server/kgb.conf.sample?rev=24644&op=diff
==============================================================================
--- scripts/KGB/server/kgb.conf.sample (original)
+++ scripts/KGB/server/kgb.conf.sample Wed Aug 27 08:08:29 2008
@@ -24,3 +24,5 @@
     repos:
       - foo
 pid_dir: /var/run/kgb-bot
+# anything less is rejected
+min_protocol_ver: 1




More information about the Pkg-perl-cvs-commits mailing list