int access_qgli();
int access_service();
int access_filesys();
+int access_host();
+int access_ahal();
+int access_snt();
/* Query Setup Routines */
+int prefetch_value();
+int prefetch_filesys();
int setup_ausr();
int setup_dusr();
int setup_spop();
int setup_dpob();
int setup_dmac();
+int setup_dsnet();
int setup_dclu();
int setup_alis();
int setup_dlis();
int setup_afil();
int setup_ufil();
int setup_dfil();
+int setup_aftg();
int setup_dnfp();
int setup_dqot();
int setup_sshi();
int setup_akum();
+int setup_dsnt();
+int setup_ahst();
+int setup_ahal();
/* Query Followup Routines */
int followup_fix_modby();
int followup_gpob();
int followup_glin();
int followup_aqot();
+int followup_dqot();
int followup_gzcl();
int followup_gsha();
int followup_gqot();
+int followup_gpce();
+int followup_guax();
+int followup_uuac();
+int followup_gsnt();
+int followup_ghst();
int set_modtime();
int set_modtime_by_id();
int get_ace_use();
int qualified_get_lists();
int get_members_of_list();
+int get_end_members_of_list();
int qualified_get_server();
int qualified_get_serverhost();
int trigger_dcm();
int count_members_of_list();
int get_lists_of_member();
int register_user();
+int _sdl_followup();
\f
static char ACE_NAME[] = "ace_name";
static char ACE_TYPE[] = "ace_type";
+static char ADDRESS[] = "address";
+static char ALIAS[] = "alias";
static char CLASS[] = "class";
static char CLU_ID[] = "clu_id";
static char CLUSTER[] = "cluster";
+static char COMMENTS[] = "comments";
static char DESC[] = "description";
static char DEVICE[] = "device";
static char DIR[] = "dir";
static char MACH_ID[] = "mach_id";
static char MACHINE[] = "machine";
static char MIDDLE[] = "middle";
-static char MIT_ID[] = "mit_id";
+static char MIT_ID[] = "clearid";
static char MOD1[] = "modtime";
static char MOD2[] = "modby";
static char MOD3[] = "modwith";
static char NAME[] = "name";
static char QUOTA[] = "quota";
static char QUOTA_TYPE[] = "quota_type";
+static char SECURE[] = "secure";
static char SERVICE[] = "service";
static char SHELL[] = "shell";
+static char SIGNATURE[] = "signature";
+static char SNET_ID[] = "snet_id";
+static char SUBNET[] = "subnet";
static char STATUS[] = "status";
static char TYPE[] = "type";
static char USERS[] = "users";
*/
static struct valobj VOsort0[] = {
- {V_SORT, 0, 0, 0, 0, 0},
+ {V_SORT, 0},
+};
+
+static struct valobj VOwild0[] = {
+ {V_WILD, 0},
+};
+
+static struct valobj VOupwild0[] = {
+ {V_UPWILD, 0},
+};
+
+static struct valobj VOwild0sort[] = {
+ {V_WILD, 0},
+ {V_SORT, 0},
+};
+
+static struct valobj VOupwild0sort[] = {
+ {V_UPWILD, 0},
+ {V_SORT, 0},
+};
+
+static struct valobj VOwild01sort0[] = {
+ {V_WILD, 0},
+ {V_WILD, 1},
+ {V_SORT, 0},
+};
+
+static struct valobj VOwild01sort01[] = {
+ {V_WILD, 0},
+ {V_WILD, 1},
+ {V_SORT, 0},
+ {V_SORT, 1},
+};
+
+static struct valobj VOwild012sort0[] = { /* get_alias */
+ {V_WILD, 0},
+ {V_WILD, 1},
+ {V_WILD, 2},
+ {V_SORT, 0},
};
static struct valobj VOdate1[] = {
*/
static struct validate VDmach = { VOmach0, 1 };
+static struct validate VDsort0= { VOsort0, 1 };
+static struct validate VDwild0= { VOwild0, 1 };
+static struct validate VDupwild0= { VOupwild0, 1 };
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,
+};
+
+static struct validate VDwild2sortf = {
+ 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,
};
LOGIN, UID, SHELL, LAST, FIRST, MIDDLE,
};
+static char *gual_fields[] = {
+ LOGIN,
+ 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,
- MIT_ID, CLASS, MOD1, MOD2, MOD3
+ MIT_ID, CLASS, MOD1, MOD2, MOD3,
};
-static struct validate gubx_validate = /* gubl, gubu */
+static struct validate gubl_validate =
{
- VOsort0,
- 1,
+ VOwild0sort,
+ 2,
0,
0,
0,
0,
access_login,
0,
- followup_fix_modby,
+ followup_guax,
+};
+
+static char *guau_fields[] = {
+ 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,
+};
+
+static struct validate guan_validate =
+{
+ VOwild01sort01,
+ 4,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ followup_guax,
+};
+
+static char *guac_fields[] = {
+ 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,
};
static char *gubu_fields[] = {
MIT_ID, CLASS, MOD1, MOD2, MOD3,
};
+static struct validate gubu_validate =
+{
+ VOsort0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ access_login,
+ 0,
+ followup_fix_modby,
+};
+
static char *gubn_fields[] = {
FIRST, LAST,
LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
MIT_ID, CLASS, MOD1, MOD2, MOD3,
};
+static struct validate gubn_validate =
+{
+ VOwild01sort0,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ followup_fix_modby,
+};
+
static char *gubc_fields[] = {
CLASS,
LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
MIT_ID, CLASS, MOD1, MOD2, MOD3,
};
-static char *ausr_fields[] = {
+static char *auac_fields[] = {
LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
- MIT_ID, CLASS,
+ MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE,
};
-static struct valobj ausr_valobj[] = {
+static struct valobj auac_valobj[] = {
{V_LOCK, 0, USERS, 0, USERS_ID, MR_DEADLOCK},
{V_CHAR, 0},
{V_CHAR, 3},
{V_CHAR, 5},
{V_CHAR, 7},
{V_TYPE, 8, CLASS, 0, 0, MR_BAD_CLASS},
+ {V_ID, 9, "strings", "string", "string_id", MR_NO_MATCH},
+};
+
+static struct validate auac_validate = {
+ auac_valobj,
+ 8,
+ LOGIN,
+ "login = LEFT('%s',SIZE(login))",
+ 1,
+ USERS_ID,
+ 0,
+ setup_ausr,
+ followup_ausr,
};
static struct validate ausr_validate = {
- ausr_valobj,
+ auac_valobj,
7,
LOGIN,
- "u.login = \"%s\"",
+ "login = LEFT('%s',SIZE(login))",
1,
USERS_ID,
0,
static char *rusr_fields[] = {
UID, LOGIN, "fs_type"
-};
+ };
static struct valobj rusr_valobj[] = {
{V_LOCK, 0, USERS, 0, USERS_ID, MR_DEADLOCK},
0,
};
-static char *uusr_fields[] = {
+static char *uuac_fields[] = {
LOGIN,
"newlogin", UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
- MIT_ID, CLASS,
+ MIT_ID, CLASS, COMMENTS, SIGNATURE, SECURE,
+};
+
+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},
};
-static struct valobj uusr_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},
+static struct validate uuac_validate = {
+ uuac_valobj,
+ 9,
+ 0,
+ 0,
+ 0,
+ USERS_ID,
+ 0,
+ setup_ausr,
+ followup_uuac,
};
static struct validate uusr_validate = {
- uusr_valobj,
+ uuac_valobj,
8,
0,
0,
0,
USERS_ID,
0,
- 0,
+ setup_ausr,
set_modtime_by_id,
};
STATUS,
};
+static char *uuss_fields[] = {
+ LOGIN,
+ SECURE,
+};
+
static struct validate uust_validate = {
VOuser0lock,
2,
};
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 = {
};
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,
- "k.users_id = %d or k.string_id = %d",
- 2,
- USERS_ID,
- access_user,
- setup_akum,
- 0
+ akum_valobj,
+ 1,
+ USERS_ID,
+ "users_id = %d or string_id = %d",
+ 2,
+ USERS_ID,
+ access_user,
+ setup_akum,
+ 0,
};
static struct validate dkum_validate =
{
- akum_valobj,
- 2,
- USERS_ID,
- "k.users_id = %d and k.string_id = %d",
- 2,
- USERS_ID,
- access_user,
- 0,
- 0
+ akum_valobj,
+ 2,
+ USERS_ID,
+ "users_id = %d and string_id = %d",
+ 2,
+ USERS_ID,
+ access_user,
+ 0,
+ 0,
};
static char *gfbl_fields[] = {
LOGIN,
LOGIN, "fullname", "nickname", "home_addr",
- "home_phone", "office_address", "office_phone", "mit_dept",
- "mit_affil", MOD1, MOD2, MOD3,
+ "home_phone", "office_addr", "office_phone", "department",
+ "affiliation", MOD1, MOD2, MOD3,
};
static struct validate gfbl_validate = {
static char *ufbl_fields[] = {
LOGIN,
"fullname", "nickname", "home_addr",
- "home_phone", "office_address", "office_phone", "mit_dept",
- "mit_affil",
+ "home_phone", "office_addr", "office_phone", "department",
+ "affiliation",
};
static struct validate ufbl_validate = {
VOuser0,
1,
"potype",
- "u.potype != \"NONE\" and u.users_id=%d",
+ "potype != 'NONE' and users_id=%d",
1,
0,
access_user,
NAME, TYPE, MOD1, MOD2, MOD3,
};
-static char *amac_fields[] = {
- NAME, TYPE
+static char *ghst_fields[] = {
+ NAME, ADDRESS, "location", "network",
+ NAME, "vendor", "model", "os", "location", "contact", "use", "status", "status_change", "network", ADDRESS, ACE_TYPE, ACE_NAME, "admin_comment", "ops_comment", "created", "creator", "inuse", MOD1, MOD2, MOD3,
+};
+
+static struct valobj ghst_valobj[] = {
+ {V_UPWILD, 0},
+ {V_UPWILD, 1},
+ {V_UPWILD, 2},
+ {V_UPWILD, 3},
+ {V_SORT, 0},
+};
+
+static struct validate ghst_validate = {
+ ghst_valobj,
+ 5,
+ 0,
+ 0,
+ 0,
+ 0,
+ access_host,
+ 0,
+ followup_ghst,
+};
+
+static char *ahst_fields[] = {
+ NAME, "vendor", "model", "os", "location", "contact", "use", "status", SUBNET, ADDRESS, ACE_TYPE, ACE_NAME, "admin_comment", "ops_comment",
};
-static struct valobj amac_valobj[] = {
+static struct valobj ahst_valobj[] = {
{V_CHAR, 0},
+ {V_CHAR, 1},
+ {V_CHAR, 2},
+ {V_CHAR, 3},
+ {V_CHAR, 4},
{V_LOCK, 0, MACHINE, 0, MACH_ID, MR_DEADLOCK},
- {V_TYPE, 1, "mac_type", 0, 0, MR_TYPE},
+ {V_ID, 8, SUBNET, NAME, SNET_ID, MR_SUBNET},
+ {V_TYPE, 10, ACE_TYPE, 0, 0, MR_ACE},
+ {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
+ {V_ID, 12, "strings", "string", "string_id", MR_NO_MATCH},
+ {V_ID, 13, "strings", "string", "string_id", MR_NO_MATCH},
};
-static struct validate amac_validate = {
- amac_valobj,
- 3,
+static struct validate ahst_validate = {
+ ahst_valobj,
+ 11,
NAME,
- "m.name = uppercase(\"%s\")",
+ "name = uppercase(LEFT('%s',SIZE(name)))",
1,
MACH_ID,
+ access_host,
+ setup_ahst,
+ set_uppercase_modtime,
+};
+
+static char *uhst_fields[] = {
+ NAME,
+ "newname", "vendor", "model", "os", "location", "contact", "use", "status", SUBNET, ADDRESS, ACE_TYPE, ACE_NAME, "admin_comment", "ops_comment",
+};
+
+static struct valobj uhst_valobj[] = {
+ {V_CHAR, 0},
+ {V_ID, 0, MACHINE, NAME, MACH_ID, MR_MACHINE},
+ {V_RENAME, 1, MACHINE, NAME, MACH_ID, MR_NOT_UNIQUE},
+ {V_CHAR, 2},
+ {V_CHAR, 3},
+ {V_CHAR, 4},
+ {V_CHAR, 5},
+ {V_LOCK, 0, MACHINE, 0, MACH_ID, MR_DEADLOCK},
+ {V_ID, 9, SUBNET, NAME, SNET_ID, MR_SUBNET},
+ {V_TYPE, 11, ACE_TYPE, 0, 0, MR_ACE},
+ {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
+ {V_ID, 13, "strings", "string", "string_id", MR_NO_MATCH},
+ {V_ID, 14, "strings", "string", "string_id", MR_NO_MATCH},
+};
+
+static struct validate uhst_validate = {
+ uhst_valobj,
+ 13,
0,
0,
- set_uppercase_modtime,
+ 0,
+ MACH_ID,
+ access_host,
+ setup_ahst,
+ set_modtime_by_id,
};
-static char *umac_fields[] = {
+static char *dhst_fields[] = {
NAME,
- "newname", TYPE,
};
-static struct valobj umac_valobj[] = {
+static struct valobj dhst_valobj[] = {
{V_LOCK, 0, MACHINE, 0, MACH_ID, MR_DEADLOCK},
{V_ID, 0, MACHINE, NAME, MACH_ID, MR_MACHINE},
- {V_RENAME, 1, MACHINE, NAME, MACH_ID, MR_NOT_UNIQUE},
- {V_TYPE, 2, "mac_type", 0, 0, MR_TYPE},
};
-static struct validate umac_validate = {
- umac_valobj,
- 4,
+static struct validate dhst_validate = {
+ dhst_valobj,
+ 2,
+ 0,
0,
0,
0,
+ 0,
+ setup_dmac,
+ 0,
+};
+
+static char *ghal_fields[] = {
+ ALIAS, "canonical_hostname",
+ ALIAS, "canonical_hostname"
+};
+
+static struct valobj ghal_valobj[] = {
+ {V_UPWILD, 0},
+ {V_UPWILD, 1},
+ {V_SORT, 0},
+};
+
+static struct validate ghal_validate = {
+ ghal_valobj,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ access_ahal,
+ 0,
+ 0,
+};
+
+static struct valobj ahal_valobj[] = {
+ {V_CHAR, 0},
+ {V_UPWILD, 0},
+ {V_ID, 1, MACHINE, NAME, MACH_ID, MR_MACHINE},
+};
+
+static struct validate ahal_validate = {
+ ahal_valobj,
+ 3,
+ NAME,
+ "name = LEFT('%s',SIZE(name))",
+ 1,
+ MACH_ID,
+ access_ahal,
+ setup_ahal,
+ 0,
+};
+
+static struct valobj dhal_valobj[] = {
+ {V_UPWILD, 0},
+ {V_LOCK, 0, MACHINE, 0, MACH_ID, MR_DEADLOCK},
+ {V_ID, 1, MACHINE, NAME, MACH_ID, MR_MACHINE},
+};
+
+static struct validate dhal_validate = {
+ dhal_valobj,
+ 3,
+ NAME,
+ "name = LEFT('%s',SIZE(name)) AND mach_id = %d",
+ 2,
MACH_ID,
+ access_ahal,
0,
0,
- set_modtime_by_id,
};
-static char *dmac_fields[] = {
+static char *gsnt_fields[] = {
+ NAME,
+ NAME, DESC, ADDRESS, "mask", "low", "high", "prefix", ACE_TYPE, ACE_NAME,
+ MOD1, MOD2, MOD3
+};
+
+static struct valobj gsnt_valobj[] = {
+ {V_UPWILD, 0},
+ {V_SORT, 0},
+};
+
+static struct validate gsnt_validate = {
+ gsnt_valobj,
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
+ access_snt,
+ 0,
+ followup_gsnt,
+};
+
+static char *asnt_fields[] = {
+ NAME, DESC, ADDRESS, "mask", "low", "high", "prefix", ACE_TYPE, ACE_NAME,
+};
+
+static struct valobj asnt_valobj[] = {
+ {V_LOCK, 0, SUBNET, 0, SNET_ID, MR_DEADLOCK},
+ {V_CHAR, 0},
+ {V_TYPE, 7, ACE_TYPE, 0, 0, MR_ACE},
+ {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
+};
+
+static struct validate asnt_validate =
+{
+ asnt_valobj,
+ 4,
+ NAME,
+ "name = uppercase(LEFT('%s',SIZE(name)))",
+ 1,
+ SNET_ID,
+ 0,
+ prefetch_value,
+ set_uppercase_modtime,
+};
+
+static char *usnt_fields[] = {
+ NAME,
+ "newname", DESC, ADDRESS, "mask", "low", "high", "prefix", ACE_TYPE, ACE_NAME,
+};
+
+static struct valobj usnt_valobj[] = {
+ {V_LOCK, 0, SUBNET, 0, SNET_ID, MR_DEADLOCK},
+ {V_ID, 0, SUBNET, NAME, SNET_ID, MR_NO_MATCH},
+ {V_RENAME, 1, SUBNET, NAME, SNET_ID, MR_NOT_UNIQUE},
+ {V_TYPE, 8, ACE_TYPE, 0, 0, MR_ACE},
+ {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
+};
+
+static struct validate usnt_validate =
+{
+ usnt_valobj,
+ 5,
+ NAME,
+ "snet_id = %d",
+ 1,
+ SNET_ID,
+ 0,
+ 0,
+ set_modtime_by_id,
+};
+
+static char *dsnt_fields[] = {
NAME,
};
-static struct valobj dmac_valobj[] = {
- {V_LOCK, 0, MACHINE, 0, MACH_ID, MR_DEADLOCK},
- {V_ID, 0, MACHINE, NAME, MACH_ID, MR_MACHINE},
+static struct valobj dsnt_valobj[] = {
+ {V_LOCK, 0, SUBNET, 0, SNET_ID, MR_DEADLOCK},
+ {V_ID, 0, SUBNET, NAME, SNET_ID, MR_SUBNET},
};
-static struct validate dmac_validate = {
- dmac_valobj,
+static struct validate dsnt_validate = {
+ dsnt_valobj,
2,
0,
0,
0,
0,
0,
- setup_dmac,
+ setup_dsnt,
0,
};
static char *aclu_fields[] = {
NAME, DESC, LOCATION,
};
-
+
static struct valobj aclu_valobj[] = {
{V_LOCK, 0, CLUSTER, 0, CLU_ID, MR_DEADLOCK},
{V_CHAR, 0}
};
-static struct validate aclu_validate = /* for aclu */
+static struct validate aclu_validate =
{
aclu_valobj,
2,
NAME,
- "c.name = \"%s\"",
+ "name = LEFT('%s',SIZE(name))",
1,
- "clu_id",
- 0,
+ CLU_ID,
0,
+ prefetch_value,
set_modtime,
};
};
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[] = {
MACHINE, CLUSTER,
};
+static struct valobj gmcm_valobj[] =
+{
+ {V_UPWILD, 0},
+ {V_WILD, 1},
+ {V_SORT, 0},
+ {V_SORT, 1},
+};
+
+static struct validate gmcm_validate = { gmcm_valobj, 4 };
+
static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
{ /* DELETE_MACHINE_FROM_CLUSTER */
{V_ID, 0, MACHINE, NAME, MACH_ID, MR_MACHINE},
amtc_valobj,
2,
MACH_ID,
- "m.mach_id = %d and m.clu_id = %d",
+ "mach_id = %d and clu_id = %d",
2,
0,
0,
static struct valobj acld_valobj[] =
{
{V_ID, 0, CLUSTER, NAME, CLU_ID, MR_CLUSTER},
+ {V_CHAR, 1},
{V_CHAR, 2},
};
-static struct validate acld_validate = /* ADD_CLUSTER_DATA */
-{ /* DELETE_CLUSTER_DATA */
+static struct validate acld_validate =
+{
acld_valobj,
+ 3,
+ CLU_ID,
+ "clu_id = %d AND serv_label = '%s' AND serv_cluster = LEFT('%s',SIZE(serv_cluster))",
+ 3,
+ 0,
+ 0,
+ 0,
+ set_cluster_modtime_by_id,
+};
+
+static struct valobj dcld_valobj[] =
+{
+ {V_ID, 0, CLUSTER, NAME, CLU_ID, MR_CLUSTER},
+ {V_CHAR, 2},
+};
+
+static struct validate dcld_validate =
+{
+ dcld_valobj,
2,
CLU_ID,
- "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
+ "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
3,
0,
0,
ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
};
+static struct valobj gsin_valobj[] =
+{
+ { V_UPWILD, 0 },
+};
+
static struct validate gsin_validate =
{
- 0,
- 0,
- 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[] = {
};
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[] = {
asin_valobj,
5,
NAME,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase(LEFT('%s',SIZE(name)))",
1,
0,
0,
asin_valobj,
1,
NAME,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase('%s')",
1,
0,
access_service,
asin_valobj,
1,
NAME,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase('%s')",
1,
0,
0,
asin_valobj,
1,
NAME,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase('%s')",
1,
0,
0,
"value3", MOD1, MOD2, MOD3,
};
+static struct valobj gshi_valobj[] = {
+ { V_UPWILD, 0 },
+ { V_UPWILD, 1 },
+};
+
static struct validate gshi_validate = {
- 0,
- 0,
+ gshi_valobj,
+ 2,
0,
0,
0,
};
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[] = {
};
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[] = {
ashi_valobj,
3,
SERVICE,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase(LEFT('%s',SIZE(service))) AND mach_id = %d",
2,
0,
access_service,
ashi_valobj,
3,
SERVICE,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase('%s') AND mach_id = %d",
2,
0,
access_service,
ashi_valobj,
3,
SERVICE,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase('%s') AND mach_id = %d",
2,
0,
access_service,
};
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},
+ {V_ID, 1, MACHINE, NAME, MACH_ID, MR_MACHINE}, /** Was this ok to add? */
};
static struct validate sshi_validate =
{
sshi_valobj,
- 1,
+ 2,
0,
0,
0,
ashi_valobj,
3,
SERVICE,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase('%s') AND mach_id = %d",
2,
0,
access_service,
static struct validate gsha_validate =
{
- 0,
- 0,
+ VOupwild0,
+ 1,
0,
0,
0,
asha_valobj,
3,
MACH_ID,
- "ha.mach_id = %d",
+ "mach_id = %d",
1,
MACH_ID,
0,
static char *gfsl_fields[] = {
LABEL,
- LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
+ LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners",
"create", "lockertype", MOD1, MOD2, MOD3,
};
static char *gfsm_fields[] = {
MACHINE,
- LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
+ LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners",
"create", "lockertype", MOD1, MOD2, MOD3,
};
static char *gfsn_fields[] = {
MACHINE, "parition",
- LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
+ LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners",
+ "create", "lockertype", MOD1, MOD2, MOD3,
+};
+
+static struct valobj gfsn_valobj[] =
+{
+ {V_ID, 0, MACHINE, NAME, MACH_ID, MR_MACHINE},
+ {V_WILD, 1},
+};
+
+static struct validate gfsn_validate = {
+ gfsn_valobj,
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ followup_fix_modby,
+};
+
+static char *gfsp_fields[] = {
+ "path",
+ 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",
+ LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners",
"create", "lockertype", MOD1, MOD2, MOD3,
};
};
static char *afil_fields[] = {
- LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
+ LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners",
"create", "lockertype",
};
afil_valobj,
8,
LABEL,
- "fs.label = \"%s\"",
+ "label = LEFT('%s',SIZE(label))",
1,
FILSYS_ID,
0,
};
static char *ufil_fields[] = {
- LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments",
+ LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", COMMENTS,
"owner", "owners", "create", "lockertype",
};
ufil_valobj,
9,
LABEL,
- "fs.filsys_id = %d",
+ "filsys_id = %d",
1,
FILSYS_ID,
0,
dfil_valobj,
2,
"label",
- "fs.filsys_id = %d",
+ "filsys_id = %d",
1,
0,
0,
};
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",
- "fg.group_id = %d and fg.filsys_id = %d",
- 2,
- 0,
- 0,
- 0,
- 0,
+ aftg_valobj,
+ 3,
+ "group_id",
+ "group_id = %d and filsys_id = %d",
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
};
static char *ganf_fields[] = {
MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
};
+static struct valobj gnfp_valobj[] = {
+ {V_ID, 0, MACHINE, NAME, MACH_ID, MR_MACHINE},
+ {V_WILD, 1},
+};
+
static struct validate gnfp_validate = {
- VOmach0,
- 1,
+ gnfp_valobj,
+ 2,
0,
0,
0,
anfp_valobj,
2,
DIR,
- "np.mach_id = %d and np.dir = \"%s\"",
+ "mach_id = %d and dir = LEFT('%s',SIZE(dir))",
+ 2,
+ "nfsphys_id",
+ 0,
+ prefetch_value,
+ set_nfsphys_modtime,
+};
+
+static struct validate unfp_validate = {
+ anfp_valobj,
+ 2,
+ DIR,
+ "mach_id = %d and dir = '%s'",
2,
"nfsphys_id",
0,
set_nfsphys_modtime,
};
+static char *ajnf_fields[] = {
+ MACHINE, DIR, "adjustment",
+};
+
static char *dnfp_fields[] = {
MACHINE, DIR,
};
VOmach0,
1,
DIR,
- "np.mach_id = %d and np.dir = \"%s\"",
+ "mach_id = %d and dir = '%s'",
2,
"nfsphys_id",
0,
};
static struct valobj gqot_valobj[] = {
+ {V_WILD, 0},
{V_TYPE, 1, QUOTA_TYPE, 0, 0, MR_TYPE},
{V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
{V_SORT, 0, 0, 0, 0, 0},
static struct validate gqot_validate = {
gqot_valobj,
- 3,
+ 4,
0,
0,
0,
};
static struct validate gqbf_validate = {
- VOsort0,
- 1,
+ VOwild0sort,
+ 2,
0,
0,
0,
aqot_valobj,
4,
FILSYS_ID,
- "q.filsys_id = %d and q.type = \"%s\" and q.entity_id = %d",
+ "filsys_id = %d and type = '%s' and entity_id = %d",
3,
0,
0,
- 0,
+ prefetch_filesys,
followup_aqot,
};
aqot_valobj,
4,
FILSYS_ID,
- "q.filsys_id = %d and q.type = \"%s\" and q.entity_id = %d",
+ "filsys_id = %d AND type = '%s' AND entity_id = %d",
3,
0,
0,
aqot_valobj,
4,
FILSYS_ID,
- "q.filsys_id = %d and q.type = \"%s\" and q.entity_id = %d",
+ "filsys_id = %d AND type = '%s' AND entity_id = %d",
3,
0,
0,
setup_dqot,
- 0,
+ followup_dqot,
};
static char *gnfq_fields[] = {
};
static struct validate gnfq_validate = {
- VOsort0,
- 1,
+ VOwild0sort,
+ 2,
0,
0,
0,
FILESYS, LOGIN, QUOTA, DIR, MACHINE, MOD1, MOD2, MOD3,
};
+static struct valobj gnqp_valobj[] = {
+ {V_ID, 0, MACHINE, NAME, MACH_ID, MR_MACHINE},
+ {V_WILD, 1},
+};
+
+static struct validate gnqp_validate = { gnqp_valobj, 2, };
+
static char *anfq_fields[] = {
FILESYS, LOGIN, QUOTA,
};
VOfilsys0user1,
3,
FILSYS_ID,
- "q.filsys_id = %d and q.type = \"USER\" and q.entity_id = %d",
+ "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2,
+ 0, /* object ? */
0,
- 0,
- 0,
+ prefetch_filesys,
followup_aqot,
};
VOfilsys0user1,
3,
FILSYS_ID,
- "q.filsys_id = %d and q.type = \"USER\" and q.entity_id = %d",
+ "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2,
0,
0,
VOfilsys0user1,
3,
FILSYS_ID,
- "q.filsys_id = %d and q.entity_id = %d",
+ "filsys_id = %d AND entity_id = %d",
2,
0,
0,
setup_dqot,
- 0,
+ followup_dqot,
};
static char *glin_fields[] = {
NAME,
- NAME, "active", "public", "hidden", "maillist", "group", "gid",
+ NAME, "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3,
};
};
static char *alis_fields[] = {
- NAME, "active", "public", "hidden", "maillist", "group", "gid",
+ NAME, "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
ACE_TYPE, ACE_NAME, DESC,
};
alis_valobj,
4,
NAME,
- "l.name = \"%s\"",
+ "name = LEFT('%s',SIZE(name))",
1,
LIST_ID,
0,
static char *ulis_fields[] = {
NAME,
- "newname", "active", "public", "hidden", "maillist", "group", "gid",
+ "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
ACE_TYPE, ACE_NAME, DESC,
};
ulis_valobj,
5,
NAME,
- "l.list_id = %d",
+ "list_id = %d",
1,
LIST_ID,
access_list,
VOlist0,
1,
NAME,
- "l.list_id = %d",
+ "list_id = %d",
1,
0,
access_list,
};
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[] = {
};
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", "public", "hidden", "maillist", "group",
- "list",
+ "active", "publicflg", "hidden", "maillist", "grouplist",
+ "list",
};
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[] = {
get_members_of_list,
};
+static struct validate geml_validate = {
+ VOlist0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ access_visible_list,
+ 0,
+ get_end_members_of_list,
+};
+
static char *glom_fields[] = {
"member_type", "member_name",
- "list_name", "active", "public", "hidden", "maillist", "group",
+ "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
};
static struct valobj glom_valobj[] = {
};
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 = {
- VOsort0,
- 1,
+ VOwild0sort,
+ 2,
0,
0,
0,
};
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[] = {
static struct validate azcl_validate = {
azcl_valobj,
- 8,
+ 9,
CLASS,
- "z.class = \"%s\"",
+ "class = LEFT('%s',SIZE(class))",
1,
0,
0,
};
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[] = {
uzcl_valobj,
9,
CLASS,
- "z.class = \"%s\"",
+ "class = '%s'",
1,
0,
0,
0,
0,
CLASS,
- "z.class = \"%s\"",
+ "class = '%s'",
1,
0,
0,
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,
- "s.name = \"%s\"",
+ "name = LEFT('%s',SIZE(name))",
1,
0,
0,
};
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 = {
+ VOwild0sort,
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ followup_gpce,
};
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,
- "p.name = \"%s\"",
+ "name = LEFT('%s',SIZE(name))",
1,
0,
0,
0,
0,
NAME,
- "p.name = \"%s\"",
+ "name = '%s'",
1,
0,
0,
};
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,
- "p.name = \"%s\"",
+ "name = LEFT('%s',SIZE(name))",
1,
0,
0,
0,
0,
NAME,
- "p.name = \"%s\"",
+ "name = '%s'",
1,
0,
0,
static struct valobj aali_valobj[] = {
{V_CHAR, 0},
- {V_TYPE, 1, "alias", 0, 0, MR_TYPE},
+ {V_TYPE, 1, ALIAS, 0, 0, MR_TYPE},
{V_CHAR, 2},
};
aali_valobj,
3,
"trans",
- "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
+ "name = LEFT('%s',SIZE(name)) and type = '%s' and trans = LEFT('%s',SIZE(trans))",
3,
0,
0,
0,
0,
"trans",
- "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
+ "name = '%s' and type = '%s' and trans = '%s'",
3,
0,
0,
};
static struct valobj gval_valobj[] = {
- {V_NAME, 0, "values", NAME, 0, MR_NO_MATCH},
+ {V_NAME, 0, "numvalues", NAME, 0, MR_NO_MATCH},
};
static struct validate gval_validate = {
VOchar0,
1,
NAME,
- "v.name = \"%s\"",
+ "name = LEFT('%s',SIZE(name))", /* LEFT() only needed for aval */
1,
0,
0,
};
static char *gats_fields[] = {
- "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3,
+ "table_name", "appends", "updates", "deletes", MOD1, MOD2, MOD3,
+};
+
+static char *_sdl_fields[] = {
+ "level",
+};
+
+static struct validate _sdl_validate =
+{
+ 0,
+ 0,
+ (char *)0,
+ (char *)0,
+ 0,
+ 0,
+ 0,
+ 0,
+ _sdl_followup,
};
\f
/* Generalized Query Definitions */
+/* Note: For any query which uses prefetch_value, the vcnt should be
+ * one less than the number of %-format specifiers in the tlist.
+ */
+
struct query Queries2[] = {
{
/* Q_GALO - GET_ALL_LOGINS */
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
+ "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle FROM users u",
galo_fields,
6,
"u.users_id != 0",
0,
- 0,
+ &VDsort0,
},
-
+
{
/* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
"get_all_active_logins",
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
+ "CHAR(u.login), CHAR(u.uid), u.shell, CHAR(u.last), CHAR(u.first), u.middle FROM users u",
galo_fields,
6,
"u.status = 1",
0,
- 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, CHAR(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, CHAR(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, CHAR(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,
+ &guan_validate,
+ },
+
+ {
+ /* 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, CHAR(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, CHAR(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",
"gubl",
RETRIEVE,
"u",
- USERS,
- "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
+ 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,
- "u.login = \"%s\" and u.users_id != 0",
+ "u.login LIKE '%s' ESCAPE '*' AND u.users_id != 0",
1,
- &gubx_validate,
+ &gubl_validate,
},
-
+
{
/* Q_GUBU - GET_USER_BY_UID */
"get_user_by_uid",
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
+ "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,
- "u.uid = %s and u.users_id != 0",
+ "u.uid = %s AND u.users_id != 0",
1,
- &gubx_validate,
+ &gubu_validate,
},
-
+
{
/* Q_GUBN - GET_USER_BY_NAME */
"get_user_by_name",
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
+ "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,
- "u.first = \"%s\" and u.last = \"%s\" and u.users_id != 0",
+ "u.first LIKE '%s' ESCAPE '*' AND u.last LIKE '%s' ESCAPE '*' AND u.users_id != 0",
2,
- &VDsortf,
+ &gubn_validate,
},
-
+
{
/* Q_GUBC - GET_USER_BY_CLASS */
"get_user_by_class",
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
+ "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,
- "u.mit_year = uppercase(\"%s\") and u.users_id != 0",
+ "u.type = uppercase('%s') AND u.users_id != 0",
1,
&VDsortf,
},
-
+
{
/* Q_GUBM - GET_USER_BY_MITID */
"get_user_by_mitid",
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
+ "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,
- "u.mit_id = \"%s\" and u.users_id != 0",
+ "u.clearid LIKE '%s' ESCAPE '*' AND u.users_id != 0",
1,
- &VDsortf,
+ &VDwildsortf,
},
-
+
+ {
+ /* Q_AUAC - ADD_USER_ACCOUNT */ /* uses prefetch_value() for users_id */
+ "add_user_account",
+ "auac",
+ APPEND,
+ "u",
+ USERS,
+ "INTO users (login, uid, shell, last, first, middle, status, clearid, type, comment, signature, secure, users_id) VALUES ('%s', %s, '%s', '%s', '%s', '%s', %s, '%s', '%s', %d, '%s', %s, %s)",
+ auac_fields,
+ 12,
+ (char *)0,
+ 0,
+ &auac_validate,
+ },
+
{
- /* Q_AUSR - ADD_USER */
+ /* Q_AUSR - ADD_USER */ /* uses prefetch_value() for users_id */
"add_user",
"ausr",
APPEND,
"u",
USERS,
- "login = %c, users_id = values.value, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
- ausr_fields,
+ "INTO users (login, uid, shell, last, first, middle, status, clearid, type, comment, signature, secure, users_id) VALUES ('%s', %s, '%s', '%s', '%s', '%s', %s, '%s', '%s', 0, '', 0, %s)",
+ auac_fields,
9,
- "values.name = \"users_id\"",
+ 0,
0,
&ausr_validate,
},
-
+
{
/* Q_RUSR - REGISTER_USER */
"register_user",
0,
&rusr_validate,
},
-
+
+ {
+ /* Q_UUAC - UPDATE_USER_ACCOUNT */
+ "update_user_account",
+ "uuac",
+ UPDATE,
+ "u",
+ USERS,
+ "users SET login = '%s', uid = %s, shell = '%s', last = '%s', first = '%s', middle = '%s', status = %s, clearid = '%s', type = '%s', comment = %d, signature = '%s', secure = %s",
+ uuac_fields,
+ 12,
+ "users_id = %d",
+ 1,
+ &uuac_validate,
+ },
+
{
/* Q_UUSR - UPDATE_USER */
"update_user",
UPDATE,
"u",
USERS,
- "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
- uusr_fields,
+ "users SET login = '%s', uid = %s, shell = '%s', last = '%s', first = '%s', middle = '%s', status = %s, clearid = '%s', type = '%s'",
+ uuac_fields,
9,
- "u.users_id = %d",
+ "users_id = %d",
1,
&uusr_validate,
},
UPDATE,
"u",
USERS,
- "shell = %c",
+ "users SET shell = '%s'",
uush_fields,
1,
- "u.users_id = %d",
+ "users_id = %d",
1,
&uush_validate,
},
UPDATE,
"u",
USERS,
- "status = int4(%c)",
+ "users SET status = %s",
uust_fields,
1,
- "u.users_id = %d",
+ "users_id = %d",
1,
&uust_validate,
},
{
- /* Q_DUSR - DELETE_USER */
+ /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
+ "update_user_security_status",
+ "uuss",
+ UPDATE,
+ "u",
+ USERS,
+ "users SET secure = %s",
+ uuss_fields,
+ 1,
+ "users_id = %d",
+ 1,
+ &uust_validate,
+ },
+
+ {
+ /* Q_DUSR - DELETE_USER */
"delete_user",
"dusr",
DELETE,
(char *)0,
dusr_fields,
0,
- "u.users_id = %d",
+ "users_id = %d",
1,
&dusr_validate,
},
(char *)0,
dubu_fields,
0,
- "u.users_id = %d",
+ "users_id = %d",
1,
&dubu_validate,
},
{
- /* Q_GKUM - GET_KERBEROS_USER_MAP */
+ /* Q_GKUM - GET_KERBEROS_USER_MAP */
"get_kerberos_user_map",
"gkum",
RETRIEVE,
"k",
"krbmap",
- "%c = users.login, %c = strings.string",
+ "CHAR(u.login), CHAR(str.string) FROM krbmap km, users u, strings str",
gkum_fields,
2,
- "users.login = \"%s\" and strings.string = \"%s\" and k.users_id = users.users_id and k.string_id = strings.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,
- &VDsort2,
+ &VDwild2sort2,
},
{
APPEND,
"k",
"krbmap",
- "users_id = %i4, string_id = %i4",
+ "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
akum_fields,
2,
0,
0,
akum_fields,
0,
- "k.users_id = %d and k.string_id = %d",
+ "users_id = %d AND string_id = %d",
2,
&dkum_validate,
},
RETRIEVE,
"u",
USERS,
- "%c = u.login,%c=u.fullname,%c=u.nickname,%c=u.home_addr,%c=u.home_phone,%c=u.office_addr,%c=u.office_phone,%c=u.mit_dept,%c=u.mit_affil,%c=u.fmodtime,%c=text(u.fmodby),%c=u.fmodwith",
+ "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,
"u.users_id = %d",
UPDATE,
"u",
USERS,
- "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c",
+ "users SET fullname= '%s',nickname= '%s',home_addr= '%s',home_phone= '%s',office_addr= '%s',office_phone= '%s',department= '%s',affiliation= '%s'",
ufbl_fields,
8,
- "u.users_id = %d",
+ "users_id = %d",
1,
&ufbl_validate,
},
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id), %c = u.pmodtime, %c = text(u.pmodby), %c = u.pmodwith",
+ "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,
"u.users_id = %d",
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
+ "CHAR(u.login), u.potype, CHAR(u.pop_id) + ':' + CHAR(u.box_id) FROM users u",
gpox_fields,
3,
- "u.potype != \"NONE\"",
+ "u.potype != 'NONE'",
0,
&gpox_validate,
},
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
+ "CHAR(u.login), u.potype, CHAR(u.pop_id) + ':' + CHAR(u.box_id) FROM users u",
gpox_fields,
3,
- "u.potype = \"POP\"",
+ "u.potype = 'POP'",
0,
&gpox_validate
},
RETRIEVE,
"u",
USERS,
- "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
+ "CHAR(u.login), u.potype, CHAR(u.pop_id) + ':' + CHAR(u.box_id) FROM users u",
gpox_fields,
3,
- "u.potype = \"SMTP\"",
+ "u.potype = 'SMTP'",
0,
&gpox_validate
},
UPDATE,
"u",
USERS,
- "potype = \"POP\"",
+ "users SET potype = 'POP'",
spob_fields,
0,
- "u.users_id = %d",
+ "users_id = %d",
1,
&spop_validate,
},
UPDATE,
"u",
USERS,
- "potype = \"NONE\"",
+ "users SET potype = 'NONE'",
spob_fields,
0,
- "u.users_id = %d",
+ "users_id = %d",
1,
&dpob_validate,
},
RETRIEVE,
"m",
MACHINE,
- "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith",
+ "CHAR(m.name), m.vendor, CHAR(m.modtime), CHAR(m.modby), m.modwith FROM machine m",
gmac_fields,
5,
- "m.name = uppercase(\"%s\") and m.mach_id != 0",
+ "m.name LIKE '%s' ESCAPE '*' AND m.mach_id != 0",
1,
- &VDsortf,
+ &VDupwildsortf,
+ },
+
+ {
+ /* Q_GHST - GET_HOST */
+ "get_host",
+ "ghst",
+ RETRIEVE,
+ "m",
+ MACHINE,
+ "CHAR(m.name), m.vendor, m.model, m.os, m.location, m.contact, CHAR(m.use), CHAR(m.status), CHAR(m.statuschange), CHAR(s.name), m.address, m.owner_type, CHAR(m.owner_id), CHAR(m.acomment), CHAR(m.ocomment), CHAR(m.created), CHAR(m.creator), CHAR(m.inuse), CHAR(m.modtime), CHAR(m.modby), m.modwith FROM machine m, subnet s",
+ ghst_fields,
+ 21,
+ "m.name LIKE '%s' ESCAPE '*' AND m.address LIKE '%s' ESCAPE '*' AND m.location LIKE '%s' ESCAPE '*' AND s.name LIKE '%s' ESCAPE '*' AND m.mach_id != 0 AND s.snet_id = m.snet_id",
+ 4,
+ &ghst_validate,
},
{
- /* Q_AMAC - ADD_MACHINE */
- "add_machine",
- "amac",
+ /* Q_AHST - ADD_HOST */ /* uses prefetch_value() for mach_id */
+ "add_host",
+ "ahst",
APPEND,
"m",
MACHINE,
- "name = uppercase(%c), mach_id = values.value, type = %c",
- amac_fields,
- 2,
- "values.name = \"mach_id\"",
+ "INTO machine (name, vendor, model, os, location, contact, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (uppercase('%s'),uppercase('%s'),uppercase('%s'),uppercase('%s'),uppercase('%s'),'%s',%s,%s,date('now'),%d,'%s','%s',%d,%d,%d,date('now'),date('now'),%s,%s)",
+ ahst_fields,
+ 14,
+ 0,
0,
- &amac_validate,
+ &ahst_validate,
},
{
- /* Q_UMAC - UPDATE_MACHINE */
- "update_machine",
- "umac",
+ /* Q_UHST - UPDATE_HOST */
+ "update_host",
+ "uhst",
UPDATE,
"m",
MACHINE,
- "name = uppercase(%c), type = %c",
- umac_fields,
- 2,
- "m.mach_id = %d",
+ "machine SET name=uppercase('%s'),vendor=uppercase('%s'),model=uppercase('%s'),os=uppercase('%s'),location=uppercase('%s'),contact='%s',use=%s,status=%s,snet_id=%d,address='%s',owner_type='%s',owner_id=%d,acomment=%d,ocomment=%d",
+ uhst_fields,
+ 14,
+ "mach_id = %d",
1,
- &umac_validate,
+ &uhst_validate,
},
{
- /* Q_DMAC - DELETE_MACHINE */
- "delete_machine",
- "dmac",
+ /* Q_DHST - DELETE_HOST */
+ "delete_host",
+ "dhst",
DELETE,
"m",
MACHINE,
(char *)0,
- dmac_fields,
+ dhst_fields,
+ 0,
+ "mach_id = %d",
+ 1,
+ &dhst_validate,
+ },
+
+ {
+ /* Q_GHAL - GET_HOSTALIAS */
+ "get_hostalias",
+ "ghal",
+ RETRIEVE,
+ "a",
+ "hostalias",
+ "CHAR(a.name), CHAR(m.name) FROM hostalias a, machine m",
+ ghal_fields,
+ 2,
+ "m.mach_id = a.mach_id and a.name LIKE '%s' ESCAPE '*' AND m.name LIKE '%s' ESCAPE '*'",
+ 2,
+ &ghal_validate,
+ },
+
+ {
+ /* Q_AHAL - ADD_HOSTALIAS */
+ "add_hostalias",
+ "ahal",
+ APPEND,
+ "a",
+ "hostalias",
+ "INTO hostalias (name, mach_id) VALUES (uppercase('%s'),%d)",
+ ghal_fields,
+ 2,
+ 0,
+ 0,
+ &ahal_validate,
+ },
+
+ {
+ /* Q_DHAL - DELETE_HOSTALIAS */
+ "delete_hostalias",
+ "dhal",
+ DELETE,
+ "a",
+ "hostalias",
+ (char *)0,
+ ghal_fields,
+ 0,
+ "name = uppercase('%s') AND mach_id = %d",
+ 2,
+ &dhal_validate,
+ },
+
+ {
+ /* Q_GSNT - GET_SUBNET */
+ "get_subnet",
+ "gsnt",
+ RETRIEVE,
+ "s",
+ SUBNET,
+ "CHAR(s.name), CHAR(s.description), CHAR(s.saddr), CHAR(s.mask), CHAR(s.low), CHAR(s.high), s.prefix, s.owner_type, CHAR(s.owner_id), CHAR(s.modtime), CHAR(s.modby), s.modwith FROM subnet s",
+ gsnt_fields,
+ 12,
+ "s.name LIKE '%s' ESCAPE '*' and s.snet_id != 0",
+ 1,
+ &gsnt_validate,
+ },
+
+ {
+ /* Q_ASNT - ADD_SUBNET */
+ "add_subnet",
+ "asnt",
+ APPEND,
+ "s",
+ SUBNET,
+ "INTO subnet (name, description, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (uppercase('%s'), '%s', %s, %s, %s, %s, '%s', '%s', %d, %s)",
+ asnt_fields,
+ 9,
+ 0,
+ 0,
+ &asnt_validate,
+ },
+
+ {
+ /* Q_USNT - UPDATE_SUBNET */
+ "update_subnet",
+ "usnt",
+ UPDATE,
+ "s",
+ SUBNET,
+ "subnet SET name=uppercase('%s'), description='%s', saddr=%s, mask=%s, low=%s, high=%s, prefix='%s', owner_type='%s', owner_id=%d",
+ usnt_fields,
+ 9,
+ "snet_id = %d",
+ 1,
+ &usnt_validate,
+ },
+
+ {
+ /* Q_DSNT - DELETE_SUBNET */
+ "delete_subnet",
+ "dsnt",
+ DELETE,
+ "s",
+ SUBNET,
+ (char *)0,
+ dsnt_fields,
0,
- "m.mach_id = %d",
+ "snet_id = %d",
1,
- &dmac_validate,
+ &dsnt_validate,
},
{
RETRIEVE,
"c",
CLUSTER,
- "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith",
+ "CHAR(c.name), c.description, c.location, CHAR(c.modtime), CHAR(c.modby), c.modwith FROM cluster c",
gclu_fields,
6,
- "c.name = \"%s\" and c.clu_id != 0",
+ "c.name LIKE '%s' ESCAPE '*' AND c.clu_id != 0",
1,
- &VDsortf,
+ &VDwildsortf,
},
{
- /* Q_ACLU - ADD_CLUSTER */
+ /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
"add_cluster",
"aclu",
APPEND,
"c",
CLUSTER,
- "name = %c, clu_id = values.value, desc = %c, location = %c",
+ "INTO cluster (name, description, location, clu_id) VALUES ('%s','%s','%s',%s)",
aclu_fields,
3,
- "values.name = \"clu_id\"",
+ 0,
0,
&aclu_validate,
},
UPDATE,
"c",
CLUSTER,
- "name = %c, desc = %c, location = %c",
+ "cluster SET name = '%s', description = '%s', location = '%s'",
uclu_fields,
3,
- "c.clu_id = %d",
+ "clu_id = %d",
1,
&uclu_validate,
},
(char *)0,
dclu_fields,
0,
- "c.clu_id = %d",
+ "clu_id = %d",
1,
&dclu_validate,
},
{
- /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
+ /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
"get_machine_to_cluster_map",
"gmcm",
RETRIEVE,
- "m",
+ "mcm",
"mcmap",
- "%c = machine.name, %c = cluster.name",
+ "CHAR(m.name), CHAR(c.name) FROM machine m, cluster c, mcmap mcm",
gmcm_fields,
2,
- "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.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,
- &VDsort2,
+ &gmcm_validate,
},
-
+
{
/* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
"add_machine_to_cluster",
"amtc",
APPEND,
- "m",
+ "mcm",
"mcmap",
- "mach_id = %i4, clu_id = %i4",
+ "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
gmcm_fields,
2,
0,
"delete_machine_from_cluster",
"dmfc",
DELETE,
- "m",
+ "mcm",
"mcmap",
0,
gmcm_fields,
0,
- "m.mach_id = %d and m.clu_id = %d",
+ "mach_id = %d AND clu_id = %d",
2,
&amtc_validate,
},
"get_cluster_data",
"gcld",
RETRIEVE,
- "s",
"svc",
- "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster",
+ "svc",
+ "CHAR(c.name), CHAR(svc.serv_label), svc.serv_cluster FROM svc svc, cluster c",
gcld_fields,
3,
- "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"",
+ "c.clu_id = svc.clu_id AND c.name LIKE '%s' ESCAPE '*' AND svc.serv_label LIKE '%s' ESCAPE '*'",
2,
- &VDsort2,
+ &VDwild2sort2,
},
{
"add_cluster_data",
"acld",
APPEND,
- "s",
"svc",
- "clu_id = %i4, serv_label = %c, serv_cluster = %c",
+ "svc",
+ "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d,'%s','%s')",
acld_fields,
3,
(char *)0,
"delete_cluster_data",
"dcld",
DELETE,
- "s",
+ "svc",
"svc",
(char *)0,
acld_fields,
0,
- "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
+ "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
3,
- &acld_validate,
+ &dcld_validate,
},
{
RETRIEVE,
"s",
"servers",
- "%c = s.name, %c = text(s.update_int), %c = s.target_file, %c = s.script, %c = text(s.dfgen), %c = text(s.dfcheck), %c = s.type, %c = text(s.enable), %c = text(s.inprogress), %c = text(s.harderror), %c = s.errmsg, %c = s.acl_type, %c = text(s.acl_id), %c = s.modtime, %c = text(s.modby), %c = s.modwith",
+ "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,
- "s.name = uppercase(\"%s\")",
+ "s.name LIKE '%s' ESCAPE '*'",
1,
&gsin_validate,
},
APPEND,
"s",
"servers",
- "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
+ "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (uppercase('%s'),%s,'%s','%s','%s',%s,'%s',%d)",
asin_fields,
8,
(char *)0,
UPDATE,
"s",
"servers",
- "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
+ "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
asin_fields,
7,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase('%s')",
1,
&asin_validate,
},
UPDATE,
"s",
"servers",
- "harderror = 0, dfcheck = s.dfgen",
+ "servers SET harderror = 0, dfcheck = dfgen",
dsin_fields,
0,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase('%s')",
1,
&rsve_validate,
},
UPDATE,
"s",
"servers",
- "dfgen = int4(%c), dfcheck = int4(%c), inprogress = int1(%c), harderror = int1(%c), errmsg = %c",
+ "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = '%s'",
ssif_fields,
5,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase('%s')",
1,
&ssif_validate,
},
(char *)0,
dsin_fields,
0,
- "s.name = uppercase(\"%s\")",
+ "name = uppercase('%s')",
1,
&dsin_validate,
},
{
- /* Q_GSHI - GET_SERVER_HOST_INFO */
+ /* Q_GSHI - GET_SERVER_HOST_INFO */
"get_server_host_info",
"gshi",
RETRIEVE,
"sh",
"serverhosts",
- "%c = sh.service, %c = machine.name, %c = text(sh.enable), %c = text(sh.override), %c = text(sh.success), %c = text(sh.inprogress), %c = text(sh.hosterror), %c = sh.hosterrmsg, %c = text(sh.ltt), %c = text(sh.lts), %c = text(sh.value1), %c = text(sh.value2), %c = sh.value3, %c = sh.modtime, %c = text(sh.modby), %c = sh.modwith",
+ "CHAR(sh.service), CHAR(m.name), CHAR(sh.enable), CHAR(sh.override), CHAR(sh.success), CHAR(sh.inprogress), CHAR(sh.hosterror), sh.hosterrmsg, CHAR(sh.ltt), CHAR(sh.lts), CHAR(sh.value1), CHAR(sh.value2), sh.value3, CHAR(sh.modtime), CHAR(sh.modby), sh.modwith FROM serverhosts sh, machine m",
gshi_fields,
16,
- "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id",
+ "sh.service LIKE '%s' ESCAPE '*' AND m.name LIKE '%s' ESCAPE '*' AND m.mach_id = sh.mach_id",
2,
&gshi_validate,
},
{
- /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */
+ /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
"qualified_get_server_host",
"qgsh",
RETRIEVE,
APPEND,
"sh",
"serverhosts",
- "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
+ "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (uppercase('%s'), %d, %s, %s, %s, '%s')",
ashi_fields,
6,
(char *)0,
UPDATE,
"sh",
"serverhosts",
- "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
+ "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = '%s'",
ashi_fields,
4,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase('%s') AND mach_id = %d",
2,
&ashi_validate,
},
UPDATE,
"sh",
"serverhosts",
- "hosterror = 0",
+ "serverhosts SET hosterror = 0",
dshi_fields,
0,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase('%s') AND mach_id = %d",
2,
&rshe_validate,
},
UPDATE,
"sh",
"serverhosts",
- "override = 1",
+ "serverhosts SET override = 1",
dshi_fields,
0,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase('%s') AND mach_id = %d",
2,
&ssho_validate,
},
UPDATE,
"s",
"serverhosts",
- "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = int4(%c), lts = int4(%c)",
+ "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = '%s', ltt = %s, lts = %s",
sshi_fields,
7,
- "s.service = uppercase(\"%s\") and s.mach_id = machine.mach_id and machine.name = \"%s\"",
+ "service = uppercase('%s') AND mach_id = %d",
2,
&sshi_validate,
},
(char *)0,
dshi_fields,
0,
- "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
+ "service = uppercase('%s') AND mach_id = %d",
2,
&dshi_validate,
},
{
- /* Q_GSHA - GET_SERVER_HOST_ACCESS */
+ /* Q_GSHA - GET_SERVER_HOST_ACCESS */
"get_server_host_access",
"gsha",
RETRIEVE,
"ha",
"hostaccess",
- "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith",
+ "CHAR(m.name), ha.acl_type, CHAR(ha.acl_id), CHAR(ha.modtime), CHAR(ha.modby), ha.modwith FROM hostaccess ha, machine m",
gsha_fields,
6,
- "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id",
+ "m.name LIKE '%s' ESCAPE '*' AND ha.mach_id = m.mach_id",
1,
&gsha_validate,
},
APPEND,
"ha",
"hostaccess",
- "mach_id = %i4, acl_type = %c, acl_id = %i4",
+ "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d,'%s',%d)",
asha_fields,
3,
0,
UPDATE,
"ha",
"hostaccess",
- "acl_type = %c, acl_id = %i4",
+ "hostaccess SET acl_type = '%s', acl_id = %d",
asha_fields,
2,
- "ha.mach_id = %d",
+ "mach_id = %d",
1,
&asha_validate,
},
0,
asha_fields,
0,
- "ha.mach_id = %d",
+ "mach_id = %d",
1,
&VDmach,
},
{
- /* Q_GSLO - GET_SERVER_LOCATIONS */
+ /* Q_GSLO - GET_SERVER_LOCATIONS */
"get_server_locations",
"gslo",
RETRIEVE,
"sh",
"serverhosts",
- "%c = sh.service, %c = machine.name",
+ "CHAR(sh.service), CHAR(m.name) FROM serverhosts sh, machine m",
gslo_fields,
2,
- "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id",
+ "sh.service LIKE '%s' ESCAPE '*' AND sh.mach_id = m.mach_id",
1,
- 0,
+ &VDupwild0,
},
{
- /* Q_GFSL - GET_FILESYS_BY_LABEL */
+ /* Q_GFSL - GET_FILESYS_BY_LABEL */
"get_filesys_by_label",
"gfsl",
RETRIEVE,
"fs",
FILESYS,
- "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
+ "CHAR(fs.label), fs.type, CHAR(m.name), CHAR(fs.name), fs.mount, fs.access, fs.comments, CHAR(u.login), CHAR(l.name), CHAR(fs.createflg), fs.lockertype, CHAR(fs.modtime), CHAR(fs.modby), fs.modwith FROM filesys fs, machine m, users u, list l",
gfsl_fields,
14,
- "fs.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
+ "fs.label LIKE '%s' ESCAPE '*' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
1,
- &VDsortf,
+ &VDwildsortf,
},
{
- /* Q_GFSM - GET_FILESYS_BY_MACHINE */
+ /* Q_GFSM - GET_FILESYS_BY_MACHINE */
"get_filesys_by_machine",
"gfsm",
RETRIEVE,
"fs",
FILESYS,
- "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
+ "CHAR(fs.label), fs.type, CHAR(m.name), CHAR(fs.name), fs.mount, fs.access, fs.comments, CHAR(u.login), CHAR(l.name), CHAR(fs.createflg), fs.lockertype, CHAR(fs.modtime), CHAR(fs.modby), fs.modwith FROM filesys fs, machine m, users u, list l",
gfsm_fields,
14,
- "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
+ "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
1,
&gfsm_validate,
},
{
- /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
+ /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
"get_filesys_by_nfsphys",
"gfsn",
RETRIEVE,
"fs",
FILESYS,
- "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
+ "CHAR(fs.label), fs.type, CHAR(m.name), CHAR(fs.name), fs.mount, fs.access, fs.comments, CHAR(u.login), CHAR(l.name), CHAR(fs.createflg), fs.lockertype, CHAR(fs.modtime), CHAR(fs.modby), fs.modwith FROM filesys fs, machine m, users u, list l, nfsphys np",
gfsn_fields,
14,
- "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id and nfsphys.nfsphys_id = fs.phys_id and nfsphys.dir = \"%s\" and fs.type = \"NFS\"",
+ "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id AND np.nfsphys_id = fs.phys_id AND np.dir LIKE '%s' ESCAPE '*' AND fs.type = 'NFS'",
2,
- &gfsm_validate,
+ &gfsn_validate,
},
{
- /* Q_GFSG - GET_FILESYS_BY_GROUP */
+ /* Q_GFSG - GET_FILESYS_BY_GROUP */
"get_filesys_by_group",
"gfsg",
RETRIEVE,
"fs",
FILESYS,
- "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
+ "CHAR(fs.label), fs.type, CHAR(m.name), CHAR(fs.name), fs.mount, fs.access, fs.comments, CHAR(u.login), CHAR(l.name), CHAR(fs.createflg), fs.lockertype, CHAR(fs.modtime), CHAR(fs.modby), fs.modwith FROM filesys fs, machine m, users u, list l",
gfsg_fields,
14,
- "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
+ "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
1,
&gfsg_validate,
},
{
- /* Q_AFIL - ADD_FILESYS */
+ /* Q_GFSP - GET_FILESYS_BY_PATH */
+ "get_filesys_by_path",
+ "gfsp",
+ RETRIEVE,
+ "fs",
+ FILESYS,
+ "CHAR(fs.label), fs.type, CHAR(m.name), CHAR(fs.name), fs.mount, fs.access, fs.comments, CHAR(u.login), CHAR(l.name), CHAR(fs.createflg), fs.lockertype, CHAR(fs.modtime), CHAR(fs.modby), fs.modwith FROM filesys fs, machine m, users u, list l",
+ gfsp_fields,
+ 14,
+ "fs.name LIKE '%s' ESCAPE '*' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
+ 1,
+ &VDwildsortf,
+ },
+
+ {
+ /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
"add_filesys",
"afil",
APPEND,
"fs",
FILESYS,
- "filsys_id = values.value, label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
+ "INTO filesys (label, type, mach_id, name, mount, access, comments, owner, owners, createflg, lockertype, filsys_id) VALUES ('%s','%s',%d,'%s','%s','%s','%s',%d,%d,%s,'%s',%s)",
afil_fields,
11,
- "values.name = \"filsys_id\"",
+ 0,
0,
&afil_validate,
},
UPDATE,
"fs",
FILESYS,
- "label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
+ "filesys SET label = '%s', type = '%s', mach_id = %d, name = '%s', mount = '%s', access = '%s', comments = '%s', owner = %d, owners = %d, createflg = %s, lockertype = '%s'",
ufil_fields,
11,
- "fs.filsys_id = %d",
+ "filsys_id = %d",
1,
- &ufil_validate,
+ &ufil_validate,
},
{
(char *)0,
dfil_fields,
0,
- "fs.filsys_id = %d",
+ "filsys_id = %d",
1,
&dfil_validate,
},
{
- /* Q_GFGM - GET_FSGROUOP_MEMBERS */
+ /* Q_GFGM - GET_FSGROUP_MEMBERS */
"get_fsgroup_members",
"gfgm",
RETRIEVE,
"fg",
"fsgroup",
- "%c = filesys.label, %c = fg.key",
+ "CHAR(fs.label), fg.key FROM fsgroup fg, filesys fs",
gfgm_fields,
2,
- "fg.group_id = %d and filesys.filsys_id = fg.filsys_id",
+ "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
1,
&gfgm_validate,
},
APPEND,
"fg",
"fsgroup",
- "group_id = filesys.filsys_id, filsys_id = %i4, key = %c",
+ "INTO fsgroup (group_id,filsys_id,key) VALUES (%d, %d, '%s')",
gfgm_fields,
- 2,
- "filesys.filsys_id = %d and filesys.type = \"FSGROUP\"",
- 1,
+ 3,
+ (char *)0,
+ 0,
&aftg_validate,
},
(char *)0,
gfgm_fields,
0,
- "fg.group_id = %d and fg.filsys_id = %d",
+ "group_id = %d AND filsys_id = %d",
2,
&aftg_validate,
},
{
- /* Q_GANF - GET_ALL_NFSPHYS */
+ /* Q_GANF - GET_ALL_NFSPHYS */
"get_all_nfsphys",
"ganf",
RETRIEVE,
"np",
"nfsphys",
- "%c = machine.name, %c = np.dir, %c = np.device, %c = text(np.status), %c = text(np.allocated), %c = text(np.size), %c = np.modtime, %c = text(np.modby), %c = np.modwith",
+ "CHAR(m.name), CHAR(np.dir), np.device, CHAR(np.status), CHAR(np.allocated), CHAR(np.partsize), CHAR(np.modtime), CHAR(np.modby), np.modwith FROM nfsphys np, machine m",
ganf_fields,
9,
- "machine.mach_id = np.mach_id",
+ "m.mach_id = np.mach_id",
0,
&VDsortf,
},
{
- /* Q_GNFP - GET_NFSPHYS */
+ /* Q_GNFP - GET_NFSPHYS */
"get_nfsphys",
"gnfp",
RETRIEVE,
"np",
"nfsphys",
- "%c = machine.name, %c = np.dir, %c = np.device, %c = text(np.status), %c = text(np.allocated), %c = text(np.size), %c = np.modtime, %c = text(np.modby), %c = np.modwith",
+ "CHAR(m.name), CHAR(np.dir), np.device, CHAR(np.status), CHAR(np.allocated), CHAR(np.partsize), CHAR(np.modtime), CHAR(np.modby), np.modwith FROM nfsphys np, machine m",
gnfp_fields,
9,
- "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id",
+ "np.mach_id = %d AND np.dir LIKE '%s' ESCAPE '*' AND m.mach_id = np.mach_id",
2,
&gnfp_validate,
},
{
- /* Q_ANFP - ADD_NFSPHYS */
+ /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
"add_nfsphys",
"anfp",
APPEND,
"np",
"nfsphys",
- "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
+ "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', '%s', %s, %s, %s, %s)",
ganf_fields,
6,
- "values.name = \"nfsphys_id\"",
+ 0,
0,
&anfp_validate,
},
UPDATE,
"np",
"nfsphys",
- "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
- gnfp_fields,
+ "nfsphys SET device = '%s', status = %s, allocated = %s, partsize = %s",
+ ganf_fields,
4,
- "np.mach_id = %d and np.dir = \"%s\"",
+ "mach_id = %d AND dir = '%s'",
2,
- &anfp_validate,
+ &unfp_validate,
},
{
UPDATE,
"np",
"nfsphys",
- "allocated = np.allocated + int4(%c)",
- dnfp_fields,
+ "nfsphys SET allocated = allocated + %s",
+ ajnf_fields,
1,
- "np.mach_id = %d and np.dir = \"%s\"",
+ "mach_id = %d AND dir = '%s'",
2,
- &anfp_validate,
+ &unfp_validate,
},
{
(char *)0,
dnfp_fields,
0,
- "np.mach_id = %d and np.dir = \"%s\"",
+ "mach_id = %d AND dir = '%s'",
2,
&dnfp_validate,
},
{
- /* Q_GQOT - GET_QUOTA */
+ /* Q_GQOT - GET_QUOTA */
"get_quota",
"gqot",
RETRIEVE,
"q",
QUOTA,
- "%c = filesys.label, %c = q.type, %c = text(q.entity_id), %c = text(q.quota), %c = text(q.phys_id), %c = machine.name, %c = q.modtime, %c = text(q.modby), %c = q.modwith",
+ "CHAR(fs.label), q.type, CHAR(q.entity_id), CHAR(q.quota), CHAR(q.phys_id), CHAR(m.name), CHAR(q.modtime), CHAR(q.modby), q.modwith FROM quota q, filesys fs, machine m",
gqot_fields,
9,
- "filesys.label = \"%s\" and q.type = \"%s\" and q.entity_id = %d and filesys.filsys_id = q.filsys_id and machine.mach_id = filesys.mach_id",
+ "fs.label LIKE '%s' ESCAPE '*' AND q.type = '%s' AND q.entity_id = %d AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
3,
&gqot_validate,
},
{
- /* Q_GQBF - GET_QUOTA_BY_FILESYS */
+ /* Q_GQBF - GET_QUOTA_BY_FILESYS */
"get_quota_by_filesys",
"gqbf",
RETRIEVE,
"q",
QUOTA,
- "%c = filesys.label, %c = q.type, %c = text(q.entity_id), %c = text(q.quota), %c = text(q.phys_id), %c = machine.name, %c = q.modtime, %c = text(q.modby), %c = q.modwith",
+ "CHAR(fs.label), q.type, CHAR(q.entity_id), CHAR(q.quota), CHAR(q.phys_id), CHAR(m.name), CHAR(q.modtime), CHAR(q.modby), q.modwith FROM quota q, filesys fs, machine m",
gqbf_fields,
9,
- "filesys.label = \"%s\" and filesys.filsys_id = q.filsys_id and machine.mach_id = filesys.mach_id",
+ "fs.label LIKE '%s' ESCAPE '*' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
1,
&gqbf_validate,
},
{
- /* Q_AQOT - ADD_QUOTA */
+ /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
"add_quota",
"aqot",
APPEND,
- "q",
+ 0,
QUOTA,
- "filsys_id = filesys.filsys_id, type = %c, entity_id = %i4, quota = int4(%c), phys_id = filesys.phys_id",
+ "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
aqot_fields,
- 3,
- "filesys.filsys_id = %d",
- 1,
+ 4,
+ (char *)0,
+ 0,
&aqot_validate,
},
"update_quota",
"uqot",
UPDATE,
- "q",
+ 0,
QUOTA,
- "quota = int4(%c)",
+ "quota SET quota = %s",
aqot_fields,
1,
- "q.filsys_id = %d and q.type = \"%s\" and q.entity_id = %d",
+ 0,
3,
&uqot_validate,
},
"delete_quota",
"dqot",
DELETE,
- "q",
+ 0,
QUOTA,
(char *)0,
aqot_fields,
0,
- "q.filsys_id = %d and q.type = \"%s\" and q.entity_id = %d",
+ 0,
3,
&dqot_validate,
},
{
- /* Q_GNFQ - GET_NFS_QUOTAS */
+ /* Q_GNFQ - GET_NFS_QUOTAS */
"get_nfs_quota",
"gnfq",
RETRIEVE,
"q",
QUOTA,
- "%c = filesys.label, %c = users.login, %c = text(q.quota), %c = text(q.phys_id), %c = machine.name, %c = q.modtime, %c = text(q.modby), %c = q.modwith",
+ "CHAR(fs.label), CHAR(u.login), CHAR(q.quota), CHAR(q.phys_id), CHAR(m.name), CHAR(q.modtime), CHAR(q.modby), q.modwith FROM quota q, filesys fs, users u, machine m",
gnfq_fields,
8,
- "filesys.label = \"%s\" and q.type = \"USER\" and q.entity_id = users.users_id and filesys.filsys_id = q.filsys_id and machine.mach_id = filesys.mach_id and users.login = \"%s\"",
+ "fs.label LIKE '%s' ESCAPE '*' AND q.type = 'USER' AND q.entity_id = u.users_id AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id AND u.login = '%s'",
2,
&gnfq_validate,
},
{
- /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
+ /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
"get_nfs_quotas_by_partition",
"gnqp",
RETRIEVE,
"q",
QUOTA,
- "%c = filesys.label, %c = users.login, %c = text(q.quota), %c = nfsphys.dir, %c = machine.name",
+ "CHAR(fs.label), CHAR(u.login), CHAR(q.quota), CHAR(np.dir), CHAR(m.name) FROM quota q, filesys fs, users u, nfsphys np, machine m",
gnqp_fields,
5,
- "nfsphys.mach_id = %d and nfsphys.dir = \"%s\" and q.phys_id = nfsphys.nfsphys_id and filesys.filsys_id = q.filsys_id and q.type = \"USER\" and users.users_id = q.entity_id and machine.mach_id = nfsphys.mach_id",
+ "np.mach_id = %d AND np.dir LIKE '%s' ESCAPE '*' AND q.phys_id = np.nfsphys_id AND fs.filsys_id = q.filsys_id AND q.type = 'USER' AND u.users_id = q.entity_id AND m.mach_id = np.mach_id",
2,
- &VDmach,
+ &gnqp_validate,
},
{
- /* Q_ANFQ - ADD_NFS_QUOTA */
+ /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
"add_nfs_quota",
"anfq",
APPEND,
- "q",
+ 0,
QUOTA,
- "filsys_id = filesys.filsys_id, type = \"USER\", entity_id = %i4, quota = int4(%c), phys_id = filesys.phys_id",
+ "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
anfq_fields,
- 2,
- "filesys.filsys_id = %d",
- 1,
+ 3,
+ (char *)0,
+ 0,
&anfq_validate,
},
{
- /* Q_UNFQ - UPDATE_NFS_QUOTA */
+ /* Q_UNFQ - UPDATE_NFS_QUOTA */
"update_nfs_quota",
"unfq",
UPDATE,
- "q",
+ 0,
QUOTA,
- "quota = int4(%c)",
+ "quota SET quota = %s",
anfq_fields,
1,
- "q.filsys_id = %d and q.type = \"USER\" and q.entity_id = %d",
+ 0,
2,
&unfq_validate,
},
"delete_nfs_quota",
"dnfq",
DELETE,
- "q",
+ 0,
QUOTA,
(char *)0,
anfq_fields,
0,
- "q.filsys_id = %d and q.type = \"USER\" and q.entity_id = %d",
+ 0,
2,
&dnfq_validate,
},
glin_fields,
13,
0,
- 1,
- &glin_validate,
+ 1,
+ &glin_validate,
},
{
RETRIEVE,
"l",
LIST,
- "%c = l.name",
+ "CHAR(l.name) FROM list l",
glin_fields,
1,
- "l.name = \"%s\" and l.list_id != 0",
+ "l.name LIKE '%s' ESCAPE '*' AND l.list_id != 0",
1,
- 0
+ &VDwild0,
},
{
- /* Q_ALIS - ADD_LIST */
+ /* Q_ALIS - ADD_LIST */ /* uses prefetch_value() for list_id */
"add_list",
"alis",
APPEND,
"l",
- LIST,
- "list_id=values.value, name=%c, active=int1(%c), public=int1(%c), hidden=int1(%c), maillist=int1(%c), group=int1(%c), gid=int2(%c), acl_type=%c, acl_id=%i4, desc=%c",
+ LIST,
+ "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, acl_type, acl_id, description, list_id) VALUES ('%s',%s,%s,%s,%s,%s,%s,'%s',%d,'%s',%s)",
alis_fields,
10,
- "values.name = \"list_id\"",
+ 0,
0,
&alis_validate,
},
UPDATE,
"l",
LIST,
- "name=%c, active=int1(%c), public=int1(%c), hidden=int1(%c), maillist=int1(%c), group=int1(%c), gid=int2(%c), acl_type=%c, acl_id=%i4, desc=%c",
+ "list SET name='%s', active=%s, publicflg=%s, hidden=%s, maillist=%s, grouplist=%s, gid=%s, acl_type='%s', acl_id=%d, description='%s'",
ulis_fields,
10,
- "l.list_id = %d",
+ "list_id = %d",
1,
&ulis_validate,
},
(char *)0,
dlis_fields,
0,
- "l.list_id = %d",
+ "list_id = %d",
1,
&dlis_validate,
},
"imembers",
(char *)0,
gmol_fields,
- 0,
+ 2,
(char *)0,
1,
&gmol_validate,
},
+ {
+ /* Q_GEML - GET_END_MEMBERS_OF_LIST */
+ "get_end_members_of_list",
+ "geml",
+ RETRIEVE,
+ (char *)0,
+ "imembers",
+ (char *)0,
+ gmol_fields,
+ 0,
+ (char *)0,
+ 1,
+ &geml_validate,
+ },
+
{
/* Q_GLOM - GET_LISTS_OF_MEMBER */
"get_lists_of_member",
RETRIEVE,
"z",
"zephyr",
- "%c = z.class, %c = z.xmt_type, %c = text(z.xmt_id),%c = z.sub_type, %c = text(z.sub_id),%c = z.iws_type, %c = text(z.iws_id),%c = z.iui_type, %c = text(z.iui_id), %c=z.modtime, %c = text(z.modby), %c = z.modwith",
+ "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,
- "z.class = \"%s\"",
+ "z.class LIKE '%s' ESCAPE '*'",
1,
&gzcl_validate,
},
APPEND,
"z",
"zephyr",
- "class = %c, xmt_type = %c, xmt_id = %i4, sub_type = %c, sub_id = %i4, iws_type = %c, iws_id = %i4, iui_type = %c, iui_id = %i4",
+ "INTO zephyr (class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id) VALUES ('%s','%s',%d,'%s',%d,'%s',%d,'%s',%d)",
azcl_fields,
9,
0,
UPDATE,
"z",
"zephyr",
- "class = %c, xmt_type = %c, xmt_id = %i4, sub_type = %c, sub_id = %i4, iws_type = %c, iws_id = %i4, iui_type = %c, iui_id = %i4",
+ "zephyr SET class = '%s', xmt_type = '%s', xmt_id = %d, sub_type = '%s', sub_id = %d, iws_type = '%s', iws_id = %d, iui_type = '%s', iui_id = %d",
uzcl_fields,
9,
- "z.class = \"%s\"",
+ "class = '%s'",
1,
&uzcl_validate,
},
0,
uzcl_fields,
0,
- "z.class = \"%s\"",
+ "class = '%s'",
1,
&dzcl_validate,
},
"get_service",
"gsvc",
RETRIEVE,
- "s",
+ "ss",
"services",
- "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith",
+ "CHAR(ss.name), ss.protocol, CHAR(ss.port), ss.description, CHAR(ss.modtime), CHAR(ss.modby), ss.modwith FROM services ss",
gsvc_fields,
7,
- "s.name = \"%s\"",
+ "ss.name LIKE '%s' ESCAPE '*'",
1,
- &VDsortf,
+ &VDwildsortf,
},
{
"add_service",
"asvc",
APPEND,
- "s",
+ "ss",
"services",
- "name = %c, protocol = %c, port = int2(%c), desc = %c",
+ "INTO services (name, protocol, port, description) VALUES ('%s','%s',%s,'%s')",
asvc_fields,
4,
(char *)0,
"delete_service",
"dsvc",
DELETE,
- "s",
+ "ss",
"services",
0,
asvc_fields,
0,
- "s.name = \"%s\"",
+ "name = '%s'",
1,
&asvc_validate,
},
{
- /* Q_GPCE - GET_PRINTCAP_ENTRY */
+ /* Q_GPCE - GET_PRINTCAP_ENTRY */
"get_printcap_entry",
"gpce",
RETRIEVE,
- "p",
+ "pc",
"printcap",
- "%c = p.name, %c = machine.name, %c = p.dir, %c = p.rp, %c = m.name, %c = text(p.auth), %c = text(p.price), %c = p.comments, %c = p.modtime, %c = text(p.modby), %c = p.modwith",
+ "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 = \"%s\" and machine.mach_id = p.mach_id and m.mach_id = p.quotaserver",
+ "pc.name LIKE '%s' ESCAPE '*' AND m.mach_id = pc.mach_id",
1,
- &VDsortf,
+ &gpce_validate,
},
{
"add_printcap_entry",
"apce",
APPEND,
- "p",
+ "pc",
"printcap",
- "name = %c, mach_id = %i4, dir = %c, rp = %c, quotaserver = %i4, auth = int1(%c), price = int2(%c), comments = %c",
+ "INTO printcap (name, mach_id, dir, rp, quotaserver, auth, price, comments) VALUES ('%s',%d,'%s','%s',%d,%s,%s,'%s')",
apce_fields,
8,
0,
"delete_printcap_entry",
"dpce",
DELETE,
- "p",
+ "pc",
"printcap",
0,
apce_fields,
0,
- "p.name = \"%s\"",
+ "name = '%s'",
1,
&dpce_validate,
},
"get_printcap",
"gpcp",
RETRIEVE,
- "p",
+ "pc",
"printcap",
- "%c = p.name, %c = machine.name, %c = p.dir, %c = p.rp, %c = p.comments, %c = p.modtime, %c = text(p.modby), %c = p.modwith",
+ "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 = \"%s\" and machine.mach_id = p.mach_id",
+ "pc.name LIKE '%s' ESCAPE '*' AND m.mach_id = pc.mach_id",
1,
- &VDsortf,
+ &VDwildsortf,
},
{
"delete_printcap",
"dpcp",
DELETE,
- "p",
+ "pc",
"printcap",
0,
apce_fields,
0,
- "p.name = \"%s\"",
+ "name = '%s'",
1,
&dpce_validate,
},
"get_palladium",
"gpdm",
RETRIEVE,
- "p",
+ "pal",
"palladium",
- "%c = p.name, %c = text(p.ident), %c = machine.name, %c = p.modtime, %c = text(p.modby), %c = p.modwith",
+ "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 = \"%s\" and machine.mach_id = p.mach_id",
+ "pal.name LIKE '%s' ESCAPE '*' AND m.mach_id = pal.mach_id",
1,
- &VDsortf,
+ &VDwildsortf,
},
{
"add_palladium",
"apdm",
APPEND,
- "p",
+ "pal",
"palladium",
- "name = %c, ident = int4(%c), mach_id = %i4",
+ "INTO palladium (name, ident, mach_id) VALUES ('%s',%s,%d)",
apdm_fields,
3,
0,
"delete_palladium",
"dpdm",
DELETE,
- "p",
+ "pal",
"palladium",
0,
apdm_fields,
0,
- "p.name = \"%s\"",
+ "name = '%s'",
1,
&dpdm_validate,
},
"gali",
RETRIEVE,
"a",
- "alias",
- "%c = a.name, %c = a.type, %c = a.trans",
+ ALIAS,
+ "CHAR(a.name), CHAR(a.type), CHAR(a.trans) FROM alias a",
gali_fields,
3,
- "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
+ "a.name LIKE '%s' ESCAPE '*' AND a.type LIKE '%s' ESCAPE '*' AND a.trans LIKE '%s' ESCAPE '*'",
3,
- 0,
+ &VDwild3sort1,
},
{
"aali",
APPEND,
"a",
- "alias",
- "name = %c, type = %c, trans = %c",
+ ALIAS,
+ "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
aali_fields,
3,
(char *)0,
"dali",
DELETE,
"a",
- "alias",
+ ALIAS,
(char *)0,
aali_fields,
0,
- "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
+ "name = '%s' AND type = '%s' AND trans = '%s'",
3,
&dali_validate,
},
"get_value",
"gval",
RETRIEVE,
- "v",
- "values",
- "%c = text(v.value)",
+ "val",
+ "numvalues",
+ "CHAR(val.value) FROM numvalues val",
gval_fields,
1,
- "v.name = \"%s\"",
+ "val.name = '%s'",
1,
&gval_validate,
},
"add_value",
"aval",
APPEND,
- "v",
- "values",
- "name = %c, value = int4(%c)",
+ "val",
+ "numvalues",
+ "INTO numvalues (name, value) VALUES ('%s', %s)",
aval_fields,
2,
(char *)0,
"update_value",
"uval",
UPDATE,
- "v",
- "values",
- "value = int4(%c)",
+ "val",
+ "numvalues",
+ "numvalues SET value = %s",
aval_fields,
1,
- "v.name = \"%s\"",
+ "name = '%s'",
1,
&aval_validate,
},
"delete_value",
"dval",
DELETE,
- "v",
- "values",
+ "val",
+ "numvalues",
(char *)0,
dval_fields,
0,
- "v.name = \"%s\"",
+ "name = '%s'",
1,
&aval_validate,
},
RETRIEVE,
"tbs",
"tblstats",
- "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime",
+ "tbs.table_name, CHAR(tbs.appends), CHAR(tbs.updates), CHAR(tbs.deletes), CHAR(tbs.modtime) FROM tblstats tbs",
gats_fields,
- 6,
+ 5,
(char *)0,
0,
0,
},
+ {
+ /* Q__SDL - _SET_DEBUG_LEVEL */
+ "_set_debug_level",
+ "_sdl",
+ UPDATE,
+ (char *)0,
+ (char *)0,
+ (char *)0,
+ _sdl_fields,
+ 1,
+ (char *)0,
+ 0,
+ &_sdl_validate,
+ },
+
};
int QueryCount2 = (sizeof Queries2 / sizeof (struct query));