]> andersk Git - moira.git/commitdiff
Wildcards now work on gubl! users.type is no longer VARCHAR.
authorgenoa <genoa>
Mon, 20 Jul 1992 20:46:07 +0000 (20:46 +0000)
committergenoa <genoa>
Mon, 20 Jul 1992 20:46:07 +0000 (20:46 +0000)
server/queries2.c

index 663075d128b700912493ee6349e3f713636ae5be..e966e935d7043a2fbd6128d7fdd049f19b4b728c 100644 (file)
@@ -135,6 +135,11 @@ static struct valobj VOsort0[] = {
   {V_SORT, 0, 0, 0, 0, 0},
 };
 
+static struct valobj VOwild0sort[] = {
+  {V_WILD, 0},
+  {V_SORT, 0, 0, 0, 0, 0},
+};
+
 static struct valobj VOdate1[] = {
   {V_DATE, 1, 0, 0, 0, MR_DATE},
 };
@@ -191,6 +196,7 @@ static struct valobj VOfilsys0user1[] = {
  */
 
 static struct validate VDmach = { VOmach0, 1 };
+static struct validate VDsort0= { VOsort0, 1 };
 static struct validate VDsort2= { VOsort01,2 };
 static struct validate VDsortf = { 
     VOsort0,
@@ -218,10 +224,10 @@ static char *gubl_fields[] = {
   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,
@@ -237,6 +243,19 @@ 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, 
@@ -1963,7 +1982,7 @@ struct query Queries2[] = {
     6,
     "users_id != 0",
     0,
-    0,
+    &VDsort0,
   },
 
   {
@@ -1978,7 +1997,7 @@ struct query Queries2[] = {
     6,
     "status = 1",
     0,
-    0,
+    &VDsort0,
   },
 
   {
@@ -1988,12 +2007,12 @@ struct query Queries2[] = {
     RETRIEVE,
     "u",
     USERS,  
-    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), CHAR(type), CHAR(modtime), CHAR(modby), modwith FROM users",
+    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users",
     gubl_fields,
     12,
     "login LIKE '%s' ESCAPE '*' AND users_id != 0",
     1,
-    &gubx_validate,
+    &gubl_validate,
   },
 
   {
@@ -2003,12 +2022,12 @@ struct query Queries2[] = {
     RETRIEVE,
     "u",
     USERS,
-    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), CHAR(type), CHAR(modtime), CHAR(modby), modwith FROM users",
+    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users",
     gubu_fields,
     12,
     "uid = %s AND users_id != 0",
     1,
-    &gubx_validate,
+    &gubu_validate,
   },
 
   {
@@ -2018,7 +2037,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "u",
     USERS,
-    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), CHAR(type), CHAR(modtime), CHAR(modby), modwith FROM users",
+    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users",
     gubn_fields,
     12,
     "first LIKE '%s' ESCAPE '*' AND last LIKE '%s' ESCAPE '*' AND users_id != 0",
@@ -2033,7 +2052,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "u",
     USERS,
-    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), CHAR(type), CHAR(modtime), CHAR(modby), modwith FROM users",
+    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users",
     gubc_fields,
     12,
     "type = uppercase('%s') AND users_id != 0",
@@ -2048,7 +2067,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "u",
     USERS,
-    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), CHAR(type), CHAR(modtime), CHAR(modby), modwith FROM users",
+    "CHAR(login), CHAR(uid), shell, CHAR(last), CHAR(first), middle, CHAR(status), CHAR(clearid), type, CHAR(modtime), CHAR(modby), modwith FROM users",
     gubm_fields,
     12,
     "clearid LIKE '%s' ESCAPE '*' AND users_id != 0",
This page took 0.057132 seconds and 5 git commands to generate.