]> andersk Git - moira.git/commitdiff
Don't allow anyone to perform a get_host with all wildcards.
authorzacheiss <zacheiss>
Fri, 5 Dec 2003 21:08:14 +0000 (21:08 +0000)
committerzacheiss <zacheiss>
Fri, 5 Dec 2003 21:08:14 +0000 (21:08 +0000)
server/mr_server.h
server/qaccess.pc
server/qsetup.pc
server/queries2.c

index add56d112f97f7ef59f04a3e608237f102f05f64..4c11f46fbb218702390000db96129325b5fed51f 100644 (file)
@@ -235,6 +235,7 @@ int setup_dnfp(struct query *q, char *argv[], client *cl);
 int setup_dqot(struct query *q, char *argv[], client *cl);
 int setup_asnt(struct query *q, char *argv[], client *cl);
 int setup_dsnt(struct query *q, char *argv[], client *cl);
+int setup_ghst(struct query *q, char *argv[], client *cl);
 int setup_ahst(struct query *q, char *argv[], client *cl);
 int setup_ahal(struct query *q, char *argv[], client *cl);
 int setup_uhha(struct query *q, char *argv[], client *cl);
index bdceadf072378df500647e26a3749980978cbbd7..8a303e5096194ee3c4a60889646a965173437fdb 100644 (file)
@@ -486,15 +486,6 @@ int access_host(struct query *q, char *argv[], client *cl)
   else
     idx = 2;
   
-  if (q->type == RETRIEVE)
-    {
-      if (strcmp(argv[0], "*") || strcmp(argv[1], "*") ||
-         strcmp(argv[2], "*") || strcmp(argv[3], "*"))
-       return MR_SUCCESS;
-      else
-       return MR_PERM;
-    }
-
   if (q->type == APPEND)
     {
       /* Non-query owner must set use to zero */
index c0c75e9c18f4cc9aeb37d931aa27011fe7b7c0c7..4c061ca87ee43cf9154e7c7001ed225739ba7ee8 100644 (file)
@@ -1055,6 +1055,18 @@ int prefetch_filesys(struct query *q, char **argv, client *cl)
 }
 
 
+/* setup_ghst():
+ */
+
+int setup_ghst(struct query *q, char **argv, client *cl)
+{
+  if (strcmp(argv[0], "*") || strcmp(argv[1], "*") ||
+      strcmp(argv[2], "*") || strcmp(argv[3], "*"))
+    return MR_SUCCESS;
+  else
+    return MR_PERM;
+}
+
 /* setup_ahst():
  */
 
index e29cc732084770c726916ee444612490c3fffea8..538a3c65ace9c81903b3dacd6f2ca34d8704ef5b 100644 (file)
@@ -1027,8 +1027,8 @@ static struct validate ghst_validate = {
   0,
   0,
   0,
-  access_host,
   0,
+  setup_ghst,
   followup_ghst,
 };
 
This page took 0.6107 seconds and 5 git commands to generate.