Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
235
Issues
235
List
Board
Labels
Milestones
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
d14e2f34
Commit
d14e2f34
authored
Jan 27, 2019
by
Alan Clegg
Committed by
Tomek Mrugalski
Feb 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrects flaw in kea-admin util scripts for PostgreSQL
Support #14017
parent
6b57b6b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
admin-utils.sh
src/bin/admin/admin-utils.sh
+4
-4
No files found.
src/bin/admin/admin-utils.sh
View file @
d14e2f34
...
...
@@ -62,11 +62,11 @@ pgsql_execute() {
QUERY
=
$1
shift
if
[
$#
-gt
0
]
;
then
echo
"
${
QUERY
}
"
| psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
localhost
-q
"
$@
"
echo
"
${
QUERY
}
"
| psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
"
${
db_host
}
"
-q
"
$@
"
retcode
=
$?
else
export
PGPASSWORD
=
$db_password
echo
"
${
QUERY
}
"
| psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
localhost
-q
-U
"
${
db_user
}
"
-d
"
${
db_name
}
"
echo
"
${
QUERY
}
"
| psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
"
${
db_host
}
"
-q
-U
"
${
db_user
}
"
-d
"
${
db_name
}
"
retcode
=
$?
fi
return
$retcode
...
...
@@ -86,11 +86,11 @@ pgsql_execute_script() {
file
=
$1
shift
if
[
$#
-gt
0
]
;
then
psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
localhost
-q
-f
"
${
file
}
"
"
$@
"
psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
"
${
db_host
}
"
-q
-f
"
${
file
}
"
"
$@
"
retcode
=
$?
else
export
PGPASSWORD
=
$db_password
psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
localhost
-q
-U
"
${
db_user
}
"
-d
"
${
db_name
}
"
-f
"
${
file
}
"
psql
--set
ON_ERROR_STOP
=
1
-A
-t
-h
"
${
db_host
}
"
-q
-U
"
${
db_user
}
"
-d
"
${
db_name
}
"
-f
"
${
file
}
"
retcode
=
$?
fi
return
$retcode
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment