[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.365 and 1.366

version 1.365, 2020/05/27 22:37:53 version 1.366, 2020/06/24 15:09:53
Line 15 
Line 15 
 #include <sys/socket.h>  #include <sys/socket.h>
 #include <sys/queue.h>  #include <sys/queue.h>
 #include <sys/sysctl.h>  #include <sys/sysctl.h>
   #include <sys/stat.h>
   
 #include <netinet/in.h>  #include <netinet/in.h>
 #include <netinet/ip.h>  #include <netinet/ip.h>
Line 2324 
Line 2325 
 void  void
 load_server_config(const char *filename, struct sshbuf *conf)  load_server_config(const char *filename, struct sshbuf *conf)
 {  {
           struct stat st;
         char *line = NULL, *cp;          char *line = NULL, *cp;
         size_t linesize = 0;          size_t linesize = 0;
         FILE *f;          FILE *f;
Line 2335 
Line 2337 
                 exit(1);                  exit(1);
         }          }
         sshbuf_reset(conf);          sshbuf_reset(conf);
           /* grow buffer, so realloc is avoided for large config files */
           if (fstat(fileno(f), &st) == 0 && st.st_size > 0 &&
               (r = sshbuf_allocate(conf, st.st_size)) != 0)
                   fatal("%s: allocate failed: %s", __func__, ssh_err(r));
         while (getline(&line, &linesize, f) != -1) {          while (getline(&line, &linesize, f) != -1) {
                 lineno++;                  lineno++;
                 /*                  /*

Legend:
Removed from v.1.365  
changed lines
  Added in v.1.366