Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04e3fd7

Browse files
committed
Create a RULE wrapper around pg_user for the password entry
1 parent3ad3fcc commit04e3fd7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/bin/initdb/initdb.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.35 1998/02/2319:26:32 scrappy Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.36 1998/02/2320:32:40 scrappy Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -358,7 +358,11 @@ echo "COPY pg_user TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" |\
358358
echo"GRANT SELECT ON pg_class TO PUBLIC"|\
359359
postgres -F -Q -D$PGDATA template12>&1> /dev/null|\
360360

361-
echo"create view db_user as select usename,usesysid from pg_user;"|\
361+
echo"CREATE RULE pg_user_hide_pw as on SELECT to pg_user.passwd DO INSTEAD SELECT '********' as passwd;"| \
362+
postgres -F -Q -D$PGDATA template12>&1> /dev/null|\
363+
grep -v"'DEBUG:"
364+
365+
echo"create view db_user as select * from pg_user;"|\
362366
postgres -F -Q -D$PGDATA template12>&1> /dev/null|\
363367
grep -v"'DEBUG:"
364368
echo"grant select on db_user to public"|\

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp