summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/Makefile2
-rw-r--r--regress/integrity.sh4
-rwxr-xr-xregress/modpipe.c32
3 files changed, 34 insertions, 4 deletions
diff --git a/regress/Makefile b/regress/Makefile
index 18f9f124c..c3aec43fc 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -90,6 +90,8 @@ TEST_ENV= "MALLOC_OPTIONS=AFGJPRX"
90 90
91TEST_SSH_SSHKEYGEN?=ssh-keygen 91TEST_SSH_SSHKEYGEN?=ssh-keygen
92 92
93CPPFLAGS=-I..
94
93t1: 95t1:
94 ${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv 96 ${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
95 tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv 97 tr '\n' '\r' <${.CURDIR}/rsa_ssh2.prv > ${.OBJDIR}/rsa_ssh2_cr.prv
diff --git a/regress/integrity.sh b/regress/integrity.sh
index 261e9f9a9..0a0146e05 100644
--- a/regress/integrity.sh
+++ b/regress/integrity.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: integrity.sh,v 1.5 2013/02/18 22:26:47 djm Exp $ 1# $OpenBSD: integrity.sh,v 1.6 2013/02/19 02:14:09 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="integrity" 4tid="integrity"
@@ -46,7 +46,7 @@ for m in $macs; do
46 *) macopt="-m $m";; 46 *) macopt="-m $m";;
47 esac 47 esac
48 output=$(${SSH} $macopt -2F $OBJ/ssh_proxy -o "$pxy" \ 48 output=$(${SSH} $macopt -2F $OBJ/ssh_proxy -o "$pxy" \
49 999.999.999.999 'printf "%2048s" " "' 2>&1) 49 999.999.999.999 'printf "%4096s" " "' 2>&1)
50 if [ $? -eq 0 ]; then 50 if [ $? -eq 0 ]; then
51 fail "ssh -m $m succeeds with bit-flip at $off" 51 fail "ssh -m $m succeeds with bit-flip at $off"
52 fi 52 fi
diff --git a/regress/modpipe.c b/regress/modpipe.c
index 439be4c9d..b05915b63 100755
--- a/regress/modpipe.c
+++ b/regress/modpipe.c
@@ -14,16 +14,44 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16 16
17/* $Id: modpipe.c,v 1.1 2012/12/11 23:54:40 djm Exp $ */ 17/* $Id: modpipe.c,v 1.2 2013/02/19 02:15:08 djm Exp $ */
18 18
19#include <sys/types.h> 19#include <sys/types.h>
20#include <unistd.h> 20#include <unistd.h>
21#include <stdio.h> 21#include <stdio.h>
22#include <string.h> 22#include <string.h>
23#include <stdarg.h>
23#include <stdlib.h> 24#include <stdlib.h>
24#include <err.h>
25#include <errno.h> 25#include <errno.h>
26 26
27static void err(int, const char *, ...) __attribute__((format(printf, 2, 3)));
28static void errx(int, const char *, ...) __attribute__((format(printf, 2, 3)));
29
30static void
31err(int r, const char *fmt, ...)
32{
33 va_list args;
34
35 va_start(args, fmt);
36 fprintf(stderr, "%s: ", strerror(errno));
37 vfprintf(stderr, fmt, args);
38 fputc('\n', stderr);
39 va_end(args);
40 exit(r);
41}
42
43static void
44errx(int r, const char *fmt, ...)
45{
46 va_list args;
47
48 va_start(args, fmt);
49 vfprintf(stderr, fmt, args);
50 fputc('\n', stderr);
51 va_end(args);
52 exit(r);
53}
54
27static void 55static void
28usage(void) 56usage(void)
29{ 57{