Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5863d54

Browse files
committed
Put createuser ENCRYPTED/UNENCRYPTED in the proper place in the query.
1 parent 19a251d commit 5863d54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bin/scripts/createuser

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010
#
1111
# IDENTIFICATION
12-
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.18 2001/08/25 17:46:11 momjian Exp $
12+
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.19 2001/08/26 03:46:58 momjian Exp $
1313
#
1414
# Note - this should NOT be setuid.
1515
#
@@ -226,15 +226,15 @@ QUERY="CREATE USER \"$NewUser\""
226226

227227
SUBQUERY=
228228
[ "$SysID" ] && SUBQUERY="$SUBQUERY SYSID $SysID"
229-
[ "$Password" ] && SUBQUERY="$SUBQUERY PASSWORD '$Password'"
229+
[ "$Encrypted" = t ] && SUBQUERY="$SUBQUERY ENCRYPTED"
230+
[ "$Encrypted" = f ] && SUBQUERY="$SUBQUERY UNENCRYPTED"
231+
[ "$Password" ] && SUBQUERY="$SUBQUERY PASSWORD '$Password'"
230232
[ "$SUBQUERY" ] && QUERY="$QUERY WITH $SUBQUERY"
231233

232234
[ "$CanCreateDb" = t ] && QUERY="$QUERY CREATEDB"
233235
[ "$CanCreateDb" = f ] && QUERY="$QUERY NOCREATEDB"
234236
[ "$CanAddUser" = t ] && QUERY="$QUERY CREATEUSER"
235237
[ "$CanAddUser" = f ] && QUERY="$QUERY NOCREATEUSER"
236-
[ "$Encrypted" = t ] && QUERY="$QUERY ENCRYPTED"
237-
[ "$Encrypted" = f ] && QUERY="$QUERY UNENCRYPTED"
238238

239239
${PATHNAME}psql -c "$QUERY" -d template1 $PSQLOPT
240240
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)