]> andersk Git - moira.git/commitdiff
make dlis return MR_IN_USE if the list being deleted is the memacl for
authorzacheiss <zacheiss>
Tue, 15 Aug 2000 00:06:44 +0000 (00:06 +0000)
committerzacheiss <zacheiss>
Tue, 15 Aug 2000 00:06:44 +0000 (00:06 +0000)
another list.

make gaus return lists that the argument is the memacl for.

server/qsetup.pc
server/qsupport.pc

index fc1c8cd933401bc8fa7e8816139d04d4248b0561..ef87db411515602f11cead41ff5541d0714e928c 100644 (file)
@@ -409,6 +409,11 @@ int setup_dlis(struct query *q, char *argv[], client *cl)
   if (cnt > 0)
     return MR_IN_USE;
 
+  EXEC SQL SELECT COUNT(name) INTO :cnt FROM list
+    WHERE memacl_id = :id AND memacl_type = 'LIST' AND list_id != :id;
+  if (cnt > 0)
+    return MR_IN_USE;
+
   EXEC SQL SELECT COUNT(name) INTO :cnt FROM servers
     WHERE acl_id = :id AND acl_type = 'LIST';
   if (cnt > 0)
index c6a1ac6875bc3d5e19006784a955bf65a7ca7edc..19ec81f375787553dbf04bac2cbe87dbf29a3f29 100644 (file)
@@ -784,7 +784,8 @@ int get_ace_internal(char *atype, int aid,
   rargv[0] = "LIST";
   EXEC SQL DECLARE csr113 CURSOR FOR
     SELECT name FROM list
-    WHERE acl_type = :type AND acl_id = :id;
+    WHERE (acl_type = :type AND acl_id = :id)
+    OR (memacl_type = :type AND memacl_id = :id);
   if (dbms_errno)
     return mr_errcode;
   EXEC SQL OPEN csr113;
This page took 0.041366 seconds and 5 git commands to generate.