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

Diff for /src/usr.bin/ssh/readpass.c between version 1.35 and 1.35.2.1

version 1.35, 2006/02/10 01:44:26 version 1.35.2.1, 2006/09/30 04:06:51
Line 1 
Line 1 
   /* $OpenBSD$ */
 /*  /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.   * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *   *
Line 22 
Line 23 
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   
 #include "includes.h"  
 RCSID("$OpenBSD$");  
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/wait.h>  #include <sys/wait.h>
   
   #include <errno.h>
   #include <fcntl.h>
 #include <paths.h>  #include <paths.h>
 #include <readpassphrase.h>  #include <readpassphrase.h>
   #include <stdarg.h>
   #include <stdio.h>
   #include <stdlib.h>
   #include <string.h>
   #include <unistd.h>
   
 #include "xmalloc.h"  #include "xmalloc.h"
 #include "misc.h"  #include "misc.h"
 #include "pathnames.h"  #include "pathnames.h"
 #include "log.h"  #include "log.h"
 #include "ssh.h"  #include "ssh.h"
   #include "uidswap.h"
   
 static char *  static char *
 ssh_askpass(char *askpass, const char *msg)  ssh_askpass(char *askpass, const char *msg)
Line 59 
Line 65 
                 return NULL;                  return NULL;
         }          }
         if (pid == 0) {          if (pid == 0) {
                 seteuid(getuid());                  permanently_drop_suid(getuid());
                 setuid(getuid());  
                 close(p[0]);                  close(p[0]);
                 if (dup2(p[1], STDOUT_FILENO) < 0)                  if (dup2(p[1], STDOUT_FILENO) < 0)
                         fatal("ssh_askpass: dup2: %s", strerror(errno));                          fatal("ssh_askpass: dup2: %s", strerror(errno));

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.35.2.1