[1972] in Moira

home help back first fref pref prev next nref lref last post

make AddList bomb out sooner if it's going to.

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Sat Aug 3 03:49:28 2002

Message-Id: <200208030749.DAA21665@indian-burial-ground-pet-store.mit.edu>
To: moiradev@MIT.EDU
Date: Sat, 03 Aug 2002 03:49:26 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

	This is a feature request from accounts; we modify AddList() to
check if the user is allowed to call the add_list query so that we can
return MR_PERM before they enter all the information.

Garry

Index: lists.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/moira/lists.c,v
retrieving revision 1.48
diff -u -r1.48 lists.c
--- lists.c	2001/12/14 21:06:26	1.48
+++ lists.c	2002/08/03 07:45:13
@@ -442,6 +442,12 @@
       return SUB_ERROR;
     }
 
+  if (status = mr_access("add_list", L_MODTIME, SetDefaults(info, argv[1]))) 
+    {
+      com_err(program_name, status, " in AddList.");
+      return SUB_ERROR;
+    }
+
   /*
    * If the listname is less than 8 characters, make sure it doesn't
    * collide with a username.

home help back first fref pref prev next nref lref last post