summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-06-14 03:28:19 +0000
committerDamien Miller <djm@mindrot.org>2019-06-14 13:42:31 +1000
commita5a53914989ddd3521b6edc452bc3291784a4f4f (patch)
tree34126745288f0a9190a8b67699773cd44466965c
parent7349149da1074d82b71722338e05b6a282f126cc (diff)
upstream: if passed a bad fd, log what it was
OpenBSD-Commit-ID: 582e2bd05854e49365195b58989b68ac67f09140
-rw-r--r--ssh-keysign.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-keysign.c b/ssh-keysign.c
index 9ebc6786..7c14cde8 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keysign.c,v 1.57 2019/06/06 05:13:13 otto Exp $ */
+/* $OpenBSD: ssh-keysign.c,v 1.58 2019/06/14 03:28:19 djm Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
*
@@ -251,7 +251,7 @@ main(int argc, char **argv)
if ((r = sshbuf_get_u32(b, (u_int *)&fd)) != 0)
fatal("%s: buffer error: %s", __progname, ssh_err(r));
if (fd < 0 || fd == STDIN_FILENO || fd == STDOUT_FILENO)
- fatal("bad fd");
+ fatal("bad fd = %d", fd);
if ((host = get_local_name(fd)) == NULL)
fatal("cannot get local name for fd");