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

Diff for /src/usr.bin/ssh/monitor.c between version 1.231 and 1.232

version 1.231, 2022/01/28 06:18:42 version 1.232, 2022/02/25 02:09:27
Line 643 
Line 643 
 int  int
 mm_answer_pwnamallow(struct ssh *ssh, int sock, struct sshbuf *m)  mm_answer_pwnamallow(struct ssh *ssh, int sock, struct sshbuf *m)
 {  {
         char *username;  
         struct passwd *pwent;          struct passwd *pwent;
         int r, allowed = 0;          int r, allowed = 0;
         u_int i;          u_int i;
Line 653 
Line 652 
         if (authctxt->attempt++ != 0)          if (authctxt->attempt++ != 0)
                 fatal_f("multiple attempts for getpwnam");                  fatal_f("multiple attempts for getpwnam");
   
         if ((r = sshbuf_get_cstring(m, &username, NULL)) != 0)          if ((r = sshbuf_get_cstring(m, &authctxt->user, NULL)) != 0)
                 fatal_fr(r, "parse");                  fatal_fr(r, "parse");
   
         pwent = getpwnamallow(ssh, username);          pwent = getpwnamallow(ssh, authctxt->user);
   
         authctxt->user = xstrdup(username);          setproctitle("%s [priv]", pwent ? authctxt->user : "unknown");
         setproctitle("%s [priv]", pwent ? username : "unknown");  
         free(username);  
   
         sshbuf_reset(m);          sshbuf_reset(m);
   

Legend:
Removed from v.1.231  
changed lines
  Added in v.1.232