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

Diff for /src/usr.bin/ssh/session.c between version 1.302 and 1.303

version 1.302, 2018/07/09 21:20:26 version 1.303, 2018/07/09 21:26:02
Line 60 
Line 60 
 #include "ssh2.h"  #include "ssh2.h"
 #include "sshpty.h"  #include "sshpty.h"
 #include "packet.h"  #include "packet.h"
 #include "buffer.h"  #include "sshbuf.h"
   #include "ssherr.h"
 #include "match.h"  #include "match.h"
 #include "uidswap.h"  #include "uidswap.h"
 #include "compat.h"  #include "compat.h"
Line 123 
Line 124 
 extern u_int utmp_len;  extern u_int utmp_len;
 extern int startup_pipe;  extern int startup_pipe;
 extern void destroy_sensitive_data(void);  extern void destroy_sensitive_data(void);
 extern Buffer loginmsg;  extern struct sshbuf *loginmsg;
 extern struct sshauthopt *auth_opts;  extern struct sshauthopt *auth_opts;
 char *tun_fwd_ifnames; /* serverloop.c */  char *tun_fwd_ifnames; /* serverloop.c */
   
Line 230 
Line 231 
 static void  static void
 display_loginmsg(void)  display_loginmsg(void)
 {  {
         if (buffer_len(&loginmsg) > 0) {          int r;
                 buffer_append(&loginmsg, "\0", 1);  
                 printf("%s", (char *)buffer_ptr(&loginmsg));          if (sshbuf_len(loginmsg) == 0)
                 buffer_clear(&loginmsg);                  return;
         }          if ((r = sshbuf_put_u8(loginmsg, 0)) != 0)
                   fatal("%s: buffer error: %s", __func__, ssh_err(r));
           printf("%s", (char *)sshbuf_ptr(loginmsg));
           sshbuf_reset(loginmsg);
 }  }
   
 static void  static void
Line 689 
Line 693 
          * it to the user, otherwise multiple sessions may accumulate           * it to the user, otherwise multiple sessions may accumulate
          * multiple copies of the login messages.           * multiple copies of the login messages.
          */           */
         buffer_clear(&loginmsg);          sshbuf_reset(loginmsg);
   
         return ret;          return ret;
 }  }

Legend:
Removed from v.1.302  
changed lines
  Added in v.1.303