Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssh kill another copy of strtonum.
details: https://anonhg.NetBSD.org/src/rev/99f98efb6b67
branches: trunk
changeset: 335603:99f98efb6b67
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 16 20:17:49 2015 +0000
description:
kill another copy of strtonum.
diffstat:
crypto/external/bsd/openssh/Makefile.inc | 4 +-
crypto/external/bsd/openssh/dist/misc.h | 3 +-
crypto/external/bsd/openssh/dist/namespace.h | 3 +-
crypto/external/bsd/openssh/dist/strtonum.c | 78 ----------------------------
crypto/external/bsd/openssh/lib/Makefile | 5 +-
5 files changed, 6 insertions(+), 87 deletions(-)
diffs (153 lines):
diff -r 5aa833e6034d -r 99f98efb6b67 crypto/external/bsd/openssh/Makefile.inc
--- a/crypto/external/bsd/openssh/Makefile.inc Fri Jan 16 20:16:36 2015 +0000
+++ b/crypto/external/bsd/openssh/Makefile.inc Fri Jan 16 20:17:49 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.6 2014/10/19 16:30:58 christos Exp $
+# $NetBSD: Makefile.inc,v 1.7 2015/01/16 20:17:49 christos Exp $
WARNS?= 4
@@ -10,7 +10,7 @@
SSHDIST?= ${NETBSDSRCDIR}/crypto/external/bsd/openssh/dist
CPPFLAGS+=-I${SSHDIST} -DHAVE_LOGIN_CAP -DHAVE_MMAP -DHAVE_OPENPTY
-CPPFLAGS+=-DWITH_SSH1 -DWITH_OPENSSL -DENABLE_PKCS11
+CPPFLAGS+=-DWITH_SSH1 -DWITH_OPENSSL -DENABLE_PKCS11 -D_OPENBSD_SOURCE
.if !defined(NOPIC)
CPPFLAGS+=-DHAVE_DLOPEN
.endif
diff -r 5aa833e6034d -r 99f98efb6b67 crypto/external/bsd/openssh/dist/misc.h
--- a/crypto/external/bsd/openssh/dist/misc.h Fri Jan 16 20:16:36 2015 +0000
+++ b/crypto/external/bsd/openssh/dist/misc.h Fri Jan 16 20:17:49 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.h,v 1.7 2014/10/19 16:30:58 christos Exp $ */
+/* $NetBSD: misc.h,v 1.8 2015/01/16 20:17:49 christos Exp $ */
/* $OpenBSD: misc.h,v 1.54 2014/07/15 15:54:14 millert Exp $ */
/*
@@ -66,7 +66,6 @@
int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
u_int8_t *, size_t, unsigned int);
-long long strtonum(const char *, long long, long long, const char **);
struct passwd *pwcopy(struct passwd *);
const char *ssh_gai_strerror(int);
diff -r 5aa833e6034d -r 99f98efb6b67 crypto/external/bsd/openssh/dist/namespace.h
--- a/crypto/external/bsd/openssh/dist/namespace.h Fri Jan 16 20:16:36 2015 +0000
+++ b/crypto/external/bsd/openssh/dist/namespace.h Fri Jan 16 20:17:49 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.3 2014/10/19 16:30:58 christos Exp $ */
+/* $NetBSD: namespace.h,v 1.4 2015/01/16 20:17:49 christos Exp $ */
#ifndef _SSH_NAMESPACE_H_
#define _SSH_NAMESPACE_H_
#define addargs ssh_addargs
@@ -22,7 +22,6 @@
#define pwcopy ssh_pwcopy
#define replacearg ssh_replacearg
#define strdelim ssh_strdelim
-#define strtonum ssh_strtonum
#define tohex ssh_tohex
#define uudecode ssh_uudecode
#define uuencode ssh_uuencode
diff -r 5aa833e6034d -r 99f98efb6b67 crypto/external/bsd/openssh/dist/strtonum.c
--- a/crypto/external/bsd/openssh/dist/strtonum.c Fri Jan 16 20:16:36 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/* $NetBSD: strtonum.c,v 1.2 2014/10/19 16:30:59 christos Exp $ */
-/* $OpenBSD: strtonum.c,v 1.6 2004/08/03 19:38:01 millert Exp $ */
-
-/*
- * Copyright (c) 2004 Ted Unangst and Todd Miller
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* OPENBSD ORIGINAL: lib/libc/stdlib/strtonum.c */
-
-#include "includes.h"
-__RCSID("$NetBSD: strtonum.c,v 1.2 2014/10/19 16:30:59 christos Exp $");
-
-#ifndef HAVE_STRTONUM
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <errno.h>
-#include <time.h>
-#include "misc.h"
-
-#define INVALID 1
-#define TOOSMALL 2
-#define TOOLARGE 3
-
-long long
-strtonum(const char *numstr, long long minval, long long maxval,
- const char **errstrp)
-{
- long long ll = 0;
- char *ep;
- int error = 0;
- struct errval {
- const char *errstr;
- int err;
- } ev[4] = {
- { NULL, 0 },
- { "invalid", EINVAL },
- { "too small", ERANGE },
- { "too large", ERANGE },
- };
-
- ev[0].err = errno;
- errno = 0;
- if (minval > maxval)
- error = INVALID;
- else {
- ll = strtoll(numstr, &ep, 10);
- if (numstr == ep || *ep != '\0')
- error = INVALID;
- else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval)
- error = TOOSMALL;
- else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval)
- error = TOOLARGE;
- }
- if (errstrp != NULL)
- *errstrp = ev[error].errstr;
- errno = ev[error].err;
- if (error)
- ll = 0;
-
- return (ll);
-}
-
-#endif /* HAVE_STRTONUM */
diff -r 5aa833e6034d -r 99f98efb6b67 crypto/external/bsd/openssh/lib/Makefile
--- a/crypto/external/bsd/openssh/lib/Makefile Fri Jan 16 20:16:36 2015 +0000
+++ b/crypto/external/bsd/openssh/lib/Makefile Fri Jan 16 20:17:49 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2014/10/20 03:05:13 christos Exp $
+# $NetBSD: Makefile,v 1.16 2015/01/16 20:17:49 christos Exp $
.include <bsd.own.mk>
@@ -88,8 +88,7 @@
ssh-ecdsa.c \
ssh-rsa.c
-# umac.c
-SRCS+= fmt_scaled.c strtonum.c
+SRCS+= fmt_scaled.c
SRCS+= readpassphrase.c getpeereid.c getrrsetbyname.c
COPTS.monitor_fdpass.c = -Wno-stack-protector
Home |
Main Index |
Thread Index |
Old Index