]> andersk Git - moira.git/blobdiff - server/qaccess.dc
Diane Delgado's changes for a fixed table-locking order
[moira.git] / server / qaccess.dc
index 15632bf03f817aa0999d42bc5cdcb6af4ae4c1f5..d710e5e08e76f06e59de954708353b4a21c334f7 100644 (file)
@@ -67,6 +67,15 @@ access_login(q, argv, cl)
     char qual[256];
     EXEC SQL END DECLARE SECTION;
 
+    /* BEGIN KLUDGE
+       Ingres will lose horribly if you try to look up a user with
+       a username > 8 chars (which some old versions of the moira client
+       still sometimes do). This routine is only called by gubl/gual and
+       gubu/guau, so we know argv[0] must be <=8 chars in a correct
+       query, so verify that first */
+    if(strlen(argv[0])>8) return MR_ARG_TOO_LONG;
+    /* END KLUDGE */
+
     build_qual(q->qual, q->argc, argv, qual);
     if (!strncmp(q->name,"get_user_account",strlen("get_user_account"))) {
        EXEC SQL SELECT users_id INTO :id FROM users u, strings str WHERE :qual;
@@ -432,3 +441,19 @@ access_ahal(q, argv, cl)
     else
       return(MR_PERM);
 }
+
+
+
+/* access_snt - check for retrieving network structure
+ */
+
+access_snt(q, argv, cl)
+    struct query *q;
+    char *argv[];
+    client *cl;
+{
+    if(q->type == RETRIEVE)
+       return(MR_SUCCESS);
+
+    return(MR_PERM);
+}
This page took 0.034537 seconds and 4 git commands to generate.