]> andersk Git - moira.git/blobdiff - server/queries2.c
make get_host not fail if user doesn't exist
[moira.git] / server / queries2.c
index 3d7083ebb3348f461a8b91c5f422a8dcc7f2e873..e13efc729bdf355ad64eb55cf556a3438c47d8ba 100644 (file)
@@ -770,8 +770,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[] = {
@@ -976,8 +976,8 @@ static struct validate asnt_validate =
     asnt_valobj,
     4,
     NAME,
-    "name = uppercase(LEFT('%s',SIZE(name))) OR description = '__'+'%s' OR saddr = '%s'",
-    3,
+    "name = uppercase(LEFT('%s',SIZE(name)))",
+    1,
     SNET_ID,
     0,
     prefetch_value,
@@ -1002,8 +1002,8 @@ static struct validate usnt_validate =
     usnt_valobj,
     5,
     NAME,
-    "snet_id = %d OR description = '__'+'%s' OR description = '__'+'%s' OR saddr = '%s'",
-    4,
+    "snet_id = %d",
+    1,
     SNET_ID,
     0,
     0,
@@ -2994,7 +2994,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,
   },
This page took 0.043553 seconds and 4 git commands to generate.