Module: kamailio
Branch: 5.0
Commit: 445adb0482a95f47dce518ecb403cbb1aa7cd1ac
URL:
https://github.com/kamailio/kamailio/commit/445adb0482a95f47dce518ecb403cbb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-09-29T18:26:08+02:00
kamctl: do not set privileges on drouting tables without id for pgsql
- reported by #1256
(cherry picked from commit 711917153a4be290fd7e405c2c5578fe42ef9aff)
---
Modified: utils/kamctl/kamdbctl.pgsql
---
Diff:
https://github.com/kamailio/kamailio/commit/445adb0482a95f47dce518ecb403cbb…
Patch:
https://github.com/kamailio/kamailio/commit/445adb0482a95f47dce518ecb403cbb…
---
diff --git a/utils/kamctl/kamdbctl.pgsql b/utils/kamctl/kamdbctl.pgsql
index 059b6faa82..c41354ffc6 100644
--- a/utils/kamctl/kamdbctl.pgsql
+++ b/utils/kamctl/kamdbctl.pgsql
@@ -241,9 +241,9 @@ done
for TABLE in $EXTRA_TABLES; do
sql_query "$1" "GRANT ALL PRIVILEGES ON TABLE $TABLE TO $DBRWUSER;"
sql_query "$1" "GRANT SELECT ON TABLE $TABLE TO $DBROUSER;"
- if [ $TABLE != "route_tree" ] ; then
+ if [ $TABLE != "route_tree" ] && [ $TABLE != "dr_gateways" ]
&& [ $TABLE != "dr_rules" ] ; then
sql_query "$1" "GRANT ALL PRIVILEGES ON TABLE "$TABLE"_id_seq
TO $DBRWUSER;"
- sql_query "$1" "GRANT SELECT ON TABLE "$TABLE"_id_seq TO
$DBROUSER;"
+ sql_query "$1" "GRANT SELECT ON TABLE "$TABLE"_id_seq TO
$DBROUSER;"
fi
if [ $? -ne 0 ] ; then
merr "Grant privileges to extra tables failed!"