aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-02-19 17:25:58 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-02-19 17:25:58 +0000
commit86af6275a722460e402d9025fc0fa9fca4170403 (patch)
treef633b6de072fa9b9d2390283c20a8af770e940b1 /src
parentdf67b83a7a183291e53f9eea8f2553de893822c8 (diff)
downloadpostgresql-86af6275a722460e402d9025fc0fa9fca4170403.tar.gz
postgresql-86af6275a722460e402d9025fc0fa9fca4170403.zip
From: Andreas.Zeugswetter@telecom.at
Improved fix to pg_user/passwd problem...using rewrite rules
Diffstat (limited to 'src')
-rw-r--r--src/bin/initdb/initdb.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh
index 65e64585501..9a85dc62473 100644
--- a/src/bin/initdb/initdb.sh
+++ b/src/bin/initdb/initdb.sh
@@ -26,7 +26,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.32 1998/02/19 17:19:45 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.33 1998/02/19 17:25:58 scrappy Exp $
#
#-------------------------------------------------------------------------
@@ -351,6 +351,18 @@ echo "vacuuming template1"
echo "vacuum" | postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "^DEBUG:"
+echo "Altering pg_user acl"
+echo "REVOKE ALL ON pg_user FROM public" | \
+ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
+ grep -v "'DEBUG:"
+echo "GRANT SELECT ON pg_user TO public" | \
+ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
+ grep -v "'DEBUG:"
+echo "CREATE RULE pg_user_hide_pw as on SELECT to pg_user.passwd DO INSTEAD SELE
+CT '********' as passwd;" | \
+ postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
+ grep -v "'DEBUG:"
+
echo "COPY pg_user TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" | postgres -F -Q -D$PGDATA template1 2>&1 > /dev/null |\
grep -v "'DEBUG:"