[1467] in Moira
zephyr table support for dbck
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Tue Mar 21 00:45:46 2000
Message-Id: <200003210545.AAA173719@oliver.mit.edu>
To: moiradev@MIT.EDU
Date: Tue, 21 Mar 2000 00:45:39 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
Index: phase1.pc
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository//moira/dbck/phase1.pc,v
retrieving revision 1.10
diff -c -r1.10 phase1.pc
*** phase1.pc 2000/03/05 08:27:37 1.10
--- phase1.pc 2000/03/13 04:18:26
***************
*** 935,939 ****
cant_fix(0);
}
}
! EXEC SQL CLOSE csr111;
}
--- 935,963 ----
cant_fix(0);
}
}
! EXEC SQL CLOSE csr_ps;
!
! if (!fast)
! {
! dprintf("Checking zephyr...\n");
!
! EXEC SQL DECLARE csr120 CURSOR FOR
! SELECT z1.class FROM zephyr z1, zephyr z2
! WHERE (z1.class = z2.class AND z1.rowid < z1.rowid);
! EXEC SQL OPEN csr120;
! while (1)
! {
! EXEC SQL BEGIN DECLARE SECTION;
! char class[ZEPHYR_CLASS_SIZE];
! EXEC SQL END DECLARE SECTION;
!
! EXEC SQL FETCH csr120 INTO :class;
! if (sqlca.sqlcode)
! break;
!
! printf("Zephyr class %s has duplicate name\n", class);
! cant_fix(0);
! }
! EXEC SQL CLOSE csr120;
! }
}
Index: phase2.pc
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository//moira/dbck/phase2.pc,v
retrieving revision 1.17
diff -c -r1.17 phase2.pc
*** phase2.pc 2000/03/05 08:27:38 1.17
--- phase2.pc 2000/03/21 05:44:50
***************
*** 2058,2064 ****
generic_fix(sq3, show_quota_wrongpid, "Fix", fix_quota_physid, 1);
generic_fix(sq4, show_quota_nolist, "Delete", fix_quota_nolist, 1);
! dprintf("Not checking zephyr.\n");
dprintf("Checking hostaccess...\n");
EXEC SQL DECLARE csr228 CURSOR FOR
--- 2058,2143 ----
generic_fix(sq3, show_quota_wrongpid, "Fix", fix_quota_physid, 1);
generic_fix(sq4, show_quota_nolist, "Delete", fix_quota_nolist, 1);
! dprintf("Checking zephyr...\n");
! EXEC SQL DECLARE csr_zc CURSOR FOR
! SELECT class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id,
! iui_type, iui_id, modby FROM zephyr;
! EXEC SQL OPEN csr_zc;
! while(1)
! {
! EXEC SQL BEGIN DECLARE SECTION;
! int xmt_id, sub_id, iws_id, iui_id, modby;
! char class[ZEPHYR_CLASS_SIZE];
! char xmt_type[ZEPHYR_XMT_TYPE_SIZE];
! char sub_type[ZEPHYR_SUB_TYPE_SIZE];
! char iws_type[ZEPHYR_IWS_TYPE_SIZE];
! char iui_type[ZEPHYR_IUI_TYPE_SIZE];
! EXEC SQL END DECLARE SECTION;
!
! EXEC SQL FETCH csr_zc INTO :class, :xmt_type, :xmt_id, :sub_type,
! :sub_id, :iws_type, :iws_id, :iui_type, :iui_id, :modby;
!
! if (sqlca.sqlcode)
! break;
!
! maybe_fixup_modby2("zephyr", "modby", strtrim(rowid), modby);
!
! strtrim(xmt_type);
! if (!strcmp(xmt_type, "USER") && !hash_lookup(users, xmt_id))
! {
! printf("xmt acl for %s is non-existant user %d\n", class, xmt_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(xmt_type, "LIST") && !hash_lookup(lists, xmt_id))
! {
! printf("xmt acl for %s is non-existant list %d\n", class, xmt_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(xmt_type, "STRING") || !strcmp(xmt_type, "KERBEROS"))
! maybe_fixup_unref_string2("zephyr", "xmt_id", strtrim(rowid), xmt_id);
!
! strtrim(sub_type);
! if (!strcmp(sub_type, "USER") && !hash_lookup(users, sub_id))
! {
! printf("sub acl for %s is non-existant user %d\n", class, sub_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(sub_type, "LIST") && !hash_lookup(lists, sub_id))
! {
! printf("sub acl for %s is non-existant list %d\n", class, sub_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(sub_type, "STRING") || !strcmp(sub_type, "KERBEROS"))
! maybe_fixup_unref_string2("zephyr", "sub_id", strtrim(rowid), sub_id);
!
! strtrim(iws_type);
! if (!strcmp(iws_type, "USER") && !hash_lookup(users, iws_id))
! {
! printf("iws acl for %s is non-existant user %d\n", class, iws_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(iws_type, "LIST") && !hash_lookup(lists, iws_id))
! {
! printf("iws acl for %s is non-existant list %d\n", class, iws_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(iws_type, "STRING") || !strcmp(iws_type, "KERBEROS"))
! maybe_fixup_unref_string2("zephyr", "iws_id", strtrim(rowid), iws_id);
!
! strtrim(iui_type);
! if (!strcmp(iui_type, "USER") && !hash_lookup(users, iui_id))
! {
! printf("iui acl for %s is non-existant user %d\n", class, iui_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(iui_type, "LIST") && !hash_lookup(lists, iui_id))
! {
! printf("iui acl for %s is non-existant list %d\n", class, iui_id);
! printf("Not fixing this error\n");
! }
! else if (!strcmp(iui_type, "STRING") || !strcmp(iui_type, "KERBEROS"))
! maybe_fixup_unref_string2("zephyr", "iui_id", strtrim(rowid), iui_id);
! }
dprintf("Checking hostaccess...\n");
EXEC SQL DECLARE csr228 CURSOR FOR