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

Diff for /src/usr.bin/ssh/servconf.c between version 1.246 and 1.247

version 1.246, 2013/11/21 00:45:44 version 1.247, 2013/12/05 01:16:41
Line 1695 
Line 1695 
         return 0;       /* partial */          return 0;       /* partial */
 }  }
   
 /* Helper macros */  
 #define M_CP_INTOPT(n) do {\  
         if (src->n != -1) \  
                 dst->n = src->n; \  
 } while (0)  
 #define M_CP_STROPT(n) do {\  
         if (src->n != NULL) { \  
                 free(dst->n); \  
                 dst->n = src->n; \  
         } \  
 } while(0)  
 #define M_CP_STRARRAYOPT(n, num_n) do {\  
         if (src->num_n != 0) { \  
                 for (dst->num_n = 0; dst->num_n < src->num_n; dst->num_n++) \  
                         dst->n[dst->num_n] = xstrdup(src->n[dst->num_n]); \  
         } \  
 } while(0)  
   
 /*  /*
  * Copy any supported values that are set.   * Copy any supported values that are set.
  *   *
Line 1723 
Line 1705 
 void  void
 copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)  copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
 {  {
   #define M_CP_INTOPT(n) do {\
           if (src->n != -1) \
                   dst->n = src->n; \
   } while (0)
   
         M_CP_INTOPT(password_authentication);          M_CP_INTOPT(password_authentication);
         M_CP_INTOPT(gss_authentication);          M_CP_INTOPT(gss_authentication);
         M_CP_INTOPT(rsa_authentication);          M_CP_INTOPT(rsa_authentication);
Line 1732 
Line 1719 
         M_CP_INTOPT(hostbased_uses_name_from_packet_only);          M_CP_INTOPT(hostbased_uses_name_from_packet_only);
         M_CP_INTOPT(kbd_interactive_authentication);          M_CP_INTOPT(kbd_interactive_authentication);
         M_CP_INTOPT(zero_knowledge_password_authentication);          M_CP_INTOPT(zero_knowledge_password_authentication);
         M_CP_STROPT(authorized_keys_command);  
         M_CP_STROPT(authorized_keys_command_user);  
         M_CP_INTOPT(permit_root_login);          M_CP_INTOPT(permit_root_login);
         M_CP_INTOPT(permit_empty_passwd);          M_CP_INTOPT(permit_empty_passwd);
   
Line 1751 
Line 1736 
         M_CP_INTOPT(ip_qos_bulk);          M_CP_INTOPT(ip_qos_bulk);
         M_CP_INTOPT(rekey_limit);          M_CP_INTOPT(rekey_limit);
         M_CP_INTOPT(rekey_interval);          M_CP_INTOPT(rekey_interval);
   
           /* M_CP_STROPT and M_CP_STRARRAYOPT should not appear before here */
   #define M_CP_STROPT(n) do {\
           if (src->n != NULL && dst->n != src->n) { \
                   free(dst->n); \
                   dst->n = src->n; \
           } \
   } while(0)
   #define M_CP_STRARRAYOPT(n, num_n) do {\
           if (src->num_n != 0) { \
                   for (dst->num_n = 0; dst->num_n < src->num_n; dst->num_n++) \
                           dst->n[dst->num_n] = xstrdup(src->n[dst->num_n]); \
           } \
   } while(0)
   
         /* See comment in servconf.h */          /* See comment in servconf.h */
         COPY_MATCH_STRING_OPTS();          COPY_MATCH_STRING_OPTS();

Legend:
Removed from v.1.246  
changed lines
  Added in v.1.247