From d019b9a473f27eba1417829ca1d4b6e78b8f6550 Mon Sep 17 00:00:00 2001 From: Will Budicm Date: Sat, 5 Dec 2020 11:46:33 +1100 Subject: [PATCH] dbi:PG string for expected user defaults. --- htdocs/cgi-bin/login_ctr.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.34.1