]> lifelog.hopto.org Git - LifeLog.git/commitdiff
dbi:PG string for expected user defaults.
authorWill Budicm <redacted>
Sat, 5 Dec 2020 00:46:33 +0000 (11:46 +1100)
committerWill Budicm <redacted>
Sat, 5 Dec 2020 00:46:33 +0000 (11:46 +1100)
htdocs/cgi-bin/login_ctr.cgi

index a699bcd3129c455f38ec5abb09a4e8708a6cf99d..5165ff775c3eccb4330e436283247f3b2fd0104a 100755 (executable)
@@ -174,7 +174,10 @@ sub checkPreparePGDB {
             if($n eq $alias){ $create = 0; last;}
     }
     if($create){
-        my $db = DBI->connect("dbi:Pg:dbname=postgres");#Default expected to exist db is postgres, holding roles.
+        # TODO Default expected to exist db is postgres, username and password. This cgi connects locally.
+        # Modify this to take any other situations or create main.cnf anon properties for all this. 
+        # To the user with roes and database creation powers.
+        my $db = DBI->connect('dbi:Pg:dbname=postgres;host=localhost','postgres', 'postgres');
         Settings::debug(1);
         $db->do(qq(
             CREATE ROLE $alias WITH