From 0c345c78f2e679d4c9e1beec23a0e6f8bc427732 Mon Sep 17 00:00:00 2001 From: genoa Date: Sat, 17 Oct 1992 20:51:07 +0000 Subject: [PATCH] Canonicalized correlation names. --- server/increment.dc | 68 ++-- server/queries2.c | 858 ++++++++++++++++++++++---------------------- 2 files changed, 464 insertions(+), 462 deletions(-) diff --git a/server/increment.dc b/server/increment.dc index a71430e6..7e3a5282 100644 --- a/server/increment.dc +++ b/server/increment.dc @@ -126,20 +126,20 @@ char **argv; beforetable = table; if (!strcmp(table, "users")) { - EXEC SQL SELECT login, CHAR(uid), shell, last, first, middle, - CHAR(status), clearid, type + EXEC SQL SELECT u.login, CHAR(u.uid), u.shell, u.last, u.first, u.middle, + CHAR(u.status), u.clearid, u.type INTO :barg0, :barg1, :barg2, :barg3, :barg4, :barg5, :barg6, :barg7, :barg8 - FROM users WHERE :qual; + FROM users u WHERE :qual; beforec = 9; } else if (!strcmp(table, "machine")) { - EXEC SQL SELECT name, type INTO :barg0, :barg1 FROM machine + EXEC SQL SELECT n.name, n.type INTO :barg0, :barg1 FROM machine m WHERE :qual; beforec = 2; } else if (!strcmp(table, "cluster")) { - EXEC SQL SELECT name, description, location + EXEC SQL SELECT c.name, c.description, c.location INTO :barg0, :barg1, :barg2 - FROM cluster WHERE :qual; + FROM cluster c WHERE :qual; beforec = 3; } else if (!strcmp(table, "mcmap")) { strcpy(barg0, argv[0]); @@ -151,11 +151,12 @@ char **argv; strcpy(barg2, argv[2]); beforec = 3; } else if (!strcmp(table, "filesys")) { - EXEC SQL SELECT label, type, CHAR(mach_id), name, mount, access, - comments, CHAR(owner), CHAR(owners), CHAR(createflg), lockertype + EXEC SQL SELECT fs.label, fs.type, CHAR(fs.mach_id), fs.name, + fs.mount, fs.access, fs.comments, CHAR(fs.owner), CHAR(fs.owners), + CHAR(fs.createflg), fs.lockertype INTO :barg0, :barg1, :barg2, :barg3, :barg4, :barg5, :barg6, :barg7, :barg8, :barg9, :barg10 - FROM filesys WHERE :qual; + FROM filesys fs WHERE :qual; name = malloc(0); id = atoi(barg2); id_to_name(id, "MACHINE", &name); @@ -172,18 +173,18 @@ char **argv; strcpy(barg0, "?"); strcpy(barg1, argv[1]); strcpy(barg2, "?"); - sprintf(buffer, "%s and filesys.filsys_id = quota.filsys_id", qual); + sprintf(buffer, "%s AND fs.filsys_id = q.filsys_id", qual); qual = buffer; - EXEC SQL SELECT CHAR(quota.quota), filesys.name INTO :barg3, :barg4 - FROM quota, filesys WHERE :qual; + EXEC SQL SELECT CHAR(q.quota), fs.name INTO :barg3, :barg4 + FROM quota q, filesys fs WHERE :qual; beforec = 5; } else if (!strcmp(table, "list")) { - EXEC SQL SELECT name, CHAR(active), CHAR(publicflg), CHAR(hidden), - CHAR(maillist), CHAR(grouplist), CHAR(gid), acl_type, - CHAR(acl_id), description + EXEC SQL SELECT l.name, CHAR(l.active), CHAR(l.publicflg), + CHAR(l.hidden), CHAR(l.maillist), CHAR(l.grouplist), CHAR(l.gid), + l.acl_type, CHAR(l.acl_id), l.description INTO :barg0, :barg1, :barg2, :barg3, :barg4, :barg5, :barg6, - :barg7, :barg8, :barg9 - FROM list WHERE :qual; + :barg7, :barg8, :barg9 + FROM list l WHERE :qual; beforec = 10; } else if (!strcmp(table, "members")) { id = (int) argv[0]; @@ -238,20 +239,20 @@ EXEC SQL END DECLARE SECTION; char **copy_argv(); if (!strcmp(table, "users")) { - EXEC SQL SELECT login, CHAR(uid), shell, last, first, middle, - CHAR(status), clearid, type + EXEC SQL SELECT u.login, CHAR(u.uid), u.shell, u.last, u.first, + u.middle, CHAR(u.status), u.clearid, u.type INTO :aarg0, :aarg1, :aarg2, :aarg3, :aarg4, :aarg5, :aarg6, :aarg7, :aarg8 - FROM users WHERE :qual; + FROM users u WHERE :qual; afterc = 9; } else if (!strcmp(table, "machine")) { - EXEC SQL SELECT name, type INTO :aarg0, :aarg1 - FROM machine WHERE :qual; + EXEC SQL SELECT m.name, m.type INTO :aarg0, :aarg1 + FROM machine m WHERE :qual; afterc = 2; } else if (!strcmp(table, "cluster")) { - EXEC SQL SELECT name, description, location + EXEC SQL SELECT c.name, c.description, c.location INTO :aarg0, :aarg1, :aarg2 - FROM cluster WHERE :qual; + FROM cluster c WHERE :qual; afterc = 3; } else if (!strcmp(table, "mcmap")) { strcpy(aarg0, argv[0]); @@ -263,8 +264,9 @@ EXEC SQL END DECLARE SECTION; strcpy(aarg2, argv[2]); afterc = 3; } else if (!strcmp(table, "filesys")) { - EXEC SQL SELECT CHAR(label), type, CHAR(mach_id), name, mount, access, - comments, CHAR(owner), CHAR(owners), CHAR(createflg), lockertype + EXEC SQL SELECT CHAR(fs.label), fs.type, CHAR(fs.mach_id), fs.name, + fs.mount, fs.access, fs.comments, CHAR(fs.owner), CHAR(fs.owners), + CHAR(fs.createflg), fs.lockertype INTO :aarg0, :aarg1, :aarg2, :aarg3, :aarg4, :aarg5, :aarg6, :aarg7, :aarg8, :aarg9, :aarg10 FROM filesys fs WHERE :qual; @@ -284,18 +286,18 @@ EXEC SQL END DECLARE SECTION; strcpy(aarg0, "?"); strcpy(aarg1, argv[1]); strcpy(aarg2, "?"); - sprintf(buffer, "%s and filesys.filsys_id = quota.filsys_id", qual); + sprintf(buffer, "%s and fs.filsys_id = q.filsys_id", qual); qual = buffer; - EXEC SQL SELECT CHAR(quota.quota), filesys.name INTO :aarg3, :aarg4 - FROM quota, filesys WHERE :qual; + EXEC SQL SELECT CHAR(q.quota), fs.name INTO :aarg3, :aarg4 + FROM quota q, filesys fs WHERE :qual; afterc = 5; } else if (!strcmp(table, "list")) { - EXEC SQL SELECT name, CHAR(active), CHAR(publicflg), CHAR(hidden), - CHAR(maillist), CHAR(grouplist), CHAR(gid), acl_type, - CHAR(acl_id), description + EXEC SQL SELECT l.name, CHAR(l.active), CHAR(l.publicflg), + CHAR(l.hidden), CHAR(l.maillist), CHAR(l.grouplist), CHAR(l.gid), + l.acl_type, CHAR(l.acl_id), l.description INTO :aarg0, :aarg1, :aarg2, :aarg3, :aarg4, :aarg5, :aarg6, :aarg7, :aarg8, :aarg9 - FROM list WHERE :qual; + FROM list l WHERE :qual; afterc = 10; } else if (!strcmp(table, "members")) { id = (int) argv[0]; diff --git a/server/queries2.c b/server/queries2.c index 5aee1b5a..58522c58 100644 --- a/server/queries2.c +++ b/server/queries2.c @@ -244,51 +244,51 @@ static struct validate VDsort2= { VOsort01,2 }; static struct validate VDwild2sort2 = { VOwild01sort01,4 }; static struct validate VDwild3sort1 = { VOwild012sort0,4 }; static struct validate VDsortf = { - VOsort0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - followup_fix_modby, + VOsort0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + followup_fix_modby, }; static struct validate VDwildsortf = { - VOwild0sort, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - followup_fix_modby, + VOwild0sort, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + followup_fix_modby, }; static struct validate VDwild2sortf = { - VOwild01sort01, - 4, - 0, - 0, - 0, - 0, - 0, - 0, - followup_fix_modby, + VOwild01sort01, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + followup_fix_modby, }; static struct validate VDupwildsortf = { - VOupwild0sort, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - followup_fix_modby, + VOupwild0sort, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + followup_fix_modby, }; @@ -304,7 +304,7 @@ static char *gual_fields[] = { LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, }; - + static char *gubl_fields[] = { LOGIN, LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, @@ -325,33 +325,33 @@ static struct validate gubl_validate = }; static char *guau_fields[] = { - UID, - LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, - MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, + UID, + LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, + MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, }; - + static char *guan_fields[] = { - FIRST, LAST, - LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, - MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, + FIRST, LAST, + LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, + MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, }; - + static char *guac_fields[] = { - CLASS, - LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, - MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, + CLASS, + LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, + MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, }; - + static char *guam_fields[] = { - MIT_ID, - LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, - MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, + MIT_ID, + LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, + MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE, MOD1, MOD2, MOD3, }; - + static char *gubu_fields[] = { - UID, - LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, - MIT_ID, CLASS, MOD1, MOD2, MOD3, + UID, + LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, + MIT_ID, CLASS, MOD1, MOD2, MOD3, }; static struct validate gubu_validate = @@ -375,15 +375,15 @@ static char *gubn_fields[] = { static struct validate gubn_validate = { - VOwild01sort0, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - followup_fix_modby, + VOwild01sort0, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + followup_fix_modby, }; static char *gubc_fields[] = { @@ -418,19 +418,19 @@ static struct validate auac_validate = { auac_valobj, 8, LOGIN, - "users.login = LEFT('%s',SIZE(users.login))", + "u.login = LEFT('%s',SIZE(u.login))", 1, USERS_ID, 0, setup_ausr, followup_ausr, }; - + static struct validate ausr_validate = { auac_valobj, 7, LOGIN, - "users.login = LEFT('%s',SIZE(users.login))", + "u.login = LEFT('%s',SIZE(u.login))", 1, USERS_ID, 0, @@ -440,7 +440,7 @@ static struct validate ausr_validate = { static char *rusr_fields[] = { UID, LOGIN, "fs_type" -}; + }; static struct valobj rusr_valobj[] = { {V_LOCK, 0, USERS, 0, USERS_ID, MR_DEADLOCK}, @@ -468,29 +468,29 @@ static char *uuac_fields[] = { }; static struct valobj uuac_valobj[] = { - {V_LOCK, 0, USERS, 0, USERS_ID, MR_DEADLOCK}, - {V_ID, 0, USERS, LOGIN, USERS_ID, MR_USER}, - {V_RENAME, 1, USERS, LOGIN, USERS_ID, MR_NOT_UNIQUE}, - {V_CHAR, 4}, - {V_CHAR, 5}, - {V_CHAR, 6}, - {V_CHAR, 8}, - {V_TYPE, 9, CLASS, 0, 0, MR_BAD_CLASS}, - {V_ID, 10, "strings", "string", "string_id", MR_NO_MATCH}, + {V_LOCK, 0, USERS, 0, USERS_ID, MR_DEADLOCK}, + {V_ID, 0, USERS, LOGIN, USERS_ID, MR_USER}, + {V_RENAME, 1, USERS, LOGIN, USERS_ID, MR_NOT_UNIQUE}, + {V_CHAR, 4}, + {V_CHAR, 5}, + {V_CHAR, 6}, + {V_CHAR, 8}, + {V_TYPE, 9, CLASS, 0, 0, MR_BAD_CLASS}, + {V_ID, 10, "strings", "string", "string_id", MR_NO_MATCH}, }; static struct validate uuac_validate = { - uuac_valobj, - 9, - 0, - 0, - 0, - USERS_ID, - 0, - setup_ausr, - followup_uuac, + uuac_valobj, + 9, + 0, + 0, + 0, + USERS_ID, + 0, + setup_ausr, + followup_uuac, }; - + static struct validate uusr_validate = { uuac_valobj, 8, @@ -529,7 +529,7 @@ static char *uuss_fields[] = { LOGIN, SECURE, }; - + static struct validate uust_validate = { VOuser0lock, 2, @@ -563,8 +563,8 @@ static char *dubu_fields[] = { }; static struct valobj dubu_valobj[] = { - {V_LOCK, 0, USERS, 0, USERS_ID, MR_DEADLOCK}, - {V_ID, 0, USERS, UID, USERS_ID, MR_USER} + {V_LOCK, 0, USERS, 0, USERS_ID, MR_DEADLOCK}, + {V_ID, 0, USERS, UID, USERS_ID, MR_USER} }; static struct validate dubu_validate = { @@ -580,41 +580,41 @@ static struct validate dubu_validate = { }; static char *gkum_fields[] = { LOGIN, "kerberos", - LOGIN, "kerberos" }; + LOGIN, "kerberos" }; static char *akum_fields[] = { LOGIN, "kerberos" }; static struct valobj akum_valobj[] = { - {V_ID, 0, USERS, LOGIN, USERS_ID, MR_USER}, - {V_ID, 1, "strings", "string", "string_id", MR_NO_MATCH}, + {V_ID, 0, USERS, LOGIN, USERS_ID, MR_USER}, + {V_ID, 1, "strings", "string", "string_id", MR_NO_MATCH}, }; static struct validate akum_validate = { - akum_valobj, - 1, - USERS_ID, - "krbmap.users_id = %d or krbmap.string_id = %d", - 2, - USERS_ID, - access_user, - setup_akum, - 0 -}; + akum_valobj, + 1, + USERS_ID, + "km.users_id = %d or km.string_id = %d", + 2, + USERS_ID, + access_user, + setup_akum, + 0 + }; static struct validate dkum_validate = { - akum_valobj, - 2, - USERS_ID, - "krbmap.users_id = %d and krbmap.string_id = %d", - 2, - USERS_ID, - access_user, - 0, - 0 -}; + akum_valobj, + 2, + USERS_ID, + "km.users_id = %d and km.string_id = %d", + 2, + USERS_ID, + access_user, + 0, + 0 + }; static char *gfbl_fields[] = { LOGIN, @@ -663,7 +663,7 @@ static struct validate gpob_validate = { VOuser0, 1, "potype", - "users.potype != 'NONE' and users.users_id=%d", + "u.potype != 'NONE' and u.users_id=%d", 1, 0, access_user, @@ -742,7 +742,7 @@ static char *gmac_fields[] = { }; static char *amac_fields[] = { - NAME, TYPE + NAME, TYPE, }; static struct valobj amac_valobj[] = { @@ -755,7 +755,7 @@ static struct validate amac_validate = { amac_valobj, 3, NAME, - "machine.name = UPPERCASE(LEFT('%s',SIZE(machine.name)))", + "m.name = uppercase(LEFT('%s',SIZE(m.name)))", 1, MACH_ID, 0, @@ -816,7 +816,7 @@ static char *gclu_fields[] = { static char *aclu_fields[] = { NAME, DESC, LOCATION, }; - + static struct valobj aclu_valobj[] = { {V_LOCK, 0, CLUSTER, 0, CLU_ID, MR_DEADLOCK}, {V_CHAR, 0} @@ -827,7 +827,7 @@ static struct validate aclu_validate = aclu_valobj, 2, NAME, - "cluster.name = LEFT('%s',SIZE(cluster.name))", + "c.name = LEFT('%s',SIZE(c.name))", 1, CLU_ID, 0, @@ -863,15 +863,15 @@ static char *dclu_fields[] = { }; static struct validate dclu_validate = { - VOclu0, - 1, - 0, - 0, - 0, - 0, - 0, - setup_dclu, - 0, + VOclu0, + 1, + 0, + 0, + 0, + 0, + 0, + setup_dclu, + 0, }; static char *gmcm_fields[] = { @@ -900,7 +900,7 @@ static struct validate amtc_validate = /* for amtc and dmfc */ amtc_valobj, 2, MACH_ID, - "mcmap.mach_id = %d and mcmap.clu_id = %d", + "mcm.mach_id = %d and mcm.clu_id = %d", 2, 0, 0, @@ -970,20 +970,20 @@ static struct valobj gsin_valobj[] = static struct validate gsin_validate = { - gsin_valobj, - 1, - 0, - 0, - 0, - 0, - access_service, - 0, - followup_glin, + gsin_valobj, + 1, + 0, + 0, + 0, + 0, + access_service, + 0, + followup_glin, }; static char *qgsv_fields[] = { - "enable", "inprogress", "harderror", - "service", + "enable", "inprogress", "harderror", + "service", }; static struct valobj qgsv_valobj[] = { @@ -993,15 +993,15 @@ static struct valobj qgsv_valobj[] = { }; static struct validate qgsv_validate = { - qgsv_valobj, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - qualified_get_server, + qgsv_valobj, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + qualified_get_server, }; static char *asin_fields[] = { @@ -1022,7 +1022,7 @@ static struct validate asin_validate = /* for asin, usin */ asin_valobj, 5, NAME, - "servers.name = UPPERCASE(LEFT('%s',SIZE(servers.name)))", + "s.name = uppercase(LEFT('%s',SIZE(s.name)))", 1, 0, 0, @@ -1034,7 +1034,7 @@ static struct validate rsve_validate = { asin_valobj, 1, NAME, - "services.name = uppercase('%s')", + "ss.name = uppercase('%s')", 1, 0, access_service, @@ -1050,7 +1050,7 @@ static struct validate ssif_validate = { asin_valobj, 1, NAME, - "services.name = uppercase('%s')", + "ss.name = uppercase('%s')", 1, 0, 0, @@ -1066,7 +1066,7 @@ static struct validate dsin_validate = { asin_valobj, 1, NAME, - "services.name = uppercase('%s')", + "ss.name = uppercase('%s')", 1, 0, 0, @@ -1082,8 +1082,8 @@ static char *gshi_fields[] = { }; static struct valobj gshi_valobj[] = { - { V_UPWILD, 0 }, - { V_UPWILD, 1 }, + { V_UPWILD, 0 }, + { V_UPWILD, 1 }, }; static struct validate gshi_validate = { @@ -1099,8 +1099,8 @@ static struct validate gshi_validate = { }; static char *qgsh_fields[] = { - "service", "enable", "override", "success", "inprogress", "hosterror", - "service", MACHINE, + "service", "enable", "override", "success", "inprogress", "hosterror", + "service", MACHINE, }; static struct valobj qgsh_valobj[] = { @@ -1112,15 +1112,15 @@ static struct valobj qgsh_valobj[] = { }; static struct validate qgsh_validate = { - qgsh_valobj, - 5, - 0, - 0, - 0, - 0, - 0, - 0, - qualified_get_serverhost, + qgsh_valobj, + 5, + 0, + 0, + 0, + 0, + 0, + 0, + qualified_get_serverhost, }; static char *ashi_fields[] = { @@ -1138,7 +1138,7 @@ static struct validate ashi_validate = /* ashi & ushi */ ashi_valobj, 3, SERVICE, - "serverhosts.service = UPPERCASE(LEFT('%s',SIZE(serverhosts.service))) and serverhosts.mach_id = %d", + "sh.service = uppercase(LEFT('%s',SIZE(sh.service))) AND sh.mach_id = %d", 2, 0, access_service, @@ -1151,7 +1151,7 @@ static struct validate rshe_validate = ashi_valobj, 3, SERVICE, - "serverhosts.service = uppercase('%s') and serverhosts.mach_id = %d", + "sh.service = uppercase('%s') AND sh.mach_id = %d", 2, 0, access_service, @@ -1164,7 +1164,7 @@ static struct validate ssho_validate = ashi_valobj, 3, SERVICE, - "serverhosts.service = uppercase('%s') and serverhosts.mach_id = %d", + "sh.service = uppercase('%s') AND sh.mach_id = %d", 2, 0, access_service, @@ -1173,9 +1173,9 @@ static struct validate ssho_validate = }; static char *sshi_fields[] = { - "service", MACHINE, "override", "success", "inprogress", - "hosterror", "errmsg", "ltt", "lts" -}; + "service", MACHINE, "override", "success", "inprogress", + "hosterror", "errmsg", "ltt", "lts" + }; static struct valobj sshi_valobj[] = { {V_NAME, 0, "servers", NAME, 0, MR_SERVICE}, @@ -1204,7 +1204,7 @@ static struct validate dshi_validate = ashi_valobj, 3, SERVICE, - "serverhosts.service = uppercase('%s') and serverhosts.mach_id = %d", + "sh.service = uppercase('%s') AND sh.mach_id = %d", 2, 0, access_service, @@ -1245,7 +1245,7 @@ static struct validate asha_validate = asha_valobj, 3, MACH_ID, - "hostaccess.mach_id = %d", + "ha.mach_id = %d", 1, MACH_ID, 0, @@ -1311,7 +1311,7 @@ static char *gfsp_fields[] = { LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners", "create", "lockertype", MOD1, MOD2, MOD3, }; - + static char *gfsg_fields[] = { LIST, LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners", @@ -1350,7 +1350,7 @@ static struct validate afil_validate = { afil_valobj, 8, LABEL, - "filesys.label = LEFT('%s',SIZE(filesys.label))", + "fs.label = LEFT('%s',SIZE(fs.label))", 1, FILSYS_ID, 0, @@ -1379,7 +1379,7 @@ static struct validate ufil_validate = { ufil_valobj, 9, LABEL, - "filesys.filsys_id = %d", + "fs.filsys_id = %d", 1, FILSYS_ID, 0, @@ -1400,7 +1400,7 @@ static struct validate dfil_validate = { dfil_valobj, 2, "label", - "filesys.filsys_id = %d", + "fs.filsys_id = %d", 1, 0, 0, @@ -1409,43 +1409,43 @@ static struct validate dfil_validate = { }; static char *gfgm_fields[] = { - "fsgroup", FILESYS, "sortkey" -}; + "fsgroup", FILESYS, "sortkey" + }; static struct valobj gfgm_valobj[] = { - {V_ID, 0, FILESYS, LABEL, FILSYS_ID, MR_FILESYS}, - {V_SORT, 1}, - {V_SORT, 0}, + {V_ID, 0, FILESYS, LABEL, FILSYS_ID, MR_FILESYS}, + {V_SORT, 1}, + {V_SORT, 0}, }; static struct validate gfgm_validate = { - gfgm_valobj, - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0, + gfgm_valobj, + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, }; static struct valobj aftg_valobj[] = { - {V_LOCK, 0, FILESYS, 0, FILSYS_ID, MR_DEADLOCK}, - {V_ID, 0, FILESYS, LABEL, FILSYS_ID, MR_FILESYS}, - {V_ID, 1, FILESYS, LABEL, FILSYS_ID, MR_FILESYS}, + {V_LOCK, 0, FILESYS, 0, FILSYS_ID, MR_DEADLOCK}, + {V_ID, 0, FILESYS, LABEL, FILSYS_ID, MR_FILESYS}, + {V_ID, 1, FILESYS, LABEL, FILSYS_ID, MR_FILESYS}, }; static struct validate aftg_validate = { - aftg_valobj, - 3, - "group_id", - "fsgroup.group_id = %d and fsgroup.filsys_id = %d", - 2, - 0, - 0, - 0, - 0, + aftg_valobj, + 3, + "group_id", + "fg.group_id = %d and fg.filsys_id = %d", + 2, + 0, + 0, + 0, + 0, }; static char *ganf_fields[] = { @@ -1483,7 +1483,7 @@ static struct validate anfp_validate = { anfp_valobj, 2, DIR, - "nfsphys.mach_id = %d and nfsphys.dir = LEFT('%s',SIZE(nfsphys.dir))", + "np.mach_id = %d and np.dir = LEFT('%s',SIZE(np.dir))", 2, "nfsphys_id", 0, @@ -1495,7 +1495,7 @@ static struct validate unfp_validate = { anfp_valobj, 2, DIR, - "nfsphys.mach_id = %d and nfsphys.dir = '%s'", + "np.mach_id = %d and np.dir = '%s'", 2, "nfsphys_id", 0, @@ -1515,7 +1515,7 @@ static struct validate dnfp_validate = { VOmach0, 1, DIR, - "nfsphys.mach_id = %d and nfsphys.dir = '%s'", + "np.mach_id = %d and np.dir = '%s'", 2, "nfsphys_id", 0, @@ -1578,7 +1578,7 @@ static struct validate aqot_validate = { aqot_valobj, 4, FILSYS_ID, - "quota.filsys_id = %d and quota.type = '%s' and quota.entity_id = %d", + "q.filsys_id = %d and q.type = '%s' and q.entity_id = %d", 3, 0, 0, @@ -1590,7 +1590,7 @@ static struct validate uqot_validate = { aqot_valobj, 4, FILSYS_ID, - "quota.filsys_id = %d and quota.type = '%s' and quota.entity_id = %d", + "q.filsys_id = %d and q.type = '%s' and q.entity_id = %d", 3, 0, 0, @@ -1602,7 +1602,7 @@ static struct validate dqot_validate = { aqot_valobj, 4, FILSYS_ID, - "quota.filsys_id = %d and quota.type = '%s' and quota.entity_id = %d", + "q.filsys_id = %d and q.type = '%s' and q.entity_id = %d", 3, 0, 0, @@ -1647,7 +1647,7 @@ static struct validate anfq_validate = { VOfilsys0user1, 3, FILSYS_ID, - "quota.filsys_id = %d and quota.type = 'USER' and quota.entity_id = %d", + "q.filsys_id = %d and q.type = 'USER' and q.entity_id = %d", 2, 0, 0, @@ -1659,7 +1659,7 @@ static struct validate unfq_validate = { VOfilsys0user1, 3, FILSYS_ID, - "quota.filsys_id = %d and quota.type = 'USER' and quota.entity_id = %d", + "q.filsys_id = %d and q.type = 'USER' and q.entity_id = %d", 2, 0, 0, @@ -1671,7 +1671,7 @@ static struct validate dnfq_validate = { VOfilsys0user1, 3, FILSYS_ID, - "quota.filsys_id = %d and quota.entity_id = %d", + "q.filsys_id = %d and q.entity_id = %d", 2, 0, 0, @@ -1713,7 +1713,7 @@ static struct validate alis_validate = { alis_valobj, 4, NAME, - "list.name = LEFT('%s',SIZE(list.name))", + "l.name = LEFT('%s',SIZE(l.name))", 1, LIST_ID, 0, @@ -1739,7 +1739,7 @@ static struct validate ulis_validate = { ulis_valobj, 5, NAME, - "list.list_id = %d", + "l.list_id = %d", 1, LIST_ID, access_list, @@ -1755,7 +1755,7 @@ static struct validate dlis_validate = { VOlist0, 1, NAME, - "list.list_id = %d", + "l.list_id = %d", 1, 0, access_list, @@ -1801,8 +1801,8 @@ static struct validate dmfl_validate = }; static char *gaus_fields[] = { - ACE_TYPE, ACE_NAME, - "use_type", "use_name", + ACE_TYPE, ACE_NAME, + "use_type", "use_name", }; static struct valobj gaus_valobj[] = { @@ -1811,20 +1811,20 @@ static struct valobj gaus_valobj[] = { }; static struct validate gaus_validate = { - gaus_valobj, - 2, - 0, - 0, - 0, - 0, - access_member, - 0, - get_ace_use, + gaus_valobj, + 2, + 0, + 0, + 0, + 0, + access_member, + 0, + get_ace_use, }; static char *qgli_fields[] = { - "active", "publicflg", "hidden", "maillist", "grouplist", - "list", + "active", "publicflg", "hidden", "maillist", "grouplist", + "list", }; static struct valobj qgli_valobj[] = { @@ -1836,15 +1836,15 @@ static struct valobj qgli_valobj[] = { }; static struct validate qgli_validate = { - qgli_valobj, - 5, - 0, - 0, - 0, - 0, - access_qgli, - 0, - qualified_get_lists, + qgli_valobj, + 5, + 0, + 0, + 0, + 0, + access_qgli, + 0, + qualified_get_lists, }; static char *gmol_fields[] = { @@ -1875,7 +1875,7 @@ static struct validate geml_validate = { 0, get_end_members_of_list, }; - + static char *glom_fields[] = { "member_type", "member_name", "list_name", "active", "publicflg", "hidden", "maillist", "grouplist", @@ -1917,9 +1917,9 @@ static struct validate cmol_validate = { }; static char *gzcl_fields[] = { - CLASS, - CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", - "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3, + CLASS, + CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", + "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3, }; static struct validate gzcl_validate = { @@ -1935,8 +1935,8 @@ static struct validate gzcl_validate = { }; static char *azcl_fields[] = { - CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", - "iws_type", "iws_name", "iui_type", "iui_name", + CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", + "iws_type", "iws_name", "iui_type", "iui_name", }; static struct valobj azcl_valobj[] = { @@ -1955,7 +1955,7 @@ static struct validate azcl_validate = { azcl_valobj, 9, CLASS, - "zephyr.class = LEFT('%s',SIZE(zephyr.class))", + "z.class = LEFT('%s',SIZE(z.class))", 1, 0, 0, @@ -1964,8 +1964,8 @@ static struct validate azcl_validate = { }; static char *uzcl_fields[] = { - CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name", - "iws_type", "iws_name", "iui_type", "iui_name", + CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name", + "iws_type", "iws_name", "iui_type", "iui_name", }; static struct valobj uzcl_valobj[] = { @@ -1984,7 +1984,7 @@ static struct validate uzcl_validate = { uzcl_valobj, 9, CLASS, - "zephyr.class = '%s'", + "z.class = '%s'", 1, 0, 0, @@ -1996,7 +1996,7 @@ static struct validate dzcl_validate = { 0, 0, CLASS, - "zephyr.class = '%s'", + "z.class = '%s'", 1, 0, 0, @@ -2006,18 +2006,18 @@ static struct validate dzcl_validate = { static char *gsvc_fields[] = { SERVICE, - SERVICE, "protocol", "port", DESC, MOD1, MOD2, MOD3 + SERVICE, "protocol", "port", DESC, MOD1, MOD2, MOD3, }; static char *asvc_fields[] = { - SERVICE, "protocol", "port", DESC + SERVICE, "protocol", "port", DESC, }; static struct validate asvc_validate = { VOchar0, 1, NAME, - "services.name = LEFT('%s',SIZE(services.name))", + "ss.name = LEFT('%s',SIZE(ss.name))", 1, 0, 0, @@ -2026,10 +2026,10 @@ static struct validate asvc_validate = { }; static char *gpce_fields[] = { - "printer", - "printer", "spooling_host", "spool_directory", "rprinter", - "quotaserver", "authenticate", "price", COMMENTS, - MOD1, MOD2, MOD3, + "printer", + "printer", "spooling_host", "spool_directory", "rprinter", + "quotaserver", "authenticate", "price", COMMENTS, + MOD1, MOD2, MOD3, }; static struct validate gpce_validate = { @@ -2045,22 +2045,22 @@ static struct validate gpce_validate = { }; static char *apce_fields[] = { - "printer", "spooling_host", "spool_directory", "rprinter", - "quotaserver", "authenticate", "price", COMMENTS, - MOD1, MOD2, MOD3, + "printer", "spooling_host", "spool_directory", "rprinter", + "quotaserver", "authenticate", "price", COMMENTS, + MOD1, MOD2, MOD3, }; static struct valobj apce_valobj[] = { - {V_CHAR, 0}, - {V_ID, 1, MACHINE, NAME, MACH_ID, MR_MACHINE}, - {V_ID, 4, MACHINE, NAME, MACH_ID, MR_MACHINE}, + {V_CHAR, 0}, + {V_ID, 1, MACHINE, NAME, MACH_ID, MR_MACHINE}, + {V_ID, 4, MACHINE, NAME, MACH_ID, MR_MACHINE}, }; static struct validate apce_validate = { apce_valobj, 3, NAME, - "printcap.name = LEFT('%s',SIZE(printcap.name))", + "pc.name = LEFT('%s',SIZE(pc.name))", 1, 0, 0, @@ -2072,7 +2072,7 @@ static struct validate dpce_validate = { 0, 0, NAME, - "printcap.name = '%s'", + "pc.name = '%s'", 1, 0, 0, @@ -2081,30 +2081,30 @@ static struct validate dpce_validate = { }; static char *gpcp_fields[] = { - "printer", - "printer", "spooling_host", "spool_directory", "rprinter", COMMENTS, - MOD1, MOD2, MOD3, + "printer", + "printer", "spooling_host", "spool_directory", "rprinter", COMMENTS, + MOD1, MOD2, MOD3, }; static char *gpdm_fields[] = { - NAME, - NAME, "rpcnum", "host", MOD1, MOD2, MOD3, + NAME, + NAME, "rpcnum", "host", MOD1, MOD2, MOD3, }; static char *apdm_fields[] = { - NAME, "rpcnum", "host" -}; + NAME, "rpcnum", "host" + }; static struct valobj apdm_valobj[] = { - {V_CHAR, 0}, - {V_ID, 2, MACHINE, NAME, MACH_ID, MR_MACHINE}, + {V_CHAR, 0}, + {V_ID, 2, MACHINE, NAME, MACH_ID, MR_MACHINE}, }; static struct validate apdm_validate = { apdm_valobj, 2, NAME, - "palladium.name = LEFT('%s',SIZE(palladium.name))", + "pal.name = LEFT('%s',SIZE(pal.name))", 1, 0, 0, @@ -2116,7 +2116,7 @@ static struct validate dpdm_validate = { 0, 0, NAME, - "palladium.name = '%s'", + "pal.name = '%s'", 1, 0, 0, @@ -2143,7 +2143,7 @@ static struct validate aali_validate = { aali_valobj, 3, "trans", - "alias.name = LEFT('%s',SIZE(alias.name)) and alias.type = '%s' and alias.trans = LEFT('%s',SIZE(alias.trans))", + "a.name = LEFT('%s',SIZE(a.name)) and a.type = '%s' and a.trans = LEFT('%s',SIZE(a.trans))", 3, 0, 0, @@ -2156,7 +2156,7 @@ static struct validate dali_validate = /* DELETE_ALIAS */ 0, 0, "trans", - "alias.name = '%s' and alias.type = '%s' and alias.trans = '%s'", + "a.name = '%s' and a.type = '%s' and a.trans = '%s'", 3, 0, 0, @@ -2193,7 +2193,7 @@ static struct validate aval_validate = /* for aval, uval, and dval */ VOchar0, 1, NAME, - "numvalues.name = LEFT('%s',SIZE(numvalues.name))", /* LEFT() only needed for aval */ + "val.name = LEFT('%s',SIZE(val.name))", /* LEFT() only needed for aval */ 1, 0, 0, @@ -2225,14 +2225,14 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle FROM users", + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle FROM users u", galo_fields, 6, - "users_id != 0", + "u.users_id != 0", 0, &VDsort0, }, - + { /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */ "get_all_active_logins", @@ -2240,89 +2240,89 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle FROM users", + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle FROM users u", galo_fields, 6, - "status = 1", + "u.status = 1", 0, &VDsort0, }, - + { - /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN */ - "get_user_account_by_login", - "gual", - RETRIEVE, - "u", - USERS, - "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", - gual_fields, - 15, - "u.login LIKE '%s' ESCAPE '*' AND u.users_id != 0 AND u.comment = str.string_id", - 1, - &gubl_validate, + /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN */ + "get_user_account_by_login", + "gual", + RETRIEVE, + "u", + USERS, + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", + gual_fields, + 15, + "u.login LIKE '%s' ESCAPE '*' AND u.users_id != 0 AND u.comment = str.string_id", + 1, + &gubl_validate, }, - + { - /* Q_GUAU - GET_USER_ACCOUNT_BY_UID */ - "get_user_account_by_uid", - "guau", - RETRIEVE, - "u", - USERS, - "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", - guau_fields, - 15, - "u.uid = %s AND u.users_id != 0 AND u.comment = str.string_id", - 1, - &gubu_validate, + /* Q_GUAU - GET_USER_ACCOUNT_BY_UID */ + "get_user_account_by_uid", + "guau", + RETRIEVE, + "u", + USERS, + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", + guau_fields, + 15, + "u.uid = %s AND u.users_id != 0 AND u.comment = str.string_id", + 1, + &gubu_validate, }, { - /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME */ - "get_user_account_by_name", - "guan", - RETRIEVE, - "u", - USERS, - "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", - guan_fields, - 15, - "u.first LIKE '%s' ESCAPE '*' AND u.last LIKE '%s' ESCAPE '*' AND u.users_id != 0 and u.comment = str.string_id", - 2, - &VDwild2sortf, + /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME */ + "get_user_account_by_name", + "guan", + RETRIEVE, + "u", + USERS, + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", + guan_fields, + 15, + "u.first LIKE '%s' ESCAPE '*' AND u.last LIKE '%s' ESCAPE '*' AND u.users_id != 0 and u.comment = str.string_id", + 2, + &VDwild2sortf, }, - + { - /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS */ - "get_user_account_by_class", - "guac", - RETRIEVE, - "u", - USERS, - "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", - guac_fields, - 15, - "u.type = UPPERCASE('%s') AND u.users_id != 0 AND u.comment = str.string_id", - 1, - &VDsortf, + /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS */ + "get_user_account_by_class", + "guac", + RETRIEVE, + "u", + USERS, + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", + guac_fields, + 15, + "u.type = uppercase('%s') AND u.users_id != 0 AND u.comment = str.string_id", + 1, + &VDsortf, }, - + { - /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID */ - "get_user_account_by_id", - "guai", - RETRIEVE, - "u", - USERS, - "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", - guam_fields, - 15, - "u.clearid LIKE '%s' ESCAPE '*' AND u.users_id != 0 AND u.comment = str.string_id", - 1, - &VDwildsortf, + /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID */ + "get_user_account_by_id", + "guai", + RETRIEVE, + "u", + USERS, + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, str.string, CHAR(u.signature), CHAR(u.secure), CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u, strings str", + guam_fields, + 15, + "u.clearid LIKE '%s' ESCAPE '*' AND u.users_id != 0 AND u.comment = str.string_id", + 1, + &VDwildsortf, }, - + { /* Q_GUBL - GET_USER_BY_LOGIN */ "get_user_by_login", @@ -2330,14 +2330,14 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users", + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u", gubl_fields, 12, - "login LIKE '%s' ESCAPE '*' AND users_id != 0", + "u.login LIKE '%s' ESCAPE '*' AND u.users_id != 0", 1, &gubl_validate, }, - + { /* Q_GUBU - GET_USER_BY_UID */ "get_user_by_uid", @@ -2345,14 +2345,14 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users", + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u", gubu_fields, 12, - "uid = %s AND users_id != 0", + "u.uid = %s AND u.users_id != 0", 1, &gubu_validate, }, - + { /* Q_GUBN - GET_USER_BY_NAME */ "get_user_by_name", @@ -2360,14 +2360,14 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users", + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u", gubn_fields, 12, - "first LIKE '%s' ESCAPE '*' AND last LIKE '%s' ESCAPE '*' AND users_id != 0", + "u.first LIKE '%s' ESCAPE '*' AND u.last LIKE '%s' ESCAPE '*' AND u.users_id != 0", 2, &gubn_validate, }, - + { /* Q_GUBC - GET_USER_BY_CLASS */ "get_user_by_class", @@ -2375,14 +2375,14 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users", + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u", gubc_fields, 12, - "type = uppercase('%s') AND users_id != 0", + "u.type = uppercase('%s') AND u.users_id != 0", 1, &VDsortf, }, - + { /* Q_GUBM - GET_USER_BY_MITID */ "get_user_by_mitid", @@ -2390,14 +2390,14 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users", + "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle, CHAR(u.status), CHAR(u.clearid), u.type, CHAR(u.modtime), CHAR(u.modby), u.modwith FROM users u", gubm_fields, 12, - "clearid LIKE '%s' ESCAPE '*' AND users_id != 0", + "u.clearid LIKE '%s' ESCAPE '*' AND u.users_id != 0", 1, &VDwildsortf, }, - + { /* Q_AUAC - ADD_USER_ACCOUNT */ /* uses prefetch_value() for users_id */ "add_user_account", @@ -2412,7 +2412,7 @@ struct query Queries2[] = { 0, &auac_validate, }, - + { /* Q_AUSR - ADD_USER */ /* uses prefetch_value() for users_id */ "add_user", @@ -2427,7 +2427,7 @@ struct query Queries2[] = { 0, &ausr_validate, }, - + { /* Q_RUSR - REGISTER_USER */ "register_user", @@ -2442,7 +2442,7 @@ struct query Queries2[] = { 0, &rusr_validate, }, - + { /* Q_UUAC - UPDATE_USER_ACCOUNT */ "update_user_account", @@ -2555,10 +2555,10 @@ struct query Queries2[] = { RETRIEVE, "k", "krbmap", - "CHAR(u.login), CHAR(s.string) FROM krbmap k, users u, strings s", + "CHAR(u.login), CHAR(s.string) FROM krbmap km, users u, strings str", gkum_fields, 2, - "u.login LIKE '%s' ESCAPE '*' AND s.string LIKE '%s' ESCAPE '*' AND k.users_id = u.users_id AND k.string_id = s.string_id", + "u.login LIKE '%s' ESCAPE '*' AND str.string LIKE '%s' ESCAPE '*' AND km.users_id = u.users_id AND km.string_id = str.string_id", 2, &VDwild2sort2, }, @@ -2600,10 +2600,10 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), fullname, nickname, home_addr, home_phone, office_addr, office_phone, department, affiliation, CHAR(fmodtime), CHAR(fmodby), fmodwith FROM users", + "CHAR(u.login), u.fullname, u.nickname, u.home_addr, u.home_phone, u.office_addr, u.office_phone, u.department, u.affiliation, CHAR(u.fmodtime), CHAR(u.fmodby), u.fmodwith FROM users u", gfbl_fields, 12, - "users_id = %d", + "u.users_id = %d", 1, &gfbl_validate, }, @@ -2630,10 +2630,10 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), potype, CHAR(pop_id) + ':' + CHAR(box_id), CHAR(pmodtime), CHAR(pmodby), pmodwith FROM users", + "CHAR(u.login), u.potype, CHAR(u.pop_id) + ':' + CHAR(u.box_id), CHAR(u.pmodtime), CHAR(u.pmodby), u.pmodwith FROM users u", gpob_fields, 6, - "users_id = %d", + "u.users_id = %d", 1, &gpob_validate, }, @@ -2645,10 +2645,10 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), potype, CHAR(pop_id) + ':' + CHAR(box_id) FROM users", + "CHAR(u.login), u.potype, CHAR(u.pop_id) + ':' + CHAR(u.box_id) FROM users u", gpox_fields, 3, - "potype != 'NONE'", + "u.potype != 'NONE'", 0, &gpox_validate, }, @@ -2660,10 +2660,10 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), potype, CHAR(pop_id) + ':' + CHAR(box_id) FROM users", + "CHAR(u.login), u.potype, CHAR(u.pop_id) + ':' + CHAR(u.box_id) FROM users u", gpox_fields, 3, - "potype = 'POP'", + "u.potype = 'POP'", 0, &gpox_validate }, @@ -2675,10 +2675,10 @@ struct query Queries2[] = { RETRIEVE, "u", USERS, - "CHAR(login), potype, CHAR(pop_id) + ':' + CHAR(box_id) FROM users", + "CHAR(u.login), u.potype, CHAR(u.pop_id) + ':' + CHAR(u.box_id) FROM users", gpox_fields, 3, - "potype = 'SMTP'", + "u.potype = 'SMTP'", 0, &gpox_validate }, @@ -2735,10 +2735,10 @@ struct query Queries2[] = { RETRIEVE, "m", MACHINE, - "CHAR(name), type, CHAR(modtime), CHAR(modby), modwith FROM machine", + "CHAR(m.name), m.type, CHAR(m.modtime), CHAR(m.modby), modwith FROM machine m", gmac_fields, 5, - "name LIKE '%s' ESCAPE '*' AND mach_id != 0", + "m.name LIKE '%s' ESCAPE '*' AND m.mach_id != 0", 1, &VDupwildsortf, }, @@ -2795,10 +2795,10 @@ struct query Queries2[] = { RETRIEVE, "c", CLUSTER, - "CHAR(name), description, location, CHAR(modtime), CHAR(modby), modwith FROM cluster", + "CHAR(c.name), c.description, c.location, CHAR(c.modtime), CHAR(c.modby), c.modwith FROM cluster c", gclu_fields, 6, - "name LIKE '%s' ESCAPE '*' AND clu_id != 0", + "c.name LIKE '%s' ESCAPE '*' AND c.clu_id != 0", 1, &VDwildsortf, }, @@ -2853,12 +2853,12 @@ struct query Queries2[] = { "get_machine_to_cluster_map", "gmcm", RETRIEVE, - "map", + "mcm", "mcmap", - "CHAR(m.name), CHAR(c.name) FROM machine m, cluster c, mcmap map", + "CHAR(m.name), CHAR(c.name) FROM machine m, cluster c, mcmap mcm", gmcm_fields, 2, - "m.name LIKE '%s' ESCAPE '*' AND c.name LIKE '%s' ESCAPE '*' AND map.clu_id = c.clu_id AND map.mach_id = m.mach_id", + "m.name LIKE '%s' ESCAPE '*' AND c.name LIKE '%s' ESCAPE '*' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id", 2, &gmcm_validate, }, @@ -2868,7 +2868,7 @@ struct query Queries2[] = { "add_machine_to_cluster", "amtc", APPEND, - "m", + "mcm", "mcmap", "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)", gmcm_fields, @@ -2883,7 +2883,7 @@ struct query Queries2[] = { "delete_machine_from_cluster", "dmfc", DELETE, - "m", + "mcm", "mcmap", 0, gmcm_fields, @@ -2898,12 +2898,12 @@ struct query Queries2[] = { "get_cluster_data", "gcld", RETRIEVE, - "s", "svc", - "CHAR(c.name), CHAR(s.serv_label), s.serv_cluster FROM svc s, cluster c", + "svc", + "CHAR(c.name), CHAR(svc.serv_label), svc.serv_cluster FROM svc svc, cluster c", gcld_fields, 3, - "c.clu_id = s.clu_id AND c.name LIKE '%s' ESCAPE '*' AND s.serv_label LIKE '%s' ESCAPE '*'", + "c.clu_id = svc.clu_id AND c.name LIKE '%s' ESCAPE '*' AND svc.serv_label LIKE '%s' ESCAPE '*'", 2, &VDwild2sort2, }, @@ -2913,7 +2913,7 @@ struct query Queries2[] = { "add_cluster_data", "acld", APPEND, - "s", + "svc", "svc", "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d,'%s','%s')", acld_fields, @@ -2928,7 +2928,7 @@ struct query Queries2[] = { "delete_cluster_data", "dcld", DELETE, - "s", + "svc", "svc", (char *)0, acld_fields, @@ -2945,10 +2945,10 @@ struct query Queries2[] = { RETRIEVE, "s", "servers", - "CHAR(name), CHAR(update_int), target_file, script, CHAR(dfgen), CHAR(dfcheck), type, CHAR(enable), CHAR(inprogress), CHAR(harderror), errmsg, acl_type, CHAR(acl_id), CHAR(modtime), CHAR(modby), modwith FROM servers", + "CHAR(s.name), CHAR(s.update_int), s.target_file, s.script, CHAR(s.dfgen), CHAR(s.dfcheck), s.type, CHAR(s.enable), CHAR(s.inprogress), CHAR(s.harderror), s.errmsg, s.acl_type, CHAR(s.acl_id), CHAR(s.modtime), CHAR(s.modby), s.modwith FROM servers s", gsin_fields, 16, - "name LIKE '%s' ESCAPE '*'", + "s.name LIKE '%s' ESCAPE '*'", 1, &gsin_validate, }, @@ -3063,7 +3063,7 @@ struct query Queries2[] = { "qualified_get_server_host", "qgsh", RETRIEVE, - 0, + "sh", "serverhosts", 0, qgsh_fields, @@ -3548,7 +3548,7 @@ struct query Queries2[] = { "quota SET quota = %s", aqot_fields, 1, - "quota.filsys_id = %d AND quota.type = '%s' AND quota.entity_id = %d", + "q.filsys_id = %d AND q.type = '%s' AND q.entity_id = %d", 3, &uqot_validate, }, @@ -3563,7 +3563,7 @@ struct query Queries2[] = { (char *)0, aqot_fields, 0, - "quota.filsys_id = %d AND quota.type = '%s' AND quota.entity_id = %d", + "q.filsys_id = %d AND q.type = '%s' AND q.entity_id = %d", 3, &dqot_validate, }, @@ -3665,10 +3665,10 @@ struct query Queries2[] = { RETRIEVE, "l", LIST, - "CHAR(name) FROM list", + "CHAR(l.name) FROM list l", glin_fields, 1, - "name LIKE '%s' ESCAPE '*' AND list_id != 0", + "l.name LIKE '%s' ESCAPE '*' AND l.list_id != 0", 1, &VDwild0, }, @@ -3845,10 +3845,10 @@ struct query Queries2[] = { RETRIEVE, "z", "zephyr", - "CHAR(class), xmt_type, CHAR(xmt_id),sub_type, CHAR(sub_id),iws_type, CHAR(iws_id),iui_type, CHAR(iui_id), CHAR(modtime), CHAR(modby), modwith FROM zephyr", + "CHAR(z.class), z.xmt_type, CHAR(z.xmt_id), z.sub_type, CHAR(z.sub_id), z.iws_type, CHAR(z.iws_id), z.iui_type, CHAR(z.iui_id), CHAR(z.modtime), CHAR(z.modby), z.modwith FROM zephyr z", gzcl_fields, 12, - "class LIKE '%s' ESCAPE '*'", + "z.class LIKE '%s' ESCAPE '*'", 1, &gzcl_validate, }, @@ -3903,12 +3903,12 @@ struct query Queries2[] = { "get_service", "gsvc", RETRIEVE, - "s", + "ss", "services", - "CHAR(name), protocol, CHAR(port), description, CHAR(modtime), CHAR(modby), modwith FROM services", + "CHAR(ss.name), ss.protocol, CHAR(ss.port), ss.description, CHAR(ss.modtime), CHAR(ss.modby), ss.modwith FROM services ss", gsvc_fields, 7, - "name LIKE '%s' ESCAPE '*'", + "ss.name LIKE '%s' ESCAPE '*'", 1, &VDwildsortf, }, @@ -3918,7 +3918,7 @@ struct query Queries2[] = { "add_service", "asvc", APPEND, - "s", + "ss", "services", "INTO services (name, protocol, port, description) VALUES ('%s','%s',%s,'%s')", asvc_fields, @@ -3933,7 +3933,7 @@ struct query Queries2[] = { "delete_service", "dsvc", DELETE, - "s", + "ss", "services", 0, asvc_fields, @@ -3948,12 +3948,12 @@ struct query Queries2[] = { "get_printcap_entry", "gpce", RETRIEVE, - "p", + "pc", "printcap", - "CHAR(p.name), CHAR(m.name), p.dir, p.rp, CHAR(p.quotaserver), CHAR(p.auth), CHAR(p.price), p.comments, CHAR(p.modtime), CHAR(p.modby), p.modwith FROM printcap p, machine m", + "CHAR(pc.name), CHAR(m.name), pc.dir, pc.rp, CHAR(pc.quotaserver), CHAR(pc.auth), CHAR(pc.price), pc.comments, CHAR(pc.modtime), CHAR(pc.modby), pc.modwith FROM printcap pc, machine m", gpce_fields, 11, - "p.name LIKE '%s' ESCAPE '*' AND m.mach_id = p.mach_id", + "pc.name LIKE '%s' ESCAPE '*' AND m.mach_id = pc.mach_id", 1, &gpce_validate, }, @@ -3963,7 +3963,7 @@ struct query Queries2[] = { "add_printcap_entry", "apce", APPEND, - "p", + "pc", "printcap", "INTO printcap (name, mach_id, dir, rp, quotaserver, auth, price, comments) VALUES ('%s',%d,'%s','%s',%d,%s,%s,'%s')", apce_fields, @@ -3978,7 +3978,7 @@ struct query Queries2[] = { "delete_printcap_entry", "dpce", DELETE, - "p", + "pc", "printcap", 0, apce_fields, @@ -3993,12 +3993,12 @@ struct query Queries2[] = { "get_printcap", "gpcp", RETRIEVE, - "p", + "pc", "printcap", - "CHAR(p.name), CHAR(m.name), p.dir, p.rp, p.comments, CHAR(p.modtime), CHAR(p.modby), p.modwith FROM printcap p, machine m", + "CHAR(pc.name), CHAR(m.name), pc.dir, pc.rp, pc.comments, CHAR(pc.modtime), CHAR(pc.modby), pc.modwith FROM printcap pc, machine m", gpcp_fields, 8, - "p.name LIKE '%s' ESCAPE '*' AND m.mach_id = p.mach_id", + "pc.name LIKE '%s' ESCAPE '*' AND m.mach_id = pc.mach_id", 1, &VDwildsortf, }, @@ -4008,7 +4008,7 @@ struct query Queries2[] = { "delete_printcap", "dpcp", DELETE, - "p", + "pc", "printcap", 0, apce_fields, @@ -4023,12 +4023,12 @@ struct query Queries2[] = { "get_palladium", "gpdm", RETRIEVE, - "p", + "pal", "palladium", - "CHAR(p.name), CHAR(p.ident), CHAR(m.name), CHAR(p.modtime), CHAR(p.modby), p.modwith FROM palladium p, machine m", + "CHAR(pal.name), CHAR(pal.ident), CHAR(m.name), CHAR(pal.modtime), CHAR(pal.modby), pal.modwith FROM palladium pal, machine m", gpdm_fields, 6, - "p.name LIKE '%s' ESCAPE '*' AND m.mach_id = p.mach_id", + "pal.name LIKE '%s' ESCAPE '*' AND m.mach_id = pal.mach_id", 1, &VDwildsortf, }, @@ -4038,7 +4038,7 @@ struct query Queries2[] = { "add_palladium", "apdm", APPEND, - "p", + "pal", "palladium", "INTO palladium (name, ident, mach_id) VALUES ('%s',%s,%d)", apdm_fields, @@ -4053,7 +4053,7 @@ struct query Queries2[] = { "delete_palladium", "dpdm", DELETE, - "p", + "pal", "palladium", 0, apdm_fields, @@ -4070,10 +4070,10 @@ struct query Queries2[] = { RETRIEVE, "a", "alias", - "CHAR(name), CHAR(type), CHAR(trans) FROM alias", + "CHAR(a.name), CHAR(a.type), CHAR(a.trans) FROM alias a", gali_fields, 3, - "name LIKE '%s' ESCAPE '*' AND type LIKE '%s' ESCAPE '*' AND trans LIKE '%s' ESCAPE '*'", + "a.name LIKE '%s' ESCAPE '*' AND a.type LIKE '%s' ESCAPE '*' AND a.trans LIKE '%s' ESCAPE '*'", 3, &VDwild3sort1, }, @@ -4113,12 +4113,12 @@ struct query Queries2[] = { "get_value", "gval", RETRIEVE, - "v", + "val", "numvalues", - "CHAR(value) FROM numvalues", + "CHAR(val.value) FROM numvalues val", gval_fields, 1, - "name = '%s'", + "val.name = '%s'", 1, &gval_validate, }, @@ -4128,7 +4128,7 @@ struct query Queries2[] = { "add_value", "aval", APPEND, - "v", + "val", "numvalues", "INTO numvalues (name, value) VALUES ('%s', %s)", aval_fields, @@ -4143,7 +4143,7 @@ struct query Queries2[] = { "update_value", "uval", UPDATE, - "v", + "val", "numvalues", "numvalues SET value = %s", aval_fields, @@ -4158,7 +4158,7 @@ struct query Queries2[] = { "delete_value", "dval", DELETE, - "v", + "val", "numvalues", (char *)0, dval_fields, @@ -4175,7 +4175,7 @@ struct query Queries2[] = { RETRIEVE, "tbs", "tblstats", - "table_name, CHAR(appends), CHAR(updates), CHAR(deletes), CHAR(modtime) FROM tblstats", + "tbs.table_name, CHAR(tbs.appends), CHAR(tbs.updates), CHAR(tbs.deletes), CHAR(tbs.modtime) FROM tblstats tbs", gats_fields, 5, (char *)0, -- 2.45.2