diff options
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index f5fce6b2a..bc4d8d33a 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include "includes.h" | 36 | #include "includes.h" |
37 | #include "openbsd-compat/sys-queue.h" | 37 | #include "openbsd-compat/sys-queue.h" |
38 | RCSID("$OpenBSD: ssh-agent.c,v 1.117 2003/12/02 17:01:15 markus Exp $"); | 38 | RCSID("$OpenBSD: ssh-agent.c,v 1.120 2004/08/11 21:43:05 avsm Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | #include <openssl/md5.h> | 41 | #include <openssl/md5.h> |
@@ -50,7 +50,6 @@ RCSID("$OpenBSD: ssh-agent.c,v 1.117 2003/12/02 17:01:15 markus Exp $"); | |||
50 | #include "authfd.h" | 50 | #include "authfd.h" |
51 | #include "compat.h" | 51 | #include "compat.h" |
52 | #include "log.h" | 52 | #include "log.h" |
53 | #include "readpass.h" | ||
54 | #include "misc.h" | 53 | #include "misc.h" |
55 | 54 | ||
56 | #ifdef SMARTCARD | 55 | #ifdef SMARTCARD |
@@ -107,11 +106,7 @@ char socket_dir[1024]; | |||
107 | int locked = 0; | 106 | int locked = 0; |
108 | char *lock_passwd = NULL; | 107 | char *lock_passwd = NULL; |
109 | 108 | ||
110 | #ifdef HAVE___PROGNAME | ||
111 | extern char *__progname; | 109 | extern char *__progname; |
112 | #else | ||
113 | char *__progname; | ||
114 | #endif | ||
115 | 110 | ||
116 | /* Default lifetime (0 == forever) */ | 111 | /* Default lifetime (0 == forever) */ |
117 | static int lifetime = 0; | 112 | static int lifetime = 0; |
@@ -790,8 +785,7 @@ new_socket(sock_type type, int fd) | |||
790 | { | 785 | { |
791 | u_int i, old_alloc, new_alloc; | 786 | u_int i, old_alloc, new_alloc; |
792 | 787 | ||
793 | if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) | 788 | set_nonblock(fd); |
794 | error("fcntl O_NONBLOCK: %s", strerror(errno)); | ||
795 | 789 | ||
796 | if (fd > max_fd) | 790 | if (fd > max_fd) |
797 | max_fd = fd; | 791 | max_fd = fd; |
@@ -822,7 +816,7 @@ new_socket(sock_type type, int fd) | |||
822 | } | 816 | } |
823 | 817 | ||
824 | static int | 818 | static int |
825 | prepare_select(fd_set **fdrp, fd_set **fdwp, int *fdl, int *nallocp) | 819 | prepare_select(fd_set **fdrp, fd_set **fdwp, int *fdl, u_int *nallocp) |
826 | { | 820 | { |
827 | u_int i, sz; | 821 | u_int i, sz; |
828 | int n = 0; | 822 | int n = 0; |
@@ -1008,7 +1002,8 @@ int | |||
1008 | main(int ac, char **av) | 1002 | main(int ac, char **av) |
1009 | { | 1003 | { |
1010 | int c_flag = 0, d_flag = 0, k_flag = 0, s_flag = 0; | 1004 | int c_flag = 0, d_flag = 0, k_flag = 0, s_flag = 0; |
1011 | int sock, fd, ch, nalloc; | 1005 | int sock, fd, ch; |
1006 | u_int nalloc; | ||
1012 | char *shell, *format, *pidstr, *agentsocket = NULL; | 1007 | char *shell, *format, *pidstr, *agentsocket = NULL; |
1013 | fd_set *readsetp = NULL, *writesetp = NULL; | 1008 | fd_set *readsetp = NULL, *writesetp = NULL; |
1014 | struct sockaddr_un sunaddr; | 1009 | struct sockaddr_un sunaddr; |