summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/authfd.c8
-rw-r--r--usr.bin/ssh/channels.c8
-rw-r--r--usr.bin/ssh/packet.c4
-rw-r--r--usr.bin/ssh/serverloop.c10
-rw-r--r--usr.bin/ssh/ssh-agent.c10
-rw-r--r--usr.bin/ssh/sshconnect.c6
-rw-r--r--usr.bin/ssh/sshd.c6
7 files changed, 26 insertions, 26 deletions
diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c
index 1bdf69cb720..3b112ee631f 100644
--- a/usr.bin/ssh/authfd.c
+++ b/usr.bin/ssh/authfd.c
@@ -14,7 +14,7 @@ Functions for connecting the local authentication agent.
*/
#include "includes.h"
-RCSID("$Id: authfd.c,v 1.4 1999/09/30 08:34:24 deraadt Exp $");
+RCSID("$Id: authfd.c,v 1.5 1999/10/03 19:22:38 deraadt Exp $");
#include "ssh.h"
#include "rsa.h"
@@ -134,7 +134,7 @@ int ssh_get_authentication_connection_fd()
PUT_16BIT(msg + 1, port);
if (send(authfd, msg, 3, 0) < 0)
{
- shutdown(listen_sock, 2);
+ shutdown(listen_sock, SHUT_RDWR);
close(listen_sock);
ssh_close_authentication_socket(authfd);
return -1;
@@ -154,7 +154,7 @@ int ssh_get_authentication_connection_fd()
/* Close the socket we used for listening. It is no longer needed.
(The authentication fd and the new connection still remain open.) */
- shutdown(listen_sock, 2);
+ shutdown(listen_sock, SHUT_RDWR);
close(listen_sock);
ssh_close_authentication_socket(authfd);
@@ -664,7 +664,7 @@ int ssh_remove_all_identities(AuthenticationConnection *auth)
void ssh_close_authentication(AuthenticationConnection *auth)
{
/* Close the connection. */
- shutdown(auth->fd, 2);
+ shutdown(auth->fd, SHUT_RDWR);
close(auth->fd);
/* Free the buffers. */
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 70e3c977c77..32674ce47aa 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -16,7 +16,7 @@ arbitrary tcp/ip connections, and the authentication agent connection.
*/
#include "includes.h"
-RCSID("$Id: channels.c,v 1.9 1999/09/30 08:34:24 deraadt Exp $");
+RCSID("$Id: channels.c,v 1.10 1999/10/03 19:22:38 deraadt Exp $");
#include "ssh.h"
#include "packet.h"
@@ -188,7 +188,7 @@ void channel_free(int channel)
{
assert(channel >= 0 && channel < channels_alloc &&
channels[channel].type != SSH_CHANNEL_FREE);
- shutdown(channels[channel].sock, 2);
+ shutdown(channels[channel].sock, SHUT_RDWR);
close(channels[channel].sock);
buffer_free(&channels[channel].input);
buffer_free(&channels[channel].output);
@@ -1074,7 +1074,7 @@ char *x11_create_display_inet(int screen_number)
if (bind(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0)
{
debug("bind port %d: %.100s", port, strerror(errno));
- shutdown(sock, 2);
+ shutdown(sock, SHUT_RDWR);
close(sock);
continue;
}
@@ -1090,7 +1090,7 @@ char *x11_create_display_inet(int screen_number)
if (listen(sock, 5) < 0)
{
error("listen: %.100s", strerror(errno));
- shutdown(sock, 2);
+ shutdown(sock, SHUT_RDWR);
close(sock);
return NULL;
}
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index f6bf5f85d1a..cdc11db7c63 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -15,7 +15,7 @@ with the other side. This same code is used both on client and server side.
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.7 1999/10/01 18:18:40 deraadt Exp $");
+RCSID("$Id: packet.c,v 1.8 1999/10/03 19:22:38 deraadt Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -137,7 +137,7 @@ packet_close()
initialized = 0;
if (connection_in == connection_out)
{
- shutdown(connection_out, 2);
+ shutdown(connection_out, SHUT_RDWR);
close(connection_out);
}
else
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 5fa749dceab..063e0f42088 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -360,7 +360,7 @@ void process_output(fd_set *writeset)
#ifdef USE_PIPES
close(fdin);
#else
- shutdown(fdin, 1); /* We will no longer send. */
+ shutdown(fdin, SHUT_WR); /* We will no longer send. */
#endif
fdin = -1;
}
@@ -484,7 +484,7 @@ void server_loop(int pid, int fdin_arg, int fdout_arg, int fderr_arg)
#ifdef USE_PIPES
close(fdin);
#else
- shutdown(fdin, 1); /* We will no longer send. */
+ shutdown(fdin, SHUT_WR); /* We will no longer send. */
#endif
fdin = -1;
}
@@ -566,7 +566,7 @@ void server_loop(int pid, int fdin_arg, int fdout_arg, int fderr_arg)
#ifdef USE_PIPES
close(fdout);
#else
- shutdown(fdout, 0);
+ shutdown(fdout, SHUT_RD);
#endif
fdout = -1;
fdout_eof = 1;
@@ -574,7 +574,7 @@ void server_loop(int pid, int fdin_arg, int fdout_arg, int fderr_arg)
#ifdef USE_PIPES
close(fderr);
#else
- shutdown(fderr, 0);
+ shutdown(fderr, SHUT_RD);
#endif
fderr = -1;
fderr_eof = 1;
@@ -582,7 +582,7 @@ void server_loop(int pid, int fdin_arg, int fdout_arg, int fderr_arg)
#ifdef USE_PIPES
close(fdin);
#else
- shutdown(fdin, 1);
+ shutdown(fdin, SHUT_WR);
#endif
fdin = -1;
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c
index d024f44580d..963b70c6890 100644
--- a/usr.bin/ssh/ssh-agent.c
+++ b/usr.bin/ssh/ssh-agent.c
@@ -14,7 +14,7 @@ The authentication agent program.
*/
#include "includes.h"
-RCSID("$Id: ssh-agent.c,v 1.7 1999/09/30 17:08:52 deraadt Exp $");
+RCSID("$Id: ssh-agent.c,v 1.8 1999/10/03 19:22:38 deraadt Exp $");
#include "ssh.h"
#include "rsa.h"
@@ -308,7 +308,7 @@ process_message(SocketEntry *e)
msg_len = GET_32BIT(cp);
if (msg_len > 256 * 1024)
{
- shutdown(e->fd, 2);
+ shutdown(e->fd, SHUT_RDWR);
close(e->fd);
e->type = AUTH_UNUSED;
return;
@@ -465,7 +465,7 @@ void after_select(fd_set *readset, fd_set *writeset)
len = recv(sockets[i].fd, buf, sizeof(buf), 0);
if (len <= 0)
{ /* The other side has closed the socket. */
- shutdown(sockets[i].fd, 2);
+ shutdown(sockets[i].fd, SHUT_RDWR);
close(sockets[i].fd);
sockets[i].type = AUTH_UNUSED;
break;
@@ -481,7 +481,7 @@ void after_select(fd_set *readset, fd_set *writeset)
buffer_len(&sockets[i].output));
if (len <= 0)
{
- shutdown(sockets[i].fd, 2);
+ shutdown(sockets[i].fd, SHUT_RDWR);
close(sockets[i].fd);
sockets[i].type = AUTH_UNUSED;
break;
@@ -493,7 +493,7 @@ void after_select(fd_set *readset, fd_set *writeset)
len = read(sockets[i].fd, buf, sizeof(buf));
if (len <= 0)
{
- shutdown(sockets[i].fd, 2);
+ shutdown(sockets[i].fd, SHUT_RDWR);
close(sockets[i].fd);
sockets[i].type = AUTH_UNUSED;
break;
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index bbb1e00abb6..5159da41ced 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -15,7 +15,7 @@ login (authentication) dialog.
*/
#include "includes.h"
-RCSID("$Id: sshconnect.c,v 1.10 1999/09/30 17:08:52 deraadt Exp $");
+RCSID("$Id: sshconnect.c,v 1.11 1999/10/03 19:22:39 deraadt Exp $");
#include <ssl/bn.h>
#include "xmalloc.h"
@@ -247,7 +247,7 @@ int ssh_connect(const char *host, int port, int connection_attempts,
restore_uid();
/* Destroy the failed socket. */
- shutdown(sock, 2);
+ shutdown(sock, SHUT_RDWR);
close(sock);
}
else
@@ -295,7 +295,7 @@ int ssh_connect(const char *host, int port, int connection_attempts,
/* Close the failed socket; there appear to be some problems
when reusing a socket for which connect() has already
returned an error. */
- shutdown(sock, 2);
+ shutdown(sock, SHUT_RDWR);
close(sock);
}
if (hp->h_addr_list[i])
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 86b2b977327..2ae61774f72 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -18,7 +18,7 @@ agent connections.
*/
#include "includes.h"
-RCSID("$Id: sshd.c,v 1.16 1999/10/03 04:21:08 deraadt Exp $");
+RCSID("$Id: sshd.c,v 1.17 1999/10/03 19:22:39 deraadt Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -461,7 +461,7 @@ main(int ac, char **av)
if (bind(listen_sock, (struct sockaddr *)&sin, sizeof(sin)) < 0)
{
error("bind: %.100s", strerror(errno));
- shutdown(listen_sock, 2);
+ shutdown(listen_sock, SHUT_RDWR);
close(listen_sock);
fatal("Bind to port %d failed.", options.port);
}
@@ -534,7 +534,7 @@ main(int ac, char **av)
{
error("Connection from %.500s refused by tcp_wrappers.",
eval_client(&req));
- shutdown(newsock, 2);
+ shutdown(newsock, SHUT_RDWR);
close(newsock);
continue;
}