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

Diff for /src/usr.bin/ssh/auth2-chall.c between version 1.36.2.1 and 1.37

version 1.36.2.1, 2013/11/08 05:52:21 version 1.37, 2013/03/07 19:27:25
Line 66 
Line 66 
         Buffer b;          Buffer b;
         int i;          int i;
   
         kbdintctxt = xcalloc(1, sizeof(KbdintAuthctxt));          kbdintctxt = xmalloc(sizeof(KbdintAuthctxt));
         if (strcmp(devs, "") == 0) {          if (strcmp(devs, "") == 0) {
                 buffer_init(&b);                  buffer_init(&b);
                 for (i = 0; devices[i]; i++) {                  for (i = 0; devices[i]; i++) {
Line 110 
Line 110 
 }  }
 /* get next device */  /* get next device */
 static int  static int
 kbdint_next_device(KbdintAuthctxt *kbdintctxt)  kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt)
 {  {
         size_t len;          size_t len;
         char *t;          char *t;
Line 124 
Line 124 
   
                 if (len == 0)                  if (len == 0)
                         break;                          break;
                 for (i = 0; devices[i]; i++)                  for (i = 0; devices[i]; i++) {
                           if (!auth2_method_allowed(authctxt,
                               "keyboard-interactive", devices[i]->name))
                                   continue;
                         if (strncmp(kbdintctxt->devices, devices[i]->name, len) == 0)                          if (strncmp(kbdintctxt->devices, devices[i]->name, len) == 0)
                                 kbdintctxt->device = devices[i];                                  kbdintctxt->device = devices[i];
                   }
                 t = kbdintctxt->devices;                  t = kbdintctxt->devices;
                 kbdintctxt->devices = t[len] ? xstrdup(t+len+1) : NULL;                  kbdintctxt->devices = t[len] ? xstrdup(t+len+1) : NULL;
                 xfree(t);                  xfree(t);
Line 176 
Line 180 
         debug2("auth2_challenge_start: devices %s",          debug2("auth2_challenge_start: devices %s",
             kbdintctxt->devices ?  kbdintctxt->devices : "<empty>");              kbdintctxt->devices ?  kbdintctxt->devices : "<empty>");
   
         if (kbdint_next_device(kbdintctxt) == 0) {          if (kbdint_next_device(authctxt, kbdintctxt) == 0) {
                 auth2_challenge_stop(authctxt);                  auth2_challenge_stop(authctxt);
                 return 0;                  return 0;
         }          }

Legend:
Removed from v.1.36.2.1  
changed lines
  Added in v.1.37