* what to do we will query and then do it.
*/
- if ( (CheckIfAce(name, "list", ask_first) == SUB_NORMAL) &&
- (RemoveMembersOfList(name, ask_first) == SUB_NORMAL) &&
+ if ((CheckIfAce(name, "list", ask_first) != SUB_NORMAL) ||
(RemoveItemFromLists(name, "list",
- &member_of, ask_first) == SUB_NORMAL) &&
+ &member_of, ask_first) != SUB_NORMAL))
+ break;
+ /*
+ * If the list is it's own ACL, then make the person performing
+ * the delete the owner before removing this person from the list
+ */
+ if (!strcmp(list_info[L_ACE_TYPE], "LIST") &&
+ !strcmp(list_info[L_ACE_NAME], list_info[L_NAME])) {
+ free(list_info[L_ACE_TYPE]);
+ free(list_info[L_ACE_NAME]);
+ list_info[L_ACE_TYPE] = Strsave("USER");
+ list_info[L_ACE_NAME] = Strsave(user);
+ SlipInNewName(list_info, Strsave(list_info[L_NAME]));
+ if ((status = do_sms_query("update_list", CountArgs(list_info)-3,
+ list_info, Scream, (char *) NULL))
+ != SMS_SUCCESS) {
+ com_err(program_name, status, " while updating list owner");
+ Put_message("List may be only partly deleted.");
+ }
+ }
+ if ((RemoveMembersOfList(name, ask_first) == SUB_NORMAL) &&
(RealDeleteList(name) == SUB_NORMAL) )
{ /* if... */
CheckAce(list_info[L_ACE_TYPE], list_info[L_ACE_NAME], ask_first);