]> andersk Git - moira.git/commitdiff
support type KERBEROS list members
authormar <mar>
Wed, 28 Jun 1989 11:39:14 +0000 (11:39 +0000)
committermar <mar>
Wed, 28 Jun 1989 11:39:14 +0000 (11:39 +0000)
server/qsupport.qc

index b15b0b5e414a91f96a6198a5a243cc3331935344..ad4f988f763a3f9723fa4926a9cb6e945af75359 100644 (file)
@@ -1257,6 +1257,11 @@ followup_glin(q, sq, v, action, actarg, cl)
                strcpy(name, "???");
        } else if (!strcmp(type, "USER")) {
 ##         repeat retrieve (name = users.login) where users.users_id = @id
+##         inquire_equel(rowcount = "rowcount")
+           if (rowcount != 1)
+               strcpy(name, "???");
+       } else if (!strcmp(type, "KERBEROS")) {
+##         repeat retrieve (name = strings.string) where strings.string_id = @id
 ##         inquire_equel(rowcount = "rowcount")
            if (rowcount != 1)
                strcpy(name, "???");
@@ -1399,6 +1404,11 @@ followup_gzcl(q, sq, v, action, actarg, cl)
                  strcpy(name, "???");
            } else if (!strcmp(argv[i], "USER")) {
 ##             repeat retrieve (name = users.login) where users.users_id = @id
+##             inquire_equel(rowcount = "rowcount")
+               if (rowcount != 1)
+                 strcpy(name, "???");
+           } else if (!strcmp(argv[i], "KERBEROS")) {
+##             repeat retrieve (name = strings.string) where strings.string_id = @id
 ##             inquire_equel(rowcount = "rowcount")
                if (rowcount != 1)
                  strcpy(name, "???");
@@ -1460,6 +1470,11 @@ followup_gsha(q, sq, v, action, actarg, cl)
              strcpy(name, "???");
        } else if (!strcmp(argv[1], "USER")) {
 ##         repeat retrieve (name = users.login) where users.users_id = @id
+##         inquire_equel(rowcount = "rowcount")
+           if (rowcount != 1)
+             strcpy(name, "???");
+       } else if (!strcmp(argv[1], "KERBEROS")) {
+##         repeat retrieve (name = strings.string) where strings.string_id = @id
 ##         inquire_equel(rowcount = "rowcount")
            if (rowcount != 1)
              strcpy(name, "???");
@@ -1601,6 +1616,12 @@ get_list_info(q, aargv, cl, action, actarg)
        } else if (!strcmp(acl_type, "USER")) {
 ##         repeat retrieve (acl_name = users.#login)
 ##             where users.users_id = @acl_id
+##         inquire_equel(rowcount = "rowcount")
+           if (rowcount != 1)
+               strcpy(acl_name, "???");
+       } else if (!strcmp(acl_type, "KERBEROS")) {
+##         repeat retrieve (acl_name = strings.string)
+##             where strings.string_id = @acl_id
 ##         inquire_equel(rowcount = "rowcount")
            if (rowcount != 1)
                strcpy(acl_name, "???");
@@ -1649,7 +1670,8 @@ int get_ace_use(q, argv, cl, action, actarg)
 
     atype = argv[0];
     aid = *(int *)argv[1];
-    if (!strcmp(atype, "LIST") || !strcmp(atype, "USER")) {
+    if (!strcmp(atype, "LIST") || !strcmp(atype, "USER") ||
+       !strcmp(atype, "KERBEROS")) {
        return(get_ace_internal(atype, aid, action, actarg));
     }
 
@@ -1693,6 +1715,28 @@ int get_ace_use(q, argv, cl, action, actarg)
          found++;
     }
 
+    if (!strcmp(atype, "RKERBERO")) {
+##     range of m is members
+##     repeat retrieve (listid = m.list_id)
+##             where m.member_type = "KERBEROS" and m.member_id = @aid {
+           sq_save_data(sq, listid);
+##     }
+       /* get all the list_id's of containing lists */
+       while (sq_get_data(sq, &id)) {
+##         repeat retrieve (listid = m.list_id)
+##             where m.member_type = "LIST" and m.member_id = @id {
+             sq_save_unique_data(sq, listid);
+##         }
+         }
+       /* now process each one */
+       while (sq_get_data(sq, &id)) {
+           if (get_ace_internal("LIST", id, action, actarg) == SMS_SUCCESS)
+             found++;
+       }
+       if (get_ace_internal("KERBEROS", aid, action, actarg) == SMS_SUCCESS)
+         found++;
+    }
+
     sq_destroy(sq);    
     if (!found) return(SMS_NO_MATCH);
     return(SMS_SUCCESS);
@@ -1798,7 +1842,8 @@ int get_lists_of_member(q, argv, cl, action, actarg)
     aid = *(int *)argv[1];
     if (!strcmp(atype, "LIST") ||
        !strcmp(atype, "USER") ||
-       !strcmp(atype, "STRING")) {
+       !strcmp(atype, "STRING") ||
+       !strcmp(atype, "KERBEROS")) {
       return(glom_internal(atype, aid, action, actarg));
     }
 
@@ -1864,6 +1909,28 @@ int get_lists_of_member(q, argv, cl, action, actarg)
          found++;
     }
 
+    if (!strcmp(atype, "RKERBERO")) {
+##     range of m is members
+##     repeat retrieve (listid = m.list_id)
+##             where m.member_type = "KERBEROS" and m.member_id = @aid {
+           sq_save_data(sq, listid);
+##     }
+       /* get all the list_id's of containing lists */
+       while (sq_get_data(sq, &id)) {
+##         repeat retrieve (listid = m.list_id)
+##             where m.member_type = "LIST" and m.member_id = @id {
+             sq_save_unique_data(sq, listid);
+##         }
+         }
+       /* now process each one */
+       while (sq_get_data(sq, &id)) {
+           if (glom_internal("LIST", id, action, actarg) == SMS_SUCCESS)
+             found++;
+       }
+       if (glom_internal("KERBEROS", aid, action, actarg) == SMS_SUCCESS)
+         found++;
+    }
+
 ##  repeat replace tblstats (retrieves = tblstats.retrieves + 1)
 ##     where tblstats.#table = "members"
     sq_destroy(sq);    
@@ -1974,6 +2041,15 @@ get_members_of_list(q, argv, cl, action, actarg)
 ##             where m.#list_id = @list_id and m.member_type = "STRING"
 ##                   and m.member_id = strings.string_id
 ##             sort by #member_name
+##  {
+        (*action)(2, targv, actarg);
+##  }
+
+    targv[0] = "KERBEROS";
+##  repeat retrieve (member_name = strings.string)
+##             where m.#list_id = @list_id and m.member_type = "KERBEROS"
+##                   and m.member_id = strings.string_id
+##             sort by #member_name
 ##  {
         (*action)(2, targv, actarg);
 ##  }
This page took 0.231018 seconds and 5 git commands to generate.