struct hash *users;
struct hash *groups;
-struct hash *idpos;
main(argc, argv)
int argc;
initialize_pt_error_table();
Initdb(); /* Initialize prdb */
- idpos = create_hash(20000);
users = create_hash(10000);
groups = create_hash(15000);
/* If this list is hidden, set the pts entry to be s---- */
if (hide && (status==0 || status==PRIDEXIST)) {
- gpos = get_id(aid);
+ gpos = FindByID(0, aid);
status = pr_ReadEntry(0, 0, gpos, &gentry);
if (!status) {
gentry.flags = PRGRP|PRACCESS|PRP_STATUS_ANY;
(g = (long) hash_lookup(groups, lid))) {
if (g==ANYUSERID || g==AUTHUSERID || u==ANONYMOUSID) {
status = PRPERM;
- } else if ((gpos = get_id(g)) && (upos = get_id(u))) {
+ } else if ((gpos = FindByID(0,g)) && (upos = FindByID(0,u))) {
status = pr_ReadEntry(0,0,upos,&uentry);
if (!status) status = pr_ReadEntry(0,0,gpos,&gentry);
if (!status) status = AddToEntry (0, &gentry, gpos, u);
##}
-get_id(id)
-{
- long i;
-
- if (i=(long)hash_lookup(idpos, id))
- return i;
- hash_store(idpos, id, i=FindByID(0, id));
- return i;
-}
-
-
-
/*
* ingerr: (supposedly) called when Ingres indicates an error.
* I have not yet been able to get this to work to intercept a