[BACK]Return to sshconnect2.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.92 and 1.93

version 1.92, 2001/12/28 15:06:00 version 1.93, 2002/01/13 17:57:37
Line 991 
Line 991 
         }          }
 }  }
   
   
 #define DELIM   ","  
   
 static char *  static char *
 authmethods_get(void)  authmethods_get(void)
 {  {
         Authmethod *method = NULL;          Authmethod *method = NULL;
         char buf[1024];          Buffer b;
           char *list;
   
         buf[0] = '\0';          buffer_init(&b);
         for (method = authmethods; method->name != NULL; method++) {          for (method = authmethods; method->name != NULL; method++) {
                 if (authmethod_is_enabled(method)) {                  if (authmethod_is_enabled(method)) {
                         if (buf[0] != '\0')                          if (buffer_len(&b) > 0)
                                 strlcat(buf, DELIM, sizeof buf);                                  buffer_append(&b, ",", 1);
                         strlcat(buf, method->name, sizeof buf);                          buffer_append(&b, method->name, strlen(method->name));
                 }                  }
         }          }
         return xstrdup(buf);          buffer_append(&b, "\0", 1);
           list = xstrdup(buffer_ptr(&b));
           buffer_free(&b);
           return list;
 }  }

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93