From: Will Budicm Date: Sat, 5 Dec 2020 00:46:33 +0000 (+1100) Subject: dbi:PG string for expected user defaults. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=d019b9a473f27eba1417829ca1d4b6e78b8f6550;p=LifeLog.git dbi:PG string for expected user defaults. --- diff --git a/htdocs/cgi-bin/login_ctr.cgi b/htdocs/cgi-bin/login_ctr.cgi index a699bcd..5165ff7 100755 --- a/htdocs/cgi-bin/login_ctr.cgi +++ b/htdocs/cgi-bin/login_ctr.cgi @@ -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