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

Commite94fffc

Browse files
committed
This patch improves the destroyuser script's behaviour in checking whether
the user is allowed to detroy users. It also allows for a possible incorrectempty reply to a yes/no question.Oliver Elphick
1 parentf45ec44 commite94fffc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/bin/destroyuser/destroyuser.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
#
1010
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.10 1998/09/01 15:57:00 thomas Exp $
11+
# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.11 1999/03/14 16:00:55 momjian Exp $
1212
#
1313
# Note - this should NOT be setuid.
1414
#
@@ -79,9 +79,10 @@ then
7979
exit 1
8080
fi
8181

82-
if [$ADDUSER!="t" ]
82+
if [x$ADDUSER!=xt ]
8383
then
8484
echo"$CMDNAME:$USER cannot delete users."
85+
exit 1
8586
fi
8687

8788
#
@@ -152,7 +153,7 @@ then
152153
#
153154

154155
yn=f
155-
while [$yn!= y-a$yn!= n ]
156+
while ["$yn"!= y-a"$yn"!= n ]
156157
do
157158
echo PG_OPT_DASH_N_PARAM"Deleting user$DELUSER will destroy them. Continue (y/n)? PG_OPT_BACKSLASH_C_PARAM"
158159
read yn

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp