]> andersk Git - moira.git/blobdiff - server/queries2.c
First and last name in the users table now act case insensitive.
[moira.git] / server / queries2.c
index 2f79f144cecc941d270c94dd52e06952e8599cb2..05fb50d9beb690735b270339d1257768deb62bb9 100644 (file)
@@ -56,6 +56,8 @@ int followup_gzcl();
 int followup_gsha();
 int followup_gqot();
 int followup_gpce();
+int followup_guax();
+int followup_uuac();
 
 int set_modtime();
 int set_modtime_by_id();
@@ -77,6 +79,7 @@ int delete_member_from_list();
 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();
@@ -96,6 +99,7 @@ static char ACE_TYPE[] = "ace_type";
 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";
@@ -118,8 +122,10 @@ 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 STATUS[] = "status";
 static char TYPE[] = "type";
 static char USERS[] = "users";
@@ -168,11 +174,18 @@ static struct valobj VOwild01sort01[] = {
   {V_SORT, 1}, 
 };
 
+static struct valobj VOupwild01sort01[] = {
+  {V_UPWILD, 0},
+  {V_UPWILD, 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},
+  {V_WILD, 0},
+  {V_WILD, 1},
+  {V_WILD, 2},
+  {V_SORT, 0},
 };
 
 static struct valobj VOdate1[] = {
@@ -261,6 +274,18 @@ static struct validate VDwildsortf = {
     followup_fix_modby,
 };
 
+static struct validate VDwild2sortf = { 
+    VOwild01sort01,
+    4,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    followup_fix_modby,
+};
+
 static struct validate VDupwildsortf = { 
     VOupwild0sort,
     2,
@@ -273,6 +298,18 @@ static struct validate VDupwildsortf = {
     followup_fix_modby,
 };
 
+static struct validate VDupwild2sortf = { 
+    VOupwild01sort01,
+    4,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    followup_fix_modby,
+};
+
 
 \f
 /* Query data */
@@ -281,10 +318,16 @@ static char *galo_fields[] = {
   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 gubl_validate = 
@@ -297,13 +340,37 @@ static struct validate gubl_validate =
   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 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[] = {
-  UID,
-  LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, 
-  MIT_ID, CLASS, MOD1, MOD2, MOD3,
+    UID,
+    LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, 
+    MIT_ID, CLASS, MOD1, MOD2, MOD3,
 };
 
 static struct validate gubu_validate = 
@@ -325,10 +392,10 @@ static char *gubn_fields[] = {
   MIT_ID, CLASS, MOD1, MOD2, MOD3,
 };
 
-static struct validate gubn_validate =
+static struct validate gubn_validate = /* Q_GUBN, Q_GUAN */
 {
-    VOwild01sort0,
-    3,
+    VOupwild01sort01,
+    4,
     0,
     0,
     0,
@@ -350,12 +417,12 @@ static char *gubm_fields[] = {
   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},
@@ -363,13 +430,26 @@ static struct valobj ausr_valobj[] = {
   {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,
+  "users.login = LEFT('%s',SIZE(users.login))",
+  1,
+  USERS_ID,
+  0,
+  setup_ausr,
+  followup_ausr,
+};
 static struct validate ausr_validate = {
-  ausr_valobj,
+  auac_valobj,
   7,
   LOGIN,
-  "users.login = LEFT('%s',SIZE(users.login))",
+  "users.login = LEFT('%s',SIZE(users.login))",  
   1,
   USERS_ID,
   0,
@@ -400,13 +480,13 @@ static struct validate rusr_validate = {
   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 uusr_valobj[] = {
+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},
@@ -415,18 +495,31 @@ static struct valobj uusr_valobj[] = {
     {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 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,
-  set_modtime_by_id,
+  setup_ausr,
+  followup_uuac,
 };
 
 static char *uush_fields[] = {
@@ -451,6 +544,11 @@ static char *uust_fields[] = {
   STATUS,
 };
 
+static char *uuss_fields[] = {
+  LOGIN,
+  SECURE,
+};
 static struct validate uust_validate = {
   VOuser0lock,
   2,
@@ -1181,13 +1279,13 @@ static char *gslo_fields[] = {
 
 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,
 };
 
@@ -1205,7 +1303,7 @@ static struct validate gfsm_validate = {
 
 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,
 };
 
@@ -1227,9 +1325,15 @@ static struct validate gfsn_validate = {
   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,
 };
 
@@ -1246,7 +1350,7 @@ static struct validate gfsg_validate = {
 };
 
 static char *afil_fields[] = {
-  LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
+  LABEL, TYPE, MACHINE, NAME, "mount", "access", COMMENTS, "owner", "owners",
   "create", "lockertype",
 };
 
@@ -1274,7 +1378,7 @@ static struct validate afil_validate = {
 };
 
 static char *ufil_fields[] = {
-  LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments",
+  LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", COMMENTS,
   "owner", "owners", "create", "lockertype",
 };
 
@@ -1359,7 +1463,7 @@ static struct validate aftg_validate = {
     2,
     0,
     0,
-    setup_aftg,
+    0,
     0,
 };
 
@@ -1779,6 +1883,18 @@ static struct validate gmol_validate = {
   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", "publicflg", "hidden", "maillist", "grouplist",
@@ -1931,7 +2047,7 @@ static struct validate asvc_validate = {
 static char *gpce_fields[] = {
     "printer",
     "printer", "spooling_host", "spool_directory", "rprinter",
-    "quotaserver", "authenticate", "price", "comments",
+    "quotaserver", "authenticate", "price", COMMENTS,
     MOD1, MOD2, MOD3,
 };
 
@@ -1949,7 +2065,7 @@ static struct validate gpce_validate = {
 
 static char *apce_fields[] = {
     "printer", "spooling_host", "spool_directory", "rprinter",
-    "quotaserver", "authenticate", "price", "comments",
+    "quotaserver", "authenticate", "price", COMMENTS,
     MOD1, MOD2, MOD3,
 };
 
@@ -1985,7 +2101,7 @@ static struct validate dpce_validate = {
 
 static char *gpcp_fields[] = {
     "printer",
-    "printer", "spooling_host", "spool_directory", "rprinter", "comments",
+    "printer", "spooling_host", "spool_directory", "rprinter", COMMENTS,
     MOD1, MOD2, MOD3,
 };
 
@@ -2151,6 +2267,81 @@ struct query Queries2[] = {
     &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, 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, 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, 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.searchfirst LIKE '%s' ESCAPE '*' AND u.searchlast LIKE '%s' ESCAPE '*' AND u.users_id != 0 and u.comment = str.string_id",
+      2,
+      &gubn_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, 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, 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",
@@ -2191,7 +2382,7 @@ struct query Queries2[] = {
     "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",
+    "searchfirst LIKE '%s' ESCAPE '*' AND searchlast LIKE '%s' ESCAPE '*' AND users_id != 0",
     2,
     &gubn_validate,
   },
@@ -2226,7 +2417,21 @@ struct query Queries2[] = {
     &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 */  /* uses prefetch_value() for users_id */
     "add_user",
@@ -2234,8 +2439,8 @@ struct query Queries2[] = {
     APPEND,
     "u",
     USERS,
-    "INTO users (login, uid, shell, last, first, middle, status, clearid, type, users_id) VALUES ( '%s', %s, '%s', '%s',  '%s',  '%s',  %s, '%s',  '%s', %s)",
-    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,
     0,
     0,
@@ -2257,6 +2462,21 @@ struct query Queries2[] = {
     &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",
@@ -2265,7 +2485,7 @@ struct query Queries2[] = {
     "u",
     USERS,
     "users SET login = '%s', uid = %s, shell = '%s', last = '%s', first = '%s', middle = '%s', status = %s, clearid = '%s',  type = '%s'",
-    uusr_fields,
+    uuac_fields,
     9,
     "users_id = %d",
     1,
@@ -2302,6 +2522,21 @@ struct query Queries2[] = {
     &uust_validate,
   },
 
+  {
+    /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
+    "update_user_security_status",
+    "uuss",
+    UPDATE,
+    "u",
+    USERS,
+    "secure = %s",
+    uuss_fields,
+    1,
+    "users_id = %d",
+    1,
+    &uust_validate,
+  },
   {
     /* Q_DUSR - DELETE_USER */ 
     "delete_user",
@@ -3029,7 +3264,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "fs",
     FILESYS,
-    "CHAR(fs.label), fs.type, CHAR(m.name), 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",
+    "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 LIKE '%s' ESCAPE '*' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
@@ -3044,7 +3279,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "fs",
     FILESYS,
-    "CHAR(fs.label), fs.type, CHAR(m.name), 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",
+    "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 m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
@@ -3059,7 +3294,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "fs",
     FILESYS,
-    "CHAR(fs.label), fs.type, CHAR(m.name), 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",
+    "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 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'", 
@@ -3074,7 +3309,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "fs",
     FILESYS,
-    "CHAR(fs.label), fs.type, CHAR(m.name), 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",
+    "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 m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
@@ -3082,6 +3317,21 @@ struct query Queries2[] = {
     &gfsg_validate,
   },
 
+  {
+    /* 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",
@@ -3143,7 +3393,7 @@ struct query Queries2[] = {
   },
 
   {
-    /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */ /** Needs subselect */
+    /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
     "add_filesys_to_fsgroup",
     "aftg",
     APPEND,
@@ -3151,9 +3401,9 @@ struct query Queries2[] = {
     "fsgroup",
     "INTO fsgroup (group_id,filsys_id,key) VALUES (%d, %d, '%s')",
     gfgm_fields,
-    2,
+    3,
     (char *)0,
-    1,
+    0,
     &aftg_validate,
   },
 
@@ -3299,11 +3549,11 @@ struct query Queries2[] = {
     APPEND,
     "q",
     QUOTA,
-    "INTO quota (type, entity_id, quota, filsys_id, phys_id) VALUES (filesys.filsys_id, '%s', %d, %s, %s, %s)",
+    "INTO quota (type, entity_id, quota, filsys_id, phys_id) VALUES ('%s', %d, %s, %s, %s)",
     aqot_fields,
     3,
     (char *)0,
-    1,
+    0,
     &aqot_validate,
   },
 
@@ -3317,7 +3567,7 @@ struct query Queries2[] = {
     "quota SET quota = %s",
     aqot_fields,
     1,
-    "filsys_id = %d AND type = '%s' AND entity_id = %d",
+    "quota.filsys_id = %d AND quota.type = '%s' AND quota.entity_id = %d",
     3,
     &uqot_validate,
   },
@@ -3332,7 +3582,7 @@ struct query Queries2[] = {
     (char *)0,
     aqot_fields,
     0,
-    "filsys_id = %d AND type = '%s' AND entity_id = %d",
+    "quota.filsys_id = %d AND quota.type = '%s' AND quota.entity_id = %d",
     3,
     &dqot_validate,
   },
@@ -3378,7 +3628,7 @@ struct query Queries2[] = {
     anfq_fields,
     2,
     (char *)0,
-    1,
+    0,
     &anfq_validate,
   },
 
@@ -3562,6 +3812,21 @@ struct query Queries2[] = {
     &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",
This page took 0.071757 seconds and 4 git commands to generate.