Encryption addition to createuser

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Encryption addition to createuser
Дата
Msg-id
200108251745.f7PHjuJ05984@candle.pha.pa.us
Список
Attached is a patch that allows ENCRYPTED/UNENCRYPTED control in the
createuser script.

Applied.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: doc/src/sgml/ref/createuser.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v
retrieving revision 1.17
diff -c -r1.17 createuser.sgml
*** doc/src/sgml/ref/createuser.sgml	2001/05/02 14:46:33	1.17
--- doc/src/sgml/ref/createuser.sgml	2001/08/25 17:35:48
***************
*** 133,138 ****
--- 133,158 ----
       
  
       
+       --encrypted
+       
+        
+ 	Encrypts the user's password stored in the database. If not
+ 	specified, the default is used.
+        
+       
+      
+ 
+      
+       --unencrypted
+       
+        
+ 	Does not encrypt the user's password stored in the database. If
+ 	not specified, the default is used.
+        
+       
+      
+ 
+      
        username
        
         
Index: src/bin/scripts/createuser
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/scripts/createuser,v
retrieving revision 1.17
diff -c -r1.17 createuser
*** src/bin/scripts/createuser	2001/02/18 18:34:01	1.17
--- src/bin/scripts/createuser	2001/08/25 17:35:49
***************
*** 25,30 ****
--- 25,31 ----
  PwPrompt=
  Password=
  PSQLOPT=
+ Encrypted=	# blank uses default
  
  # Check for echo -n vs echo \c
  
***************
*** 103,108 ****
--- 104,115 ----
          --sysid=*)
                  SysID=`echo "$1" | sed 's/^--sysid=//'`
                  ;;
+         --encrypted)
+ 		Encrypted=t
+ 		;;
+         --unencrypted)
+ 		Encrypted=f
+ 		;;
          -i*)
                  SysID=`echo "$1" | sed 's/^-i//'`
                  ;;
***************
*** 226,231 ****
--- 233,240 ----
  [ "$CanCreateDb" = f ] && QUERY="$QUERY NOCREATEDB"
  [ "$CanAddUser" = t ] &&  QUERY="$QUERY CREATEUSER"
  [ "$CanAddUser" = f ] &&  QUERY="$QUERY NOCREATEUSER"
+ [ "$Encrypted" = t ] &&   QUERY="$QUERY ENCRYPTED"
+ [ "$Encrypted" = f ] &&   QUERY="$QUERY UNENCRYPTED"
  
  ${PATHNAME}psql -c "$QUERY" -d template1 $PSQLOPT
  if [ $? -ne 0 ]; then
Index: doc/src/sgml/ref/createuser.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v
retrieving revision 1.17
diff -c -r1.17 createuser.sgml
*** doc/src/sgml/ref/createuser.sgml	2001/05/02 14:46:33	1.17
--- doc/src/sgml/ref/createuser.sgml	2001/08/25 17:35:48
***************
*** 133,138 ****
--- 133,158 ----
       
  
       
+       --encrypted
+       
+        
+ 	Encrypts the user's password stored in the database. If not
+ 	specified, the default is used.
+        
+       
+      
+ 
+      
+       --unencrypted
+       
+        
+ 	Does not encrypt the user's password stored in the database. If
+ 	not specified, the default is used.
+        
+       
+      
+ 
+      
        username
        
         
Index: src/bin/scripts/createuser
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/scripts/createuser,v
retrieving revision 1.17
diff -c -r1.17 createuser
*** src/bin/scripts/createuser	2001/02/18 18:34:01	1.17
--- src/bin/scripts/createuser	2001/08/25 17:35:49
***************
*** 25,30 ****
--- 25,31 ----
  PwPrompt=
  Password=
  PSQLOPT=
+ Encrypted=	# blank uses default
  
  # Check for echo -n vs echo \c
  
***************
*** 103,108 ****
--- 104,115 ----
          --sysid=*)
                  SysID=`echo "$1" | sed 's/^--sysid=//'`
                  ;;
+         --encrypted)
+ 		Encrypted=t
+ 		;;
+         --unencrypted)
+ 		Encrypted=f
+ 		;;
          -i*)
                  SysID=`echo "$1" | sed 's/^-i//'`
                  ;;
***************
*** 226,231 ****
--- 233,240 ----
  [ "$CanCreateDb" = f ] && QUERY="$QUERY NOCREATEDB"
  [ "$CanAddUser" = t ] &&  QUERY="$QUERY CREATEUSER"
  [ "$CanAddUser" = f ] &&  QUERY="$QUERY NOCREATEUSER"
+ [ "$Encrypted" = t ] &&   QUERY="$QUERY ENCRYPTED"
+ [ "$Encrypted" = f ] &&   QUERY="$QUERY UNENCRYPTED"
  
  ${PATHNAME}psql -c "$QUERY" -d template1 $PSQLOPT
  if [ $? -ne 0 ]; then
В списке pgsql-patches по дате отправления
От: Vsevolod Lobko
Дата:
От: Rene Pijlman
Дата:
Сообщение: Fix for compile error clog.c
FAQ