]> andersk Git - moira.git/commitdiff
When a user tried to remove themself from a list they weren't on, and
authorjweiss <jweiss>
Thu, 9 Jun 1994 14:55:46 +0000 (14:55 +0000)
committerjweiss <jweiss>
Thu, 9 Jun 1994 14:55:46 +0000 (14:55 +0000)
didn't maintain, they got a permission error, because the code fell
thru to the list case, which the user was not allowed to remove.
this was confusing.

clients/blanche/blanche.c

index 18496f72d334bc42c6ac814b041d0aceb7ba47b7..875691e31764fc3b7e55ebdf1161232714ea4481 100644 (file)
@@ -352,6 +352,20 @@ char **argv;
              break;
            else if ((status != MR_LIST && status != MR_NO_MATCH) ||
                     memberstruct->type != M_ANY) {
+               if (status == MR_PERM && memberstruct->type == M_ANY)  {
+                 /* M_ANY means we've fallen through from the user case
+                  * The fact that we didn't get MR_PERM there indicates
+                  * that we had permission to remove the specified member 
+                  * from the list if it is a user, but not a list.  This is 
+                  * if we are the member in question.  Since we exist as a user
+                  * we must have gotten the MR_NO_MATCH error, so we will
+                  * return that, since it will be less confusing.  However,
+                  * This will generate the wrongerror if the user was trying
+                  * to remove the list with his/her username from a list they
+                  * don't administrate, without explicitly specifying "list:".
+                  */
+                 status = MR_NO_MATCH;
+               }
                com_err(whoami, status, "while deleting member %s from %s",
                        memberstruct->name, listname);
                break;
This page took 0.146373 seconds and 5 git commands to generate.