]> andersk Git - moira.git/blobdiff - clients/moira/cluster.c
Fixes moira[1791], where extended output from a get_host query would
[moira.git] / clients / moira / cluster.c
index 2525a0f971896a9bb340d9f31af6b96278482007..627ba4a6ad844a34c1cd577ed4ee8dc3156723a4 100644 (file)
@@ -230,9 +230,11 @@ static char *PrintMachInfo(char **info)
   sprintf(buf, "OS:       %-16s    Billing Contact: %s", info[M_OS],
          info[M_BILL_CONTACT]);
   Put_message(buf);
-  sprintf(buf, "\nOpt: %s", info[M_USE]);
+  Put_message("");
+  sprintf(buf, "Opt: %s", info[M_USE]);
   Put_message(buf);
-  sprintf(buf, "\nAdm cmt: %s", info[M_ACOMMENT]);
+  Put_message("");
+  sprintf(buf, "Adm cmt: %s", info[M_ACOMMENT]);
   Put_message(buf);
   sprintf(buf, "Op cmt:  %s", info[M_OCOMMENT]);
   Put_message(buf);
@@ -600,6 +602,16 @@ char **AskMCDInfo(char **info, int type, Bool name)
       if (strcmp(info[11], "NONE") &&
          GetValueFromUser("Owner's Name", &info[12]) == SUB_ERROR)
        return NULL;
+      if (!strcmp(info[11], "KERBEROS"))
+         {
+           char *canon;
+
+           mrcl_validate_kerberos_member(info[12], &canon);
+           if (mrcl_get_message())
+             Put_message(mrcl_get_message());
+           free(info[12]);
+           info[12] = canon;
+         }
       if (GetValueFromUser("Administrative comment", &info[13]) == SUB_ERROR)
        return NULL;
       if (GetValueFromUser("Operational comment", &info[14]) == SUB_ERROR)
@@ -655,6 +667,16 @@ char **AskMCDInfo(char **info, int type, Bool name)
       if (strcmp(info[SN_ACE_TYPE], "NONE") &&
          GetValueFromUser("Owner name", &info[SN_ACE_NAME]) == SUB_ERROR)
        return NULL;
+      if (!strcmp(info[SN_ACE_TYPE], "KERBEROS"))
+         {
+           char *canon;
+
+           mrcl_validate_kerberos_member(info[SN_ACE_NAME], &canon);
+           if (mrcl_get_message())
+             Put_message(mrcl_get_message());
+           free(info[SN_ACE_NAME]);
+           info[SN_ACE_NAME] = canon;
+         }
       FreeAndClear(&info[SN_MODTIME], TRUE);
       FreeAndClear(&info[SN_MODBY], TRUE);
       FreeAndClear(&info[SN_MODWITH], TRUE);
This page took 0.045831 seconds and 4 git commands to generate.