diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/catname.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_attribute.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_class.h | 6 | ||||
-rw-r--r-- | src/include/catalog/pg_shadow.h | 105 | ||||
-rw-r--r-- | src/include/catalog/pg_type.h | 4 | ||||
-rw-r--r-- | src/include/utils/acl.h | 4 |
6 files changed, 116 insertions, 11 deletions
diff --git a/src/include/catalog/catname.h b/src/include/catalog/catname.h index 4b1b0828852..04d1696d76a 100644 --- a/src/include/catalog/catname.h +++ b/src/include/catalog/catname.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: catname.h,v 1.8 1997/11/15 20:57:38 momjian Exp $ + * $Id: catname.h,v 1.9 1998/02/25 13:09:21 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -35,9 +35,9 @@ #define ProcedureRelationName "pg_proc" #define RelationRelationName "pg_class" #define RewriteRelationName "pg_rewrite" +#define ShadowRelationName "pg_shadow" #define StatisticRelationName "pg_statistic" #define TypeRelationName "pg_type" -#define UserRelationName "pg_user" #define VariableRelationName "pg_variable" #define VersionRelationName "pg_version" #define AttrDefaultRelationName "pg_attrdef" diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 5dd861f9aad..2fc383a50c0 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_attribute.h,v 1.28 1998/02/13 19:46:09 momjian Exp $ + * $Id: pg_attribute.h,v 1.29 1998/02/25 13:09:24 scrappy Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -275,7 +275,7 @@ DATA(insert OID = 0 ( 1255 xmax 28 0 4 -5 0 -1 -1 f f i f f)); DATA(insert OID = 0 ( 1255 cmax 29 0 4 -6 0 -1 -1 t f i f f)); /* ---------------- - * pg_user + * pg_shadow * ---------------- */ DATA(insert OID = 0 ( 1260 usename 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f)); diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index b70ceba2cee..0ff0eee91aa 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_class.h,v 1.18 1998/01/16 23:20:52 momjian Exp $ + * $Id: pg_class.h,v 1.19 1998/02/25 13:09:25 scrappy Exp $ * * NOTES * ``pg_relation'' is being replaced by ``pg_class''. currently @@ -125,7 +125,7 @@ DATA(insert OID = 1255 ( pg_proc 81 PGUID 0 0 0 f f r 16 0 0 f _null_ )); DESCR(""); DATA(insert OID = 1259 ( pg_class 83 PGUID 0 0 0 f f r 14 0 0 f _null_ )); DESCR(""); -DATA(insert OID = 1260 ( pg_user 86 PGUID 0 0 0 f t r 8 0 0 f _null_ )); +DATA(insert OID = 1260 ( pg_shadow 86 PGUID 0 0 0 f t r 8 0 0 f _null_ )); DESCR(""); DATA(insert OID = 1261 ( pg_group 87 PGUID 0 0 0 f t s 3 0 0 f _null_ )); DESCR(""); @@ -146,7 +146,7 @@ DESCR(""); #define RelOid_pg_attribute 1249 #define RelOid_pg_proc 1255 #define RelOid_pg_class 1259 -#define RelOid_pg_user 1260 +#define RelOid_pg_shadow 1260 #define RelOid_pg_group 1261 #define RelOid_pg_database 1262 #define RelOid_pg_variable 1264 diff --git a/src/include/catalog/pg_shadow.h b/src/include/catalog/pg_shadow.h new file mode 100644 index 00000000000..67c0191a91c --- /dev/null +++ b/src/include/catalog/pg_shadow.h @@ -0,0 +1,105 @@ +/*------------------------------------------------------------------------- + * + * pg_shadow.h-- + * definition of the system "shadow" relation (pg_shadow) + * along with the relation's initial contents. + * pg_user is now a public accessible view on pg_shadow. + * + * + * Copyright (c) 1994, Regents of the University of California + * + * $Id: pg_shadow.h,v 1.1 1998/02/25 13:09:26 scrappy Exp $ + * + * NOTES + * the genbki.sh script reads this file and generates .bki + * information from the DATA() statements. + * + * WHENEVER the definition for pg_shadow changes, the + * view creation of pg_user must be changed in initdb.sh! + * + *------------------------------------------------------------------------- + */ +#ifndef PG_SHADOW_H +#define PG_SHADOW_H + + +/* Prototype required for superuser() from superuser.c */ + +bool superuser(void); + +/* ---------------- + * pg_shadow definition. cpp turns this into + * typedef struct FormData_pg_shadow + * ---------------- + */ +CATALOG(pg_shadow) BOOTSTRAP +{ + NameData usename; + int4 usesysid; + bool usecreatedb; + bool usetrace; + bool usesuper; + bool usecatupd; + text passwd; + int4 valuntil; +} FormData_pg_shadow; + +/* ---------------- + * Form_pg_shadow corresponds to a pointer to a tuple with + * the format of pg_shadow relation. + * ---------------- + */ +typedef FormData_pg_shadow *Form_pg_shadow; + +/* ---------------- + * compiler constants for pg_shadow + * ---------------- + */ +#define Natts_pg_shadow 8 +#define Anum_pg_shadow_usename 1 +#define Anum_pg_shadow_usesysid 2 +#define Anum_pg_shadow_usecreatedb 3 +#define Anum_pg_shadow_usetrace 4 +#define Anum_pg_shadow_usesuper 5 +#define Anum_pg_shadow_usecatupd 6 +#define Anum_pg_shadow_passwd 7 +#define Anum_pg_shadow_valuntil 8 + +/* ---------------- + * initial contents of pg_shadow + * ---------------- + */ +DATA(insert OID = 0 ( postgres PGUID t t t t _null_ 2116994400 )); + +BKI_BEGIN +#ifdef ALLOW_PG_GROUP +BKI_END + +DATA(insert OID = 0 ( mike 799 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( mao 1806 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( hellers 1089 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( joey 5209 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( jolly 5443 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( sunita 6559 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( paxson 3029 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( marc 2435 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( jiangwu 6124 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( aoki 2360 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( avi 31080 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( kristin 1123 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( andrew 5229 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( nobuko 5493 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( hartzell 6676 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( devine 6724 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( boris 6396 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( sklower 354 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( marcel 31113 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( ginger 3692 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( woodruff 31026 t t t t _null_ 2116994400 )); +DATA(insert OID = 0 ( searcher 8261 t t t t _null_ 2116994400 )); + +BKI_BEGIN +#endif /* ALLOW_PG_GROUP */ +BKI_END + +#endif /* PG_SHADOW_H */ diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index f3e68b9f372..49f8b100942 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_type.h,v 1.33 1998/02/10 16:04:10 momjian Exp $ + * $Id: pg_type.h,v 1.34 1998/02/25 13:09:27 scrappy Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -212,7 +212,7 @@ DATA(insert OID = 71 ( pg_type PGUID 1 1 t b t \054 1247 0 foo bar foo bar c _ DATA(insert OID = 75 ( pg_attribute PGUID 1 1 t b t \054 1249 0 foo bar foo bar c _null_)); DATA(insert OID = 81 ( pg_proc PGUID 1 1 t b t \054 1255 0 foo bar foo bar c _null_)); DATA(insert OID = 83 ( pg_class PGUID 1 1 t b t \054 1259 0 foo bar foo bar c _null_)); -DATA(insert OID = 86 ( pg_user PGUID 1 1 t b t \054 1260 0 foo bar foo bar c _null_)); +DATA(insert OID = 86 ( pg_shadow PGUID 1 1 t b t \054 1260 0 foo bar foo bar c _null_)); DATA(insert OID = 87 ( pg_group PGUID 1 1 t b t \054 1261 0 foo bar foo bar c _null_)); DATA(insert OID = 88 ( pg_database PGUID 1 1 t b t \054 1262 0 foo bar foo bar c _null_)); DATA(insert OID = 90 ( pg_variable PGUID 1 1 t b t \054 1264 0 foo bar foo bar c _null_)); diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h index d1dab54469a..d4dd628613d 100644 --- a/src/include/utils/acl.h +++ b/src/include/utils/acl.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: acl.h,v 1.15 1998/02/24 03:31:50 scrappy Exp $ + * $Id: acl.h,v 1.16 1998/02/25 13:09:49 scrappy Exp $ * * NOTES * For backward-compatability purposes we have to allow there @@ -39,7 +39,7 @@ typedef uint32 AclId; typedef uint8 AclIdType; #define ACL_IDTYPE_WORLD 0x00 -#define ACL_IDTYPE_UID 0x01 /* user id - from pg_user */ +#define ACL_IDTYPE_UID 0x01 /* user id - from pg_shadow */ #define ACL_IDTYPE_GID 0x02 /* group id - from pg_group */ /* |