summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-01-18 02:04:35 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-01-18 02:04:35 +0000
commitbf555ba6210532f8598ff0f96961e82bcda3f09b (patch)
tree2b90d1026f300a2dd478c654e5e47ada304c3ffe /sshd.c
parent01fa6380e815a37ac5ffcf03b04c93d7b52ce765 (diff)
NOTE: This update changes the RSA key generation. *NEW RSA KEYS
NEED TO BE GENERATED* =) Refer to to entry "2001/01/16 19:20:06" for more details. 20010118 - (bal) Super Sized OpenBSD Resync - markus@cvs.openbsd.org 2001/01/11 22:14:20 GMT 2001 by markus [sshd.c] maxfd+1 - markus@cvs.openbsd.org 2001/01/13 17:59:18 [ssh-keygen.1] small ssh-keygen manpage cleanup; stevesk@pobox.com - markus@cvs.openbsd.org 2001/01/13 18:03:07 [scp.c ssh-keygen.c sshd.c] getopt() returns -1 not EOF; stevesk@pobox.com - markus@cvs.openbsd.org 2001/01/13 18:06:54 [ssh-keyscan.c] use SSH_DEFAULT_PORT; from stevesk@pobox.com - markus@cvs.openbsd.org 2001/01/13 18:12:47 [ssh-keyscan.c] free() -> xfree(); fix memory leak; from stevesk@pobox.com - markus@cvs.openbsd.org 2001/01/13 18:14:13 [ssh-add.c] typo, from stevesk@sweden.hp.com - markus@cvs.openbsd.org 2001/01/13 18:32:50 [packet.c session.c ssh.c sshconnect.c sshd.c] split out keepalive from packet_interactive (from dale@accentre.com) set IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT for ssh2, too. - markus@cvs.openbsd.org 2001/01/13 18:36:45 [packet.c packet.h] reorder, typo - markus@cvs.openbsd.org 2001/01/13 18:38:00 [auth-options.c] fix comment - markus@cvs.openbsd.org 2001/01/13 18:43:31 [session.c] Wall - markus@cvs.openbsd.org 2001/01/13 19:14:08 [clientloop.h clientloop.c ssh.c] move callback to headerfile - markus@cvs.openbsd.org 2001/01/15 21:40:10 [ssh.c] use log() instead of stderr - markus@cvs.openbsd.org 2001/01/15 21:43:51 [dh.c] use error() not stderr! - markus@cvs.openbsd.org 2001/01/15 21:45:29 [sftp-server.c] rename must fail if newpath exists, debug off by default - markus@cvs.openbsd.org 2001/01/15 21:46:38 [sftp-server.c] readable long listing for sftp-server, ok deraadt@ - markus@cvs.openbsd.org 2001/01/16 19:20:06 [key.c ssh-rsa.c] make "ssh-rsa" key format for ssh2 confirm to the ietf-drafts; from galb@vandyke.com. note that you have to delete older ssh2-rsa keys, since they are in the wrong format, too. they must be removed from .ssh/authorized_keys2 and .ssh/known_hosts2, etc. (cd; grep -v ssh-rsa .ssh/authorized_keys2 > TMP && mv TMP .ssh/authorized_keys2) additionally, we now check that BN_num_bits(rsa->n) >= 768. - markus@cvs.openbsd.org 2001/01/16 20:54:27 [sftp-server.c] remove some statics. simpler handles; idea from nisse@lysator.liu.se - deraadt@cvs.openbsd.org 2001/01/16 23:58:08 [bufaux.c radix.c sshconnect.h sshconnect1.c] indent - (bal) Added bsd-strmode.[ch] since some non-OpenBSD platforms may be missing such feature.
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sshd.c b/sshd.c
index 298a1b6bd..be7ae5ab4 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: sshd.c,v 1.147 2001/01/10 19:43:20 deraadt Exp $"); 43RCSID("$OpenBSD: sshd.c,v 1.150 2001/01/13 18:32:51 markus Exp $");
44 44
45#include "xmalloc.h" 45#include "xmalloc.h"
46#include "rsa.h" 46#include "rsa.h"
@@ -580,7 +580,7 @@ main(int ac, char **av)
580 initialize_server_options(&options); 580 initialize_server_options(&options);
581 581
582 /* Parse command-line arguments. */ 582 /* Parse command-line arguments. */
583 while ((opt = getopt(ac, av, "f:p:b:k:h:g:V:u:dDiqQ46")) != EOF) { 583 while ((opt = getopt(ac, av, "f:p:b:k:h:g:V:u:dDiqQ46")) != -1) {
584 switch (opt) { 584 switch (opt) {
585 case '4': 585 case '4':
586 IPv4or6 = AF_INET; 586 IPv4or6 = AF_INET;
@@ -927,7 +927,7 @@ main(int ac, char **av)
927 sighup_restart(); 927 sighup_restart();
928 if (fdset != NULL) 928 if (fdset != NULL)
929 xfree(fdset); 929 xfree(fdset);
930 fdsetsz = howmany(maxfd, NFDBITS) * sizeof(fd_mask); 930 fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask);
931 fdset = (fd_set *)xmalloc(fdsetsz); 931 fdset = (fd_set *)xmalloc(fdsetsz);
932 memset(fdset, 0, fdsetsz); 932 memset(fdset, 0, fdsetsz);
933 933
@@ -938,7 +938,7 @@ main(int ac, char **av)
938 FD_SET(startup_pipes[i], fdset); 938 FD_SET(startup_pipes[i], fdset);
939 939
940 /* Wait in select until there is a connection. */ 940 /* Wait in select until there is a connection. */
941 if (select(maxfd + 1, fdset, NULL, NULL, NULL) < 0) { 941 if (select(maxfd+1, fdset, NULL, NULL, NULL) < 0) {
942 if (errno != EINTR) 942 if (errno != EINTR)
943 error("select: %.100s", strerror(errno)); 943 error("select: %.100s", strerror(errno));
944 continue; 944 continue;
@@ -1080,6 +1080,12 @@ main(int ac, char **av)
1080 linger.l_linger = 5; 1080 linger.l_linger = 5;
1081 setsockopt(sock_in, SOL_SOCKET, SO_LINGER, (void *) &linger, sizeof(linger)); 1081 setsockopt(sock_in, SOL_SOCKET, SO_LINGER, (void *) &linger, sizeof(linger));
1082 1082
1083 /* Set keepalives if requested. */
1084 if (options.keepalives &&
1085 setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, (void *)&on,
1086 sizeof(on)) < 0)
1087 error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
1088
1083 /* 1089 /*
1084 * Register our connection. This turns encryption off because we do 1090 * Register our connection. This turns encryption off because we do
1085 * not have a key. 1091 * not have a key.