return NULL;
}
- 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"))
+ do {
+ if (GetTypeFromUser("What Type of Administrator", "ace_type",
+ &info[L_ACE_TYPE]) == SUB_ERROR)
+ return NULL;
+ 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)
+ break;
+ }
+ } while (!strcasecmp(info[L_ACE_TYPE], "none"));
+
+ if (!strcasecmp(info[L_ACE_TYPE], "kerberos"))
{
- 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;
+ char *canon;
+
+ mrcl_validate_kerberos_member(info[L_ACE_NAME], &canon);
+ if (mrcl_get_message())
+ Put_message(mrcl_get_message());
+ free(info[L_ACE_NAME]);
+ info[L_ACE_NAME] = canon;
}
-
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]);
if (GetValueFromUser(temp_buf, &info[L_MEMACE_NAME]) == SUB_ERROR)
return NULL;
}
+ if (!strcasecmp(info[L_MEMACE_TYPE], "kerberos"))
+ {
+ char *canon;
+ mrcl_validate_kerberos_member(info[L_MEMACE_NAME], &canon);
+ if (mrcl_get_message())
+ Put_message(mrcl_get_message());
+ free(info[L_MEMACE_NAME]);
+ info[L_MEMACE_NAME] = canon;
+ }
if (GetValueFromUser("Description: ", &info[L_DESC]) == SUB_ERROR)
return NULL;
if (!strcmp(args[LM_TYPE], "STRING"))
{
- if (mrcl_validate_string_member(args[LM_MEMBER]) != MRCL_SUCCESS)
- {
- Put_message(mrcl_get_message());
- return DM_NORMAL;
- }
+ status = mrcl_validate_string_member(args[LM_MEMBER]);
+ if (status != MRCL_SUCCESS)
+ Put_message(mrcl_get_message());
+ if (status == MRCL_REJECT)
+ return DM_NORMAL;
}
else if (!strcmp(args[LM_TYPE], "KERBEROS"))
{
if (GetValueFromUser(buf, &name) == SUB_ERROR)
return DM_NORMAL;
- /* What we really want is a recursive search */
- sprintf(temp_buf, "R%s", type);
- free(type);
- type = strdup(temp_buf);
+ switch (YesNoQuestion("Do you want a recursive search (y/n)", TRUE))
+ {
+ case TRUE:
+ sprintf(temp_buf, "R%s", type); /* "USER" to "RUSER" etc. */
+ free(type);
+ type = strdup(temp_buf);
+ break;
+ case FALSE:
+ break;
+ default:
+ return DM_NORMAL;
+ }
if ((maillist = YesNoQuestion("Show Lists that are Maillists (y/n) ?",
TRUE)) == -1)