diff options
author | Bruce Momjian <bruce@momjian.us> | 1999-03-14 16:00:55 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1999-03-14 16:00:55 +0000 |
commit | e94fffc1c1c822b16b82dcf7dab8d82ed2625d3d (patch) | |
tree | 276b2e1f176a7febadc043df328a1ae8e536731a | |
parent | f45ec44c6b6acf2d649348901f7cbd4fe6c5bb8f (diff) | |
download | postgresql-e94fffc1c1c822b16b82dcf7dab8d82ed2625d3d.tar.gz postgresql-e94fffc1c1c822b16b82dcf7dab8d82ed2625d3d.zip |
This patch improves the destroyuser script's behaviour in checking whether
the user is allowed to detroy users. It also allows for a possible incorrect
empty reply to a yes/no question.
Oliver Elphick
-rw-r--r-- | src/bin/destroyuser/destroyuser.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/destroyuser/destroyuser.sh b/src/bin/destroyuser/destroyuser.sh index aa3e13a94fd..135fff181fe 100644 --- a/src/bin/destroyuser/destroyuser.sh +++ b/src/bin/destroyuser/destroyuser.sh @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.10 1998/09/01 15:57:00 thomas Exp $ +# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.11 1999/03/14 16:00:55 momjian Exp $ # # Note - this should NOT be setuid. # @@ -79,9 +79,10 @@ then exit 1 fi -if [ $ADDUSER != "t" ] +if [ x$ADDUSER != xt ] then echo "$CMDNAME: $USER cannot delete users." + exit 1 fi # @@ -152,7 +153,7 @@ then # yn=f - while [ $yn != y -a $yn != n ] + while [ "$yn" != y -a "$yn" != n ] do echo PG_OPT_DASH_N_PARAM "Deleting user $DELUSER will destroy them. Continue (y/n)? PG_OPT_BACKSLASH_C_PARAM" read yn |