koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/installer install.pl [rel_3_0]


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha/installer install.pl [rel_3_0]
Date: Fri, 16 Feb 2007 13:14:09 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Henri-Damien LAURENT <hdl>      07/02/16 13:14:09

Modified files:
        installer      : install.pl 

Log message:
        Adding grants check for user at Any host if user at host doesnot have 
right access.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/installer/install.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.4&r2=1.1.2.5

Patches:
Index: install.pl
===================================================================
RCS file: /cvsroot/koha/koha/installer/Attic/install.pl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -b -r1.1.2.4 -r1.1.2.5
--- install.pl  16 Feb 2007 10:34:23 -0000      1.1.2.4
+++ install.pl  16 Feb 2007 13:14:08 -0000      1.1.2.5
@@ -186,6 +186,17 @@
             
((index($line,'SELECT')>0)&&(index($line,'INSERT')>0)&&(index($line,'UPDATE')>0)&&(index($line,'DELETE')>0)&&(index($line,'CREATE')>0)&&(index($line,'DROP')>0)));
           }
         }
+        unless ($grantaccess){
+          $rq=$dbh->prepare("SHOW GRANTS FOR \'$info{user}\'\@'\%'");
+          $rq->execute;
+          while (my ($line)=$rq->fetchrow){
+            my $dbname=$info{dbname};
+            if ($line=~m/$dbname/ || index($line,'*.*')>0){
+              $grantaccess=1 if (index($line,'ALL PRIVILEGES')>0 ||
+              
((index($line,'SELECT')>0)&&(index($line,'INSERT')>0)&&(index($line,'UPDATE')>0)&&(index($line,'DELETE')>0)&&(index($line,'CREATE')>0)&&(index($line,'DROP')>0)));
+            }
+          }
+        }
         $template->param("checkgrantaccess"=>$grantaccess);
       }
     } else {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]