aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2015-02-05 03:24:26 +0800
committerolgeni <olgeni@FreeBSD.org>2015-02-05 03:24:26 +0800
commit810b99e2ad402ecd48cbfeb5789ccdeda8f1e422 (patch)
tree3ae688fe6a240eaa683fa7ba276b8a35d253cb58 /sysutils
parentca7a9796cd0ee8444543a637edc14fe7c7bf2406 (diff)
downloadfreebsd-ports-gnome-810b99e2ad402ecd48cbfeb5789ccdeda8f1e422.tar.gz
freebsd-ports-gnome-810b99e2ad402ecd48cbfeb5789ccdeda8f1e422.tar.zst
freebsd-ports-gnome-810b99e2ad402ecd48cbfeb5789ccdeda8f1e422.zip
Fix quoting of function identifiers in postgresql_privs (issue 703
in ansible/ansible-modules-core on GitHub). PR: 197325 Submitted by: olgeni Approved by: maintainer
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ansible/Makefile2
-rw-r--r--sysutils/ansible/files/patch-lib_ansible_modules_core_database_postgresql_postgresql__privs.py20
2 files changed, 21 insertions, 1 deletions
diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile
index c1ac4ff32c84..efa04708f785 100644
--- a/sysutils/ansible/Makefile
+++ b/sysutils/ansible/Makefile
@@ -3,7 +3,7 @@
PORTNAME= ansible
PORTVERSION= 1.8.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils python
MASTER_SITES= http://releases.ansible.com/ansible/
diff --git a/sysutils/ansible/files/patch-lib_ansible_modules_core_database_postgresql_postgresql__privs.py b/sysutils/ansible/files/patch-lib_ansible_modules_core_database_postgresql_postgresql__privs.py
new file mode 100644
index 000000000000..605bfd914a21
--- /dev/null
+++ b/sysutils/ansible/files/patch-lib_ansible_modules_core_database_postgresql_postgresql__privs.py
@@ -0,0 +1,20 @@
+
+$FreeBSD$
+
+--- lib/ansible/modules/core/database/postgresql/postgresql_privs.py.orig
++++ lib/ansible/modules/core/database/postgresql/postgresql_privs.py
+@@ -462,10 +462,13 @@
+ if obj_type == 'group':
+ set_what = ','.join(pg_quote_identifier(i, 'role') for i in obj_ids)
+ else:
++ # function types are already quoted above
++ if obj_type != 'function':
++ obj_ids = [pg_quote_identifier(i, 'table') for i in obj_ids]
+ # Note: obj_type has been checked against a set of string literals
+ # and privs was escaped when it was parsed
+ set_what = '%s ON %s %s' % (','.join(privs), obj_type,
+- ','.join(pg_quote_identifier(i, 'table') for i in obj_ids))
++ ','.join(obj_ids))
+
+ # for_whom: SQL-fragment specifying for whom to set the above
+ if roles == 'PUBLIC':