/* Query data */
-static char *galo_fields[] = {
+static char *galo2_fields[] = {
"login", "unix_uid", "shell", "last", "first", "middle",
};
-static char *gual_fields[] = {
+static char *galo_fields[] = {
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+};
+
+static char *gual2_fields[] = {
"login",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
-static char *gubl_fields[] = {
+static char *gual_fields[] = {
+ "login",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+};
+
+static char *gubl2_fields[] = {
"login",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
+static char *gubl_fields[] = {
+ "login",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "modtime", "modby", "modwith",
+};
+
static struct validate gubl_validate =
{
0,
followup_fix_modby,
};
-static char *guau_fields[] = {
+static char *guau2_fields[] = {
"unix_uid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
-static char *guan_fields[] = {
+static char *guau_fields[] = {
+ "unix_uid",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+};
+
+static char *guan2_fields[] = {
"first", "last",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
+static char *guan_fields[] = {
+ "first", "last",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+};
+
static struct validate guan_validate =
{
0,
followup_fix_modby,
};
-static char *guac_fields[] = {
+static char *guac2_fields[] = {
"class",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
-static char *guam_fields[] = {
+static char *guac_fields[] = {
+ "class",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+};
+
+static char *guam2_fields[] = {
"clearid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
-static char *gubu_fields[] = {
+static char *guam_fields[] = {
+ "clearid",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+};
+
+static char *gubu2_fields[] = {
"unix_uid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
+static char *gubu_fields[] = {
+ "unix_uid",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "modtime", "modby", "modwith",
+};
+
static struct validate gubu_validate =
{
VOnum0,
followup_fix_modby,
};
-static char *gubn_fields[] = {
+static char *gubn2_fields[] = {
"first", "last",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
+static char *gubn_fields[] = {
+ "first", "last",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "modtime", "modby", "modwith",
+};
+
static struct validate gubn_validate =
{
0,
followup_fix_modby,
};
-static char *gubc_fields[] = {
+static char *gubc2_fields[] = {
"class",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
-static char *gubm_fields[] = {
+static char *gubc_fields[] = {
+ "class",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
+ "status", "clearid", "class", "modtime", "modby", "modwith",
+};
+
+static char *gubm2_fields[] = {
"clearid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
-static char *auac_fields[] = {
+static char *gubm_fields[] = {
+ "clearid",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
+ "middle", "status", "clearid", "class", "modtime", "modby", "modwith",
+};
+
+static char *auac2_fields[] = {
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
};
-static struct valobj auac_valobj[] = {
+static char *auac_fields[] = {
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
+ "middle", "status", "clearid", "class", "comments", "signature", "secure",
+};
+
+static struct valobj auac2_valobj[] = {
{V_CHAR, 0, USERS_TABLE, "login"},
{V_NUM, 1},
{V_CHAR, 2, USERS_TABLE, "shell"},
{V_NUM, 11},
};
+static struct valobj auac_valobj[] = {
+ {V_CHAR, 0, USERS_TABLE, "login"},
+ {V_NUM, 1},
+ {V_CHAR, 2, USERS_TABLE, "shell"},
+ {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
+ {V_CHAR, 4, USERS_TABLE, "last"},
+ {V_CHAR, 5, USERS_TABLE, "first"},
+ {V_CHAR, 6, USERS_TABLE, "middle"},
+ {V_NUM, 7},
+ {V_CHAR, 8, USERS_TABLE, "clearid"},
+ {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
+ {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+ {V_NUM, 12},
+};
+
+static struct validate auac2_validate = {
+ auac2_valobj,
+ 11,
+ "login",
+ "login = '%s'",
+ 1,
+ "users_id",
+ 0,
+ setup_ausr,
+ followup_ausr,
+};
+
static struct validate auac_validate = {
auac_valobj,
- 11,
+ 12,
+ "login",
+ "login = '%s'",
+ 1,
+ "users_id",
+ 0,
+ setup_ausr,
+ followup_ausr,
+};
+
+static struct validate ausr2_validate = {
+ auac2_valobj,
+ 9,
"login",
"login = '%s'",
1,
static struct validate ausr_validate = {
auac_valobj,
- 9,
+ 10,
"login",
"login = '%s'",
1,
0,
};
-static char *uuac_fields[] = {
+static char *uuac2_fields[] = {
"login",
"newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
};
-static struct valobj uuac_valobj[] = {
+static char *uuac_fields[] = {
+ "login",
+ "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
+ "middle", "status", "clearid", "class", "comments", "signature", "secure",
+};
+
+static struct valobj uuac2_valobj[] = {
{V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
{V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
{V_NUM, 2},
{V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
{V_NUM, 12},
};
+
+static struct valobj uuac_valobj[] = {
+ {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
+ {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
+ {V_NUM, 2},
+ {V_CHAR, 3, USERS_TABLE, "shell"},
+ {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
+ {V_CHAR, 5, USERS_TABLE, "first"},
+ {V_CHAR, 6, USERS_TABLE, "last"},
+ {V_CHAR, 7, USERS_TABLE, "middle"},
+ {V_NUM, 8},
+ {V_CHAR, 9, USERS_TABLE, "clearid"},
+ {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
+ {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+ {V_NUM, 13},
+};
+
+static struct validate uuac2_validate = {
+ uuac2_valobj,
+ 12,
+ 0,
+ 0,
+ 0,
+ "users_id",
+ 0,
+ setup_ausr,
+ set_modtime_by_id,
+};
static struct validate uuac_validate = {
uuac_valobj,
- 12,
+ 13,
+ 0,
+ 0,
+ 0,
+ "users_id",
+ 0,
+ setup_ausr,
+ set_modtime_by_id,
+};
+
+static struct validate uusr2_validate = {
+ uuac2_valobj,
+ 10,
0,
0,
0,
set_finger_modtime,
};
+static char *uuws_fields[] = {
+ "login",
+ "winconsoleshell",
+};
+
+static struct valobj uuws_valobj[] = {
+ {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
+ {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
+};
+
+static struct validate uuws_validate = {
+ uuws_valobj,
+ 2,
+ 0,
+ 0,
+ 0,
+ "users_id",
+ access_user,
+ 0,
+ set_finger_modtime,
+};
+
static char *uust_fields[] = {
"login",
"status",
"name", "type", "modtime", "modby", "modwith",
};
-static char *ghst_fields[] = {
+static char *ghst2_fields[] = {
"name", "address", "location", "network",
"name", "vendor", "model", "os", "location", "contact", "use",
"status", "status_change", "network", "address", "ace_type",
"inuse", "modtime", "modby", "modwith",
};
+static char *ghbh2_fields[] = {
+ "hwaddr",
+ "name", "vendor", "model", "os", "location", "contact", "use",
+ "status", "status_change", "network", "address", "ace_type",
+ "ace_name", "admin_comment", "ops_comment", "created", "creator",
+ "inuse", "modtime", "modby", "modwith",
+};
+
+static char *ghst_fields[] = {
+ "name", "address", "location", "network",
+ "name", "vendor", "model", "os", "location", "contact", "billing_contact",
+ "use", "status", "status_change", "network", "address", "ace_type",
+ "ace_name", "admin_comment", "ops_comment", "created", "creator",
+ "inuse", "modtime", "modby", "modwith",
+};
+
+static char *ghbh_fields[] = {
+ "hwaddr",
+ "name", "vendor", "model", "os", "location", "contact", "billing_contact",
+ "use", "status", "status_change", "network", "address", "ace_type",
+ "ace_name", "admin_comment", "ops_comment", "created", "creator",
+ "inuse", "modtime", "modby", "modwith",
+};
+
static struct validate ghst_validate = {
0,
0,
"hwaddr",
};
-static char *ahst_fields[] = {
+static char *ahst2_fields[] = {
"name", "vendor", "model", "os", "location", "contact", "use",
"status", "subnet", "address", "ace_type", "ace_name",
"admin_comment", "ops_comment",
};
-static struct valobj ahst_valobj[] = {
+static struct valobj ahst2_valobj[] = {
{V_CHAR, 0, MACHINE_TABLE, "name"},
{V_CHAR, 1, MACHINE_TABLE, "vendor"},
{V_CHAR, 2, MACHINE_TABLE, "model"},
{V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
};
+static struct validate ahst2_validate = {
+ ahst2_valobj,
+ 13,
+ "name",
+ "name = UPPER('%s')",
+ 1,
+ "mach_id",
+ access_host,
+ setup_ahst,
+ set_uppercase_modtime,
+};
+
+static char *ahst_fields[] = {
+ "name", "vendor", "model", "os", "location", "contact", "billing_contact",
+ "use", "status", "subnet", "address", "ace_type", "ace_name",
+ "admin_comment", "ops_comment",
+};
+
+static struct valobj ahst_valobj[] = {
+ {V_CHAR, 0, MACHINE_TABLE, "name"},
+ {V_CHAR, 1, MACHINE_TABLE, "vendor"},
+ {V_CHAR, 2, MACHINE_TABLE, "model"},
+ {V_CHAR, 3, MACHINE_TABLE, "os"},
+ {V_CHAR, 4, MACHINE_TABLE, "location"},
+ {V_CHAR, 5, MACHINE_TABLE, "contact"},
+ {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
+ {V_NUM, 7},
+ {V_NUM, 8},
+ {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
+ {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
+ {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+ {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+};
+
static struct validate ahst_validate = {
ahst_valobj,
- 13,
+ 14,
"name",
"name = UPPER('%s')",
1,
set_uppercase_modtime,
};
-static char *uhst_fields[] = {
+static char *uhst2_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[] = {
+static struct valobj uhst2_valobj[] = {
{V_CHAR, 0, MACHINE_TABLE, "name"},
{V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
{V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
{V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
};
+static struct validate uhst2_validate = {
+ uhst2_valobj,
+ 15,
+ 0,
+ 0,
+ 0,
+ "mach_id",
+ access_host,
+ setup_ahst,
+ set_modtime_by_id,
+};
+
+static char *uhst_fields[] = {
+ "name",
+ "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
+ "use", "status", "subnet", "address", "ace_type", "ace_name",
+ "admin_comment", "ops_comment",
+};
+
+static struct valobj uhst_valobj[] = {
+ {V_CHAR, 0, MACHINE_TABLE, "name"},
+ {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
+ {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
+ {V_CHAR, 2, MACHINE_TABLE, "vendor"},
+ {V_CHAR, 3, MACHINE_TABLE, "model"},
+ {V_CHAR, 4, MACHINE_TABLE, "os"},
+ {V_CHAR, 5, MACHINE_TABLE, "location"},
+ {V_CHAR, 6, MACHINE_TABLE, "contact"},
+ {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
+ {V_NUM, 8},
+ {V_NUM, 9},
+ {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
+ {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
+ {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+ {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+};
+
static struct validate uhst_validate = {
uhst_valobj,
- 15,
+ 16,
0,
0,
0,
"ace_type", "ace_name", "description", "modtime", "modby", "modwith",
};
-static char *glin_fields[] = {
+static char *glin3_fields[] = {
"name",
"name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
"nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby",
"modwith",
};
+static char *glin_fields[] = {
+ "name",
+ "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
+ "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
+ "description", "modtime", "modby", "modwith",
+};
+
static struct validate glin_validate = {
0,
0,
set_modtime,
};
-static char *alis_fields[] = {
+static char *alis3_fields[] = {
"name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
"nfsgroup", "ace_type", "ace_name", "description",
};
-static struct valobj alis_valobj[] = {
+static struct valobj alis3_valobj[] = {
{V_CHAR, 0, LIST_TABLE, "name"},
{V_NUM, 1},
{V_NUM, 2},
{V_LEN, 10, LIST_TABLE, "description"},
};
-static struct validate alis_validate = {
- alis_valobj,
+static struct validate alis3_validate = {
+ alis3_valobj,
11,
"name",
"name = '%s'",
set_modtime,
};
-static char *ulis2_fields[] = {
- "name",
- "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
- "ace_type", "ace_name", "description",
+static char *alis_fields[] = {
+ "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
+ "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
+ "description",
};
-static struct valobj ulis2_valobj[] = {
- {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
- {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
+static struct valobj alis_valobj[] = {
+ {V_CHAR, 0, LIST_TABLE, "name"},
+ {V_NUM, 1},
+ {V_NUM, 2},
+ {V_NUM, 3},
+ {V_NUM, 4},
+ {V_NUM, 5},
+ {V_NUM, 6},
+ {V_NUM, 7},
+ {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
+ {V_LEN, 12, LIST_TABLE, "description"},
+};
+
+static struct validate alis_validate = {
+ alis_valobj,
+ 13,
+ "name",
+ "name = '%s'",
+ 1,
+ "list_id",
+ 0,
+ setup_alis,
+ set_modtime,
+};
+
+static char *ulis2_fields[] = {
+ "name",
+ "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
+ "ace_type", "ace_name", "description",
+};
+
+static struct valobj ulis2_valobj[] = {
+ {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
+ {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
{V_NUM, 2},
{V_NUM, 3},
{V_NUM, 4},
set_modtime_by_id,
};
-static char *ulis_fields[] = {
+static char *ulis3_fields[] = {
"name",
"newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
"nfsgroup", "ace_type", "ace_name", "description",
};
-static struct valobj ulis_valobj[] = {
+static struct valobj ulis3_valobj[] = {
{V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
{V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
{V_NUM, 2},
{V_LEN, 11, LIST_TABLE, "description"},
};
-static struct validate ulis_validate = {
- ulis_valobj,
+static struct validate ulis3_validate = {
+ ulis3_valobj,
12,
"name",
"list_id = %d",
set_modtime_by_id,
};
+static char *ulis_fields[] = {
+ "name",
+ "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
+ "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
+ "description",
+};
+
+static struct valobj ulis_valobj[] = {
+ {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
+ {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
+ {V_NUM, 2},
+ {V_NUM, 3},
+ {V_NUM, 4},
+ {V_NUM, 5},
+ {V_NUM, 6},
+ {V_NUM, 7},
+ {V_NUM, 8},
+ {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
+ {V_LEN, 13, LIST_TABLE, "description"},
+};
+
+static struct validate ulis_validate = {
+ ulis_valobj,
+ 14,
+ "name",
+ "list_id = %d",
+ 1,
+ "list_id",
+ access_list,
+ setup_alis,
+ set_modtime_by_id,
+};
+
static char *dlis_fields[] = {
"name",
};
{
amtl_valobj,
4,
- "tag",
- "list_id = %d AND member_type = '%s' AND member_id = %d",
- 3,
0,
- access_list,
0,
0,
+ 0,
+ access_list,
+ 0,
+ tag_member_of_list,
};
static struct validate dmfl_validate =
0,
access_service,
0,
- followup_glin,
+ followup_gsin,
};
static char *qgsv_fields[] = {
followup_dqot,
};
-static char *gzcl_fields[] = {
+static char *gzcl2_fields[] = {
"class",
"class", "xmt_type", "xmt_name", "sub_type", "sub_name",
"iws_type", "iws_name", "iui_type", "iui_name",
"modtime", "modby", "modwith",
};
+static char *gzcl_fields[] = {
+ "class",
+ "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
+ "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
+ "owner_id", "modtime", "modby", "modwith",
+};
+
static struct validate gzcl_validate = {
0,
0,
0,
0,
0,
- 0,
+ access_zephyr,
0,
followup_gzcl,
};
-static char *azcl_fields[] = {
+static char *azcl2_fields[] = {
"class", "xmt_type", "xmt_name", "sub_type", "sub_name",
"iws_type", "iws_name", "iui_type", "iui_name",
+};
+
+static struct valobj azcl2_valobj[] = {
+ {V_CHAR, 0, ZEPHYR_TABLE, "class"},
+ {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
+};
+
+static struct validate azcl2_validate = {
+ azcl2_valobj,
+ 9,
+ "class",
+ "class = '%s'",
+ 1,
+ 0,
+ 0,
+ 0,
+ set_zephyr_modtime,
+};
+
+static char *azcl_fields[] = {
+ "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
+ "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
+ "owner_id",
};
static struct valobj azcl_valobj[] = {
{V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
{V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
{V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
};
static struct validate azcl_validate = {
azcl_valobj,
- 9,
+ 11,
"class",
"class = '%s'",
1,
set_zephyr_modtime,
};
-static char *uzcl_fields[] = {
+static char *uzcl2_fields[] = {
"class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
"iws_type", "iws_name", "iui_type", "iui_name",
};
+static struct valobj uzcl2_valobj[] = {
+ {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
+ {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
+ {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
+ {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
+};
+
+static struct validate uzcl2_validate = {
+ uzcl2_valobj,
+ 10,
+ "class",
+ "class = '%s'",
+ 1,
+ 0,
+ access_zephyr,
+ 0,
+ set_zephyr_modtime,
+};
+
+static char *uzcl_fields[] = {
+ "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
+ "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
+};
+
static struct valobj uzcl_valobj[] = {
{V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
{V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
{V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
{V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
{V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
+ {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
+ {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
};
static struct validate uzcl_validate = {
uzcl_valobj,
- 10,
+ 12,
"class",
"class = '%s'",
1,
0,
- 0,
+ access_zephyr,
0,
set_zephyr_modtime,
};
};
static char *gsvc_fields[] = {
- "service",
+ "service", "protocol",
"service", "protocol", "port", "description", "modtime", "modby", "modwith",
};
"service", "protocol", "port", "description",
};
+static char *dsvc_fields[] = {
+ "service", "protocol",
+};
+
static struct valobj asvc_valobj[] = {
{V_CHAR, 0, SERVICES_TABLE, "name"},
{V_CHAR, 1, SERVICES_TABLE, "protocol"},
asvc_valobj,
4,
"name",
- "name = '%s'",
- 1,
+ "name = '%s' AND protocol = '%s'",
+ 2,
+ 0,
+ 0,
+ 0,
+ set_service_modtime,
+};
+
+static struct validate dsvc_validate = {
+ asvc_valobj,
+ 2,
+ "name",
+ "name = '%s' AND protocol = '%s'",
+ 2,
+ 0,
0,
0,
0,
- set_modtime,
};
static char *gprn_fields[] = {
_sdl_followup,
};
+static char *gusl_fields[] = {
+ "login", "domain_sid",
+ "login", "sid", "created",
+};
+
+static struct validate gusl_validate =
+{
+ VOuser0,
+ 1,
+ NULL,
+ NULL,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+};
+
+static char *glsn_fields[] = {
+ "name", "domain_sid",
+ "name", "sid", "created",
+};
+
+static struct validate glsn_validate =
+{
+ VOlist0,
+ 1,
+ NULL,
+ NULL,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+};
+
+static char *ausl_fields[] = {
+ "login", "sid",
+};
+
+static struct validate ausl_validate =
+{
+ VOuser0,
+ 1,
+ "sid",
+ "users_id = %d AND sid = '%s'",
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
+};
+
+static char *alsn_fields[] = {
+ "name", "sid",
+};
+
+static struct validate alsn_validate =
+{
+ VOlist0,
+ 1,
+ "sid",
+ "list_id = %d AND sid = '%s'",
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
+};
+
+static char *gdds_fields[] = {
+ "sid",
+};
\f
/* Generalized Query Definitions */
struct query Queries[] = {
{
- /* Q_GALO - GET_ALL_LOGINS */
+ /* Q_GALO - GET_ALL_LOGINS, v2 */
"get_all_logins",
"galo",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
- galo_fields,
+ galo2_fields,
6,
"u.users_id != 0",
0,
},
{
- /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
+ /* Q_GALO - GET_ALL_LOGINS, v3 */
+ "get_all_logins",
+ "galo",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
+ galo_fields,
+ 7,
+ "u.users_id != 0",
+ 0,
+ "u.login",
+ 0,
+ },
+
+ {
+ /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
"get_all_active_logins",
"gaal",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
- galo_fields,
+ galo2_fields,
6,
"u.status = 1",
0,
},
{
- /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN */
+ /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
+ "get_all_active_logins",
+ "gaal",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
+ galo_fields,
+ 7,
+ "u.status = 1",
+ 0,
+ "u.login",
+ 0,
+ },
+
+ {
+ /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
"get_user_account_by_login",
"gual",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
- gual_fields,
+ gual2_fields,
15,
"u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
1,
},
{
- /* Q_GUAU - GET_USER_ACCOUNT_BY_UID */
+ /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
+ "get_user_account_by_login",
+ "gual",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
+ gual_fields,
+ 16,
+ "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
+ 1,
+ "u.login",
+ &gubl_validate,
+ },
+
+ {
+ /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
"get_user_account_by_uid",
"guau",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
- guau_fields,
+ guau2_fields,
15,
"u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
1,
},
{
- /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME */
+ /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
+ "get_user_account_by_uid",
+ "guau",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
+ guau_fields,
+ 16,
+ "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
+ 1,
+ "u.login",
+ &gubu_validate,
+ },
+
+ {
+ /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
"get_user_account_by_name",
"guan",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
- guan_fields,
+ guan2_fields,
15,
"u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
2,
},
{
- /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS */
+ /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
+ "get_user_account_by_name",
+ "guan",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
+ guan_fields,
+ 16,
+ "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
+ 2,
+ "u.login",
+ &guan_validate,
+ },
+
+ {
+ /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
"get_user_account_by_class",
"guac",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
- guac_fields,
+ guac2_fields,
15,
"u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
1,
},
{
- /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID */
+ /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
+ "get_user_account_by_class",
+ "guac",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
+ guac_fields,
+ 16,
+ "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
+ {
+ /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
"get_user_account_by_id",
"guai",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
- guam_fields,
+ guam2_fields,
15,
"u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
1,
},
{
- /* Q_GUBL - GET_USER_BY_LOGIN */
+ /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
+ "get_user_account_by_id",
+ "guai",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
+ guam_fields,
+ 16,
+ "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
+ {
+ /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
"get_user_by_login",
"gubl",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
- gubl_fields,
+ gubl2_fields,
12,
"u.login LIKE '%s' AND u.users_id != 0",
1,
},
{
- /* Q_GUBU - GET_USER_BY_UID */
+ /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
+ "get_user_by_login",
+ "gubl",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubl_fields,
+ 13,
+ "u.login LIKE '%s' AND u.users_id != 0",
+ 1,
+ "u.login",
+ &gubl_validate,
+ },
+
+ {
+ /* Q_GUBU - GET_USER_BY_UID, v2 */
"get_user_by_uid",
"gubu",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
- gubu_fields,
+ gubu2_fields,
12,
"u.unix_uid = %s AND u.users_id != 0",
1,
},
{
- /* Q_GUBN - GET_USER_BY_NAME */
+ /* Q_GUBU - GET_USER_BY_UID, v3 */
+ "get_user_by_uid",
+ "gubu",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubu_fields,
+ 13,
+ "u.unix_uid = %s AND u.users_id != 0",
+ 1,
+ "u.login",
+ &gubu_validate,
+ },
+
+ {
+ /* Q_GUBN - GET_USER_BY_NAME, v2 */
"get_user_by_name",
"gubn",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
- gubn_fields,
+ gubn2_fields,
12,
"u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
2,
},
{
- /* Q_GUBC - GET_USER_BY_CLASS */
+ /* Q_GUBN - GET_USER_BY_NAME, v3 */
+ "get_user_by_name",
+ "gubn",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubn_fields,
+ 13,
+ "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
+ 2,
+ "u.login",
+ &gubn_validate,
+ },
+
+ {
+ /* Q_GUBC - GET_USER_BY_CLASS, v2 */
"get_user_by_class",
"gubc",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
- gubc_fields,
+ gubc2_fields,
12,
"u.type = UPPER('%s') AND u.users_id != 0",
1,
},
{
- /* Q_GUBM - GET_USER_BY_MITID */
+ /* Q_GUBC - GET_USER_BY_CLASS, v3 */
+ "get_user_by_class",
+ "gubc",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubc_fields,
+ 13,
+ "u.type = UPPER('%s') AND u.users_id != 0",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
+ {
+ /* Q_GUBM - GET_USER_BY_MITID, v2 */
"get_user_by_mitid",
"gubm",
2,
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
- gubm_fields,
+ gubm2_fields,
12,
"u.clearid LIKE '%s' AND u.users_id != 0",
1,
},
{
- /* Q_AUAC - ADD_USER_ACCOUNT */ /* uses prefetch_value() for users_id */
+ /* Q_GUBM - GET_USER_BY_MITID, v3 */
+ "get_user_by_mitid",
+ "gubm",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubm_fields,
+ 13,
+ "u.clearid LIKE '%s' AND u.users_id != 0",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
+ {
+ /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
"add_user_account",
"auac",
2,
* but using up one argv element.
*/
"INTO users (login, unix_uid, shell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)",
- auac_fields,
+ auac2_fields,
12,
NULL,
0,
NULL,
+ &auac2_validate,
+ },
+
+ {
+ /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
+ "add_user_account",
+ "auac",
+ 3,
+ APPEND,
+ "u",
+ USERS_TABLE,
+ /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
+ * but using up one argv element.
+ */
+ "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)",
+ auac_fields,
+ 13,
+ NULL,
+ 0,
+ NULL,
&auac_validate,
},
{
- /* Q_AUSR - ADD_USER */ /* uses prefetch_value() for users_id */
+ /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
"add_user",
"ausr",
2,
"u",
USERS_TABLE,
"INTO users (login, unix_uid, shell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)",
+ auac2_fields,
+ 9,
+ 0,
+ 0,
+ NULL,
+ &ausr2_validate,
+ },
+
+ {
+ /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
+ "add_user",
+ "ausr",
+ 3,
+ APPEND,
+ "u",
+ USERS_TABLE,
+ "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)",
auac_fields,
- 9,
+ 10,
0,
0,
NULL,
},
{
- /* Q_UUAC - UPDATE_USER_ACCOUNT */
+ /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
"update_user_account",
"uuac",
2,
USERS_TABLE,
/* See comment in auac about signature. */
"users SET login = '%s', unix_uid = %s, shell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s",
- uuac_fields,
+ uuac2_fields,
12,
"users_id = %d",
1,
NULL,
+ &uuac2_validate,
+ },
+
+ {
+ /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
+ "update_user_account",
+ "uuac",
+ 3,
+ UPDATE,
+ "u",
+ USERS_TABLE,
+ /* See comment in auac about signature. */
+ "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s",
+ uuac_fields,
+ 13,
+ "users_id = %d",
+ 1,
+ NULL,
&uuac_validate,
},
{
- /* Q_UUSR - UPDATE_USER */
+ /* Q_UUSR - UPDATE_USER, v2 */
"update_user",
"uusr",
2,
"u",
USERS_TABLE,
"users SET login = '%s', unix_uid = %s, shell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s'",
- uuac_fields,
+ uuac2_fields,
9,
"users_id = %d",
1,
NULL,
+ &uusr2_validate,
+ },
+
+ {
+ /* Q_UUSR - UPDATE_USER, v3 */
+ "update_user",
+ "uusr",
+ 3,
+ UPDATE,
+ "u",
+ USERS_TABLE,
+ "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s'",
+ uuac_fields,
+ 10,
+ "users_id = %d",
+ 1,
+ NULL,
&uusr_validate,
},
&uush_validate,
},
+ {
+ /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
+ "update_user_windows_shell",
+ "uuws",
+ 2,
+ UPDATE,
+ "u",
+ USERS_TABLE,
+ "users SET winconsoleshell = '%s'",
+ uuws_fields,
+ 1,
+ "users_id = %d",
+ 1,
+ NULL,
+ &uuws_validate,
+ },
+
{
/* Q_UUST - UPDATE_USER_STATUS */
"update_user_status",
},
{
- /* Q_GHST - GET_HOST */
+ /* Q_GHST - GET_HOST, v2 */
"get_host",
"ghst",
2,
"m",
MACHINE_TABLE,
"m.name, m.vendor, m.model, m.os, m.location, m.contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s",
- ghst_fields,
+ ghst2_fields,
21,
"m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4,
},
{
- /* Q_GHBH - GET_HOST_BY_HWADDR */
+ /* Q_GHST - GET_HOST, v6 */
+ "get_host",
+ "ghst",
+ 6,
+ RETRIEVE,
+ "m",
+ MACHINE_TABLE,
+ "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s",
+ ghst_fields,
+ 22,
+ "m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
+ 4,
+ "m.name",
+ &ghst_validate,
+ },
+
+ {
+ /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
"get_host_by_hwaddr",
"ghbh",
2,
"m",
MACHINE_TABLE,
"m.name, m.vendor, m.model, m.os, m.location, m.contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s",
- ghst_fields,
+ ghbh2_fields,
21,
"m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
1,
"m.name",
- NULL,
+ &ghst_validate,
+ },
+
+ {
+ /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
+ "get_host_by_hwaddr",
+ "ghbh",
+ 6,
+ RETRIEVE,
+ "m",
+ MACHINE_TABLE,
+ "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s",
+ ghbh_fields,
+ 22,
+ "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
+ 1,
+ "m.name",
+ &ghst_validate,
},
{
},
{
- /* Q_AHST - ADD_HOST */ /* uses prefetch_value() for mach_id */
+ /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
"add_host",
"ahst",
2,
"m",
MACHINE_TABLE,
"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 (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)",
- ahst_fields,
+ ahst2_fields,
14,
0,
0,
NULL,
+ &ahst2_validate,
+ },
+
+ {
+ /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
+ "add_host",
+ "ahst",
+ 6,
+ APPEND,
+ "m",
+ MACHINE_TABLE,
+ "INTO machine (name, vendor, model, os, location, contact, billing_contact, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)",
+ ahst_fields,
+ 15,
+ 0,
+ 0,
+ NULL,
&ahst_validate,
},
{
- /* Q_UHST - UPDATE_HOST */
+ /* Q_UHST - UPDATE_HOST, v2 */
"update_host",
"uhst",
2,
"m",
MACHINE_TABLE,
"machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d",
- uhst_fields,
+ uhst2_fields,
14,
"mach_id = %d",
1,
NULL,
+ &uhst2_validate,
+ },
+
+ {
+ /* Q_UHST - UPDATE_HOST, v6 */
+ "update_host",
+ "uhst",
+ 6,
+ UPDATE,
+ "m",
+ MACHINE_TABLE,
+ "machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), billing_contact = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d",
+ uhst_fields,
+ 15,
+ "mach_id = %d",
+ 1,
+ NULL,
&uhst_validate,
},
"l",
LIST_TABLE,
"name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list",
- glin_fields,
+ glin3_fields,
14,
"name LIKE '%s'",
1,
&glin_validate,
},
+ {
+ /* Q_GLIN - GET_LIST_INFO, v4 */
+ "get_list_info",
+ "glin",
+ 4,
+ RETRIEVE,
+ "l",
+ LIST_TABLE,
+ "name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, memacl_type, memacl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list",
+ glin_fields,
+ 16,
+ "name LIKE '%s'",
+ 1,
+ "name",
+ &glin_validate,
+ },
+
{
/* Q_EXLN - EXPAND_LIST_NAMES */
"expand_list_names",
"l",
LIST_TABLE,
"INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, '%s', %d, NVL('%s', CHR(0)), %s)",
- alis_fields,
+ alis3_fields,
11,
0,
0,
NULL,
+ &alis3_validate,
+ },
+
+ {
+ /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
+ "add_list",
+ "alis",
+ 4,
+ APPEND,
+ "l",
+ LIST_TABLE,
+ "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, memacl_type, memacl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, '%s', %d, '%s', %d, NVL('%s', CHR(0)), %s)",
+ alis_fields,
+ 13,
+ 0,
+ 0,
+ NULL,
&alis_validate,
},
"l",
LIST_TABLE,
"list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, acl_type = '%s', acl_id = %d, description = NVL('%s', CHR(0))",
- ulis_fields,
+ ulis3_fields,
11,
"list_id = %d",
1,
NULL,
+ &ulis3_validate,
+ },
+
+ {
+ /* Q_ULIS, UPDATE_LIST, v4 */
+ "update_list",
+ "ulis",
+ 4,
+ UPDATE,
+ "l",
+ LIST_TABLE,
+ "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, acl_type = '%s', acl_id = %d, memacl_type = '%s', memacl_id = %d, description = NVL('%s', CHR(0))",
+ ulis_fields,
+ 13,
+ "list_id = %d",
+ 1,
+ NULL,
&ulis_validate,
},
"tmol",
2,
UPDATE,
- "im",
+ 0,
IMEMBERS_TABLE,
- "imembers SET tag = %d",
+ 0,
atml_fields,
1,
- "list_id = %d AND member_type = '%s' and member_id = %d",
+ 0,
3,
NULL,
&tmol_validate,
},
{
- /* Q_GZCL - GET_ZEPHYR_CLASS */
+ /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
"get_zephyr_class",
"gzcl",
2,
"z",
ZEPHYR_TABLE,
"class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM zephyr",
- gzcl_fields,
+ gzcl2_fields,
12,
"class LIKE '%s'",
1,
},
{
- /* Q_AZCL - ADD_ZEPHYR_CLASS */
+ /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
+ "get_zephyr_class",
+ "gzcl",
+ 5,
+ RETRIEVE,
+ "z",
+ ZEPHYR_TABLE,
+ "class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM zephyr",
+ gzcl_fields,
+ 14,
+ "class LIKE '%s'",
+ 1,
+ "class",
+ &gzcl_validate,
+ },
+
+ {
+ /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
"add_zephyr_class",
"azcl",
2,
"z",
ZEPHYR_TABLE,
"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,
+ azcl2_fields,
9,
0,
0,
NULL,
+ &azcl2_validate,
+ },
+
+ {
+ /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
+ "add_zephyr_class",
+ "azcl",
+ 5,
+ APPEND,
+ "z",
+ ZEPHYR_TABLE,
+ "INTO zephyr (class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, owner_type, owner_id) VALUES ('%s', '%s', %d, '%s', %d, '%s', %d, '%s', %d, '%s', %d)",
+ azcl_fields,
+ 11,
+ 0,
+ 0,
+ NULL,
&azcl_validate,
},
{
- /* Q_UZCL - UPDATE_ZEPHYR_CLASS */
+ /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
"update_zephyr_class",
"uzcl",
2,
"z",
ZEPHYR_TABLE,
"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,
+ uzcl2_fields,
9,
"class = '%s'",
1,
NULL,
+ &uzcl2_validate,
+ },
+
+ {
+ /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
+ "update_zephyr_class",
+ "uzcl",
+ 5,
+ UPDATE,
+ "z",
+ ZEPHYR_TABLE,
+ "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, owner_type = '%s', owner_id = %d",
+ uzcl_fields,
+ 11,
+ "class = '%s'",
+ 1,
+ NULL,
&uzcl_validate,
},
"name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
gsvc_fields,
7,
- "name LIKE '%s'",
- 1,
+ "name LIKE '%s' AND protocol LIKE '%s'",
+ 2,
"name",
&VDfix_modby,
},
"ss",
SERVICES_TABLE,
0,
- asvc_fields,
+ dsvc_fields,
0,
- "name = '%s'",
- 1,
+ "name = '%s' AND protocol = '%s'",
+ 2,
NULL,
- &asvc_validate,
+ &dsvc_validate,
},
{
&_sdl_validate,
},
+ {
+ /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */
+ "get_user_sids_by_login",
+ "gusl",
+ 4,
+ RETRIEVE,
+ "s",
+ USERSIDS_TABLE,
+ "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us",
+ gusl_fields,
+ 3,
+ "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'",
+ 2,
+ NULL,
+ &gusl_validate,
+ },
+
+ {
+ /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */
+ "add_user_sid_by_login",
+ "ausl",
+ 4,
+ APPEND,
+ "s",
+ USERSIDS_TABLE,
+ "INTO usersids (users_id, sid) VALUES (%d, '%s')",
+ ausl_fields,
+ 2,
+ NULL,
+ 0,
+ NULL,
+ &ausl_validate,
+ },
+
+ {
+ /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */
+ "get_list_sids_by_name",
+ "glsn",
+ 4,
+ RETRIEVE,
+ "s",
+ LISTSIDS_TABLE,
+ "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls",
+ glsn_fields,
+ 3,
+ "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'",
+ 2,
+ NULL,
+ &glsn_validate,
+ },
+
+ {
+ /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */
+ "add_list_sid_by_name",
+ "alsn",
+ 4,
+ APPEND,
+ "s",
+ LISTSIDS_TABLE,
+ "INTO listsids (list_id, sid) VALUES (%d, '%s')",
+ alsn_fields,
+ 2,
+ NULL,
+ 0,
+ NULL,
+ &alsn_validate,
+ },
+
+ {
+ /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */
+ "get_distinct_domain_sids",
+ "gdds",
+ 4,
+ RETRIEVE,
+ "s",
+ USERSIDS_TABLE,
+ "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids",
+ gdds_fields,
+ 1,
+ NULL,
+ 0,
+ NULL,
+ NULL,
+ },
+
};
int QueryCount = (sizeof(Queries) / sizeof(struct query));