Author: tille
Date: 2008-09-19 13:01:48 +0000 (Fri, 19 Sep 2008)
New Revision: 2514

Modified:
   trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch
Log:
Sama ident authentication code for agcurate as in agdbnet


Modified: 
trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch   
2008-09-19 12:54:31 UTC (rev 2513)
+++ trunk/packages/agdbnet/trunk/debian/patches/13_ident_authentication.patch   
2008-09-19 13:01:48 UTC (rev 2514)
@@ -21,3 +21,28 @@
  }
  
  sub dbdisconnect {
+--- agdbnet_v1.0.0.orig/cgi-bin/agcurate.pl
++++ agdbnet_v1.0.0/cgi-bin/agcurate.pl
+@@ -107,10 +107,19 @@
+ }
+ 
+ sub dbconnect {
+-      $db = DBI->connect(
++        # On Debian GNU/Linux we use ident authentication if host=localhost 
which
++        # needs and empty string for user and password ...
++        if ( $system{'host'} =~ /^localhost$/ ) {
++                $db = DBI->connect(
++"DBI:Pg:dbname=$system{'longcode'}",
++                '', '', { AutoCommit => 0 }
++        );
++        } else {
++                $db = DBI->connect(
+ "DBI:Pg:host=$system{'host'};port=$system{'port'};dbname=$system{'longcode'}",
+-              "$system{'user'}", "$system{'pass'}", { AutoCommit => 0 }
+-      );
++                "$system{'user'}", "$system{'pass'}", { AutoCommit => 0 }
++        );
++        }
+ }
+ 
+ sub dbdisconnect {


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-med-commit

Reply via email to