summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2015-01-20 23:14:00 +0000
committerDamien Miller <djm@mindrot.org>2015-01-26 23:58:53 +1100
commit087266ec33c76fc8d54ac5a19efacf2f4a4ca076 (patch)
tree71f57bb41b61561ebaa13026d8dc5d04d9829b00 /sshd.c
parent57e783c8ba2c0797f93977e83b2a8644a03065d8 (diff)
upstream commit
Reduce use of <sys/param.h> and transition to <limits.h> throughout. ok djm markus
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sshd.c b/sshd.c
index 6e40ba42e..ef63bd1e8 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.437 2015/01/20 20:16:21 markus Exp $ */ 1/* $OpenBSD: sshd.c,v 1.438 2015/01/20 23:14:00 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -45,7 +45,6 @@
45#include "includes.h" 45#include "includes.h"
46 46
47#include <sys/types.h> 47#include <sys/types.h>
48#include <sys/param.h>
49#include <sys/ioctl.h> 48#include <sys/ioctl.h>
50#include <sys/socket.h> 49#include <sys/socket.h>
51#ifdef HAVE_SYS_STAT_H 50#ifdef HAVE_SYS_STAT_H
@@ -72,6 +71,7 @@
72#include <stdlib.h> 71#include <stdlib.h>
73#include <string.h> 72#include <string.h>
74#include <unistd.h> 73#include <unistd.h>
74#include <limits.h>
75 75
76#ifdef WITH_OPENSSL 76#ifdef WITH_OPENSSL
77#include <openssl/dh.h> 77#include <openssl/dh.h>
@@ -229,7 +229,7 @@ u_char *session_id2 = NULL;
229u_int session_id2_len = 0; 229u_int session_id2_len = 0;
230 230
231/* record remote hostname or ip */ 231/* record remote hostname or ip */
232u_int utmp_len = MAXHOSTNAMELEN; 232u_int utmp_len = HOST_NAME_MAX+1;
233 233
234/* options.max_startup sized array of fd ints */ 234/* options.max_startup sized array of fd ints */
235int *startup_pipes = NULL; 235int *startup_pipes = NULL;
@@ -1544,8 +1544,8 @@ main(int ac, char **av)
1544 exit(1); 1544 exit(1);
1545 break; 1545 break;
1546 case 'u': 1546 case 'u':
1547 utmp_len = (u_int)strtonum(optarg, 0, MAXHOSTNAMELEN+1, NULL); 1547 utmp_len = (u_int)strtonum(optarg, 0, HOST_NAME_MAX+1+1, NULL);
1548 if (utmp_len > MAXHOSTNAMELEN) { 1548 if (utmp_len > HOST_NAME_MAX+1) {
1549 fprintf(stderr, "Invalid utmp length.\n"); 1549 fprintf(stderr, "Invalid utmp length.\n");
1550 exit(1); 1550 exit(1);
1551 } 1551 }