]> andersk Git - moira.git/blobdiff - server/queries2.c
Kludge around Ingres brokenness in two places:
[moira.git] / server / queries2.c
index 3c9baadd7a462b0e04e3593c7444fa27ed0f418b..cf0dcb14a730714d212c7f8e14cb250f17deaf30 100644 (file)
@@ -97,6 +97,7 @@ int count_members_of_list();
 int get_lists_of_member();
 int register_user();
 int _sdl_followup();
+int get_hostalias();
 
 
 \f
@@ -770,8 +771,8 @@ static char *gmac_fields[] = {
 };
 
 static char *ghst_fields[] = {
-  NAME, ADDRESS, "location", "contact",
-  NAME, "vendor", "model", "os", "location", "contact", "use", "status", "status_change", SUBNET, ADDRESS, ACE_TYPE, ACE_NAME, "admin_comment", "ops_comment", "created", "creator", "inuse", MOD1, MOD2, MOD3,
+  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[] = {
@@ -898,7 +899,7 @@ static struct validate ghal_validate = {
   0,
   access_ahal,
   0,
-  0,
+  get_hostalias,
 };
 
 static struct valobj ahal_valobj[] = {
@@ -2994,7 +2995,7 @@ struct query Queries2[] = {
     "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 m.contact LIKE '%s' ESCAPE '*' AND m.mach_id != 0 AND s.snet_id = m.snet_id", 
+    "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,
   },
@@ -3049,7 +3050,7 @@ struct query Queries2[] = {
     "get_hostalias",
     "ghal",
     RETRIEVE,
-    "a",
+    0,
     "hostalias",
     "CHAR(a.name), CHAR(m.name) FROM hostalias a, machine m",
     ghal_fields,
This page took 0.033439 seconds and 4 git commands to generate.