]> andersk Git - moira.git/commitdiff
warn if user tries to create/rename a list to a username
authordanw <danw>
Thu, 26 Mar 1998 21:24:28 +0000 (21:24 +0000)
committerdanw <danw>
Thu, 26 Mar 1998 21:24:28 +0000 (21:24 +0000)
clients/blanche/blanche.c

index e4d3cc03298c1027cd073a45841c8d1cf7956ba5..019630fe9e687ee470776d64ec9495a62a26a47f 100644 (file)
@@ -308,6 +308,16 @@ int main(int argc, char **argv)
        }
     }
 
+  /* check for username/listname clash */
+  if (createflag || (setinfo && newname && strcmp(newname, listname)))
+    {
+      status = mr_query("get_user_account_by_login", 1,
+                       createflag ? &listname : &newname,
+                       NULL, NULL);
+      if (status != MR_NO_MATCH)
+       fprintf(stderr, "WARNING: A user by that name already exists.\n");
+    }
+
   /* create if needed */
   if (createflag)
     {
This page took 0.038682 seconds and 5 git commands to generate.