[1761] in Moira

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

curses client changes

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Tue Apr 3 17:10:49 2001

Message-Id: <200104032110.RAA06514@sweet-transvestite.mit.edu>
To: moiradev@MIT.EDU
Date: Tue, 03 Apr 2001 17:10:46 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

	Normal users shouldn't be setting a list to be owned by NONE
unless they know what they're doing.  Also fixes a couple of stupid
double strcasecmp() calls.

Garry
	
Index: lists.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/moira/lists.c,v
retrieving revision 1.45
diff -u -r1.45 lists.c
--- lists.c	2001/03/02 04:44:57	1.45
+++ lists.c	2001/04/03 21:08:19
@@ -232,17 +232,25 @@
 	return NULL;
     }
 
+ ask_ace:
   if (GetTypeFromUser("What Type of Administrator", "ace_type",
 		      &info[L_ACE_TYPE]) == SUB_ERROR)
     return NULL;
-  if (strcasecmp(info[L_ACE_TYPE], "NONE") &&
-      strcasecmp(info[L_ACE_TYPE], "none"))
+  if (strcasecmp(info[L_ACE_TYPE], "none"))
     {
       sprintf(temp_buf, "Which %s will be the administrator of this list: ",
 	      info[L_ACE_TYPE]);
       if (GetValueFromUser(temp_buf, &info[L_ACE_NAME]) == SUB_ERROR)
 	return NULL;
     }
+  else
+    {
+      Put_message("Setting the administrator of this list to 'NONE'");
+      Put_message("will make you unable to further modify the list.");
+      if (YesNoQuestion("Do you really want to do this?", FALSE) != TRUE)
+	goto ask_ace;
+    }
+	
   if (!strcasecmp(info[L_ACE_TYPE], "kerberos"))
     {
       char *canon;
@@ -256,8 +264,7 @@
   if (GetTypeFromUser("What Type of Membership Administrator", "ace_type",
 		      &info[L_MEMACE_TYPE]) == SUB_ERROR)
     return NULL;
-  if (strcasecmp(info[L_MEMACE_TYPE], "NONE") &&
-      strcasecmp(info[L_MEMACE_TYPE], "none"))
+  if (strcasecmp(info[L_MEMACE_TYPE], "none"))
     {
       sprintf(temp_buf, "Which %s will be the membership administrator of this list: ",
 	      info[L_MEMACE_TYPE]);

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