int status;
int ingerr();
+ long t;
strcpy(db, "sms");
do_passwd();
do_groups();
+ t = time(0);
+ fprintf(stderr, "Done (%d users, %d groups, %d members): %s",
+ ucount, gcount, mcount, ctime(&t));
+
## end transaction
## exit
##{
## char login[9];
## int uid, id, status;
- int t;
+ long t;
struct prentry tentry;
struct entry *u;
struct member *m;
struct bucket **p, *b;
char namebuf[40];
- int aid, t;
+ long aid, t;
## char name[33];
## int gid, id, lid, hide;
if (status)
fprintf(stderr, "Error adding group %s id %d: %s\n",
namebuf, aid, error_message(status));
- else {
+
+ if ((status==0 || status==PRIDEXIST) &&
+ (aid!=ANYUSERID && aid!=AUTHUSERID)) {
+
g = (struct entry *)malloc(sizeof(struct entry));
g->id = aid;
g->members = 0;
hash_store(groups, lid, g);
gcount++;
- }
- /* Set modes on hidden lists (S----) */
- if (hide && (status==0 || status==PRIDEXIST)) {
- pos = FindByID(0, aid);
- status = pr_Read(0, 0, pos, &gentry, sizeof(gentry));
- if (!status) {
- gentry.flags = htonl(PRGRP|PRACCESS|PRP_STATUS_ANY);
- status = pr_Write(0, 0, pos, &gentry, sizeof(gentry));
+ /* Set modes on hidden lists (S----) */
+ if (hide) {
+ pos = FindByID(0, aid);
+ status = pr_Read(0, 0, pos, &gentry, sizeof(gentry));
+ if (!status) {
+ gentry.flags = htonl(PRGRP|PRACCESS|PRP_STATUS_ANY);
+ status = pr_Write(0, 0, pos, &gentry, sizeof(gentry));
+ }
+ if (status)
+ fprintf(stderr,
+ "Error setting flags on group %s: %s\n",
+ namebuf, error_message(status));
}
- if (status)
- fprintf(stderr,
- "Error setting flags on group %s: %s\n",
- namebuf, error_message(status));
}
## }
mcount++;
}
## }
+
+ /* Do the bulk of the membership quickly.
+ * Add PRSIZE members into the user/group record. After that, we
+ * require the use of continuation records, but we assume this is
+ * few enough that we do this the slow way (AddToEntry).
+ */
for (p = &(users->data[users->size - 1]); p >= users->data; p--) {
for (b = *p; b; b = b->next) {
if ((u = (struct entry *)b->data)->members == 0)
}
}
}
+##}
+
+#if 0
+do_kerberos()
+##{
+ long status, pos;
+ struct prentry gentry, uentry;
+ struct entry *u, *g;
+ struct member *m;
+ struct bucket **p, *b;
+ char namebuf[40];
+ int aid, t;
+## char name[129];
+## int gid, id, lid, hide;
t = time(0);
- fprintf(stderr, "Done (%d users, %d groups, %d members): %s",
- ucount, gcount, mcount, ctime(&t));
+ fprintf(stderr, "Doing kerberos members: %s", ctime(&t));
-##}
+## range of s is strings
+## range of m is imembers
+ /* get lock records */
+## retrieve (name = list.modtime) where list.list_id = 0
+## retrieve (name = s.modtime) where s.string_id = 0
+## retrieve (lid = m.list_id, id = m.member_id)
+## where m.member_type = "KERBEROS" {
+ xxx;
+ {
+ }
+## }
+##}
+#endif
+
+
/*
* ingerr: (supposedly) called when Ingres indicates an error.
* I have not yet been able to get this to work to intercept a