]> granicus.if.org Git - postgresql/commitdiff
Fix to give super user and createdb user proper update catalog rights.
authorBruce Momjian <bruce@momjian.us>
Mon, 27 Sep 1999 16:44:56 +0000 (16:44 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 27 Sep 1999 16:44:56 +0000 (16:44 +0000)
doc/FAQ_Solaris
src/backend/commands/user.c
src/bin/createuser/createuser.sh

index e3a4e31055616a85869b94dea899e7f6985f2ed9..b4fb4c7aa3eff337fc57bb0178be7e83ee68bb85 100644 (file)
@@ -3,7 +3,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL  V6.5
 Sun Solaris Specific
 TO BE READ IN CONJUNCTION WITH THE NORMAL FAQ
 =======================================================
-last updated:        Thu Sep 2 11:40:00 CET 1999
+last updated:        Thu Sep 21 9:30:00 CET 1999
 
 current maintainer:  Marc Liyanage (liyanage@access.ch)
 original author:     Marc Liyanage (liyanage@access.ch)
@@ -19,6 +19,10 @@ Contents:
 1.4) Why am I getting "Can't tell what username to use" errors
      when I try to run initdb?
 
+A)   Contributors
+
+
+
 Notes:
 
 - The commands given here are for the bash shell. If you use
@@ -125,7 +129,7 @@ maximum segment size kernel parameter is set too low. The solution
 is to put something like the following line into /etc/system and
 reboot the system.
 
-set shmsys:shminfo_shmmax=0xffffffff
+set shmsys:shminfo_shmmax=0x7fffffff
 
 Excellent info regarding shared memory under Solaris can be found here:
 http://www.sunworld.com/swol-09-1997/swol-09-insidesolaris.html
@@ -140,3 +144,22 @@ Put something like this into the .bash_profile startup script
 of the postgres user (see also step 17 in the INSTALL file):
 
 export USER=postgres
+
+
+
+
+
+
+
+
+
+----------------------------------------------------------------------
+Section A:  Contributors
+----------------------------------------------------------------------
+
+- Jose Luis Rodriguez Garcia
+  Suggested to change the shmmax parameter in 1.3 from 0xffffffff to 0x7fffffff
+  because the value is a signed integer in Solaris versions prior to 2.6.
+
+
+
index c05b6da58562893b1dfab6b31e1a436572141162..76b028f7eeed0ffca807576325c4c58aa0f3d284 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: user.c,v 1.34 1999/09/18 19:06:41 tgl Exp $
+ * $Id: user.c,v 1.35 1999/09/27 16:44:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -172,12 +172,14 @@ DefineUser(CreateUserStmt *stmt, CommandDest dest)
        snprintf(sql, SQL_LENGTH,
                         "insert into %s (usename,usesysid,usecreatedb,usetrace,"
                         "usesuper,usecatupd,passwd,valuntil) "
-                        "values('%s',%d,'%c','f','%c','f',%s%s%s,%s%s%s)",
+                        "values('%s',%d,'%c','f','%c','%c',%s%s%s,%s%s%s)",
                         ShadowRelationName,
                         stmt->user,
                         max_id + 1,
                         (stmt->createdb && *stmt->createdb) ? 't' : 'f',
                         (stmt->createuser && *stmt->createuser) ? 't' : 'f',
+                        ((stmt->createdb && *stmt->createdb) ||
+                         (stmt->createuser && *stmt->createuser)) ? 't' : 'f',
                         havepassword ? "'" : "",
                         havepassword ? stmt->password : "NULL",
                         havepassword ? "'" : "",
index a1bd0a24b5e5446b6a2cdd3448525576fd50c4f1..aead7af672a6419c34d7c976fac5a0287dc8ee0f 100644 (file)
@@ -8,7 +8,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.12 1999/07/30 18:09:49 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.13 1999/09/27 16:44:56 momjian Exp $
 #
 # Note - this should NOT be setuid.
 #
@@ -215,10 +215,15 @@ then
        fi
 fi
 
+if [ "$CANCREATE" = "t" -o "$CANADDUSER" = "t" ]
+then   CANCATUPD="t"
+else   CANCATUPD="f"
+fi
+
 QUERY="insert into pg_shadow \
         (usename, usesysid, usecreatedb, usetrace, usesuper, usecatupd) \
        values \
-         ('$NEWUSER', $SYSID, '$CANCREATE', 'f', '$CANADDUSER','f')"
+         ('$NEWUSER', $SYSID, '$CANCREATE', 'f', '$CANADDUSER','$CANCATUPD')"
 
 RES=`$PSQL -c "$QUERY" template1`