mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-23 18:23:25 +08:00
upstream: It really looks like pledge "stdio dns" is possible
earlier. Discussed with mestre OpenBSD-Commit-ID: 610873de63a593e0ac7bbbcb7a0f2894d36f4c01
This commit is contained in:
parent
06acb04c20
commit
7c025c0055
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ssh-keysign.c,v 1.68 2021/11/10 06:25:08 djm Exp $ */
|
/* $OpenBSD: ssh-keysign.c,v 1.69 2021/11/13 17:26:13 deraadt Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002 Markus Friedl. All rights reserved.
|
* Copyright (c) 2002 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -215,6 +215,9 @@ main(int argc, char **argv)
|
|||||||
fatal("ssh-keysign not enabled in %s",
|
fatal("ssh-keysign not enabled in %s",
|
||||||
_PATH_HOST_CONFIG_FILE);
|
_PATH_HOST_CONFIG_FILE);
|
||||||
|
|
||||||
|
if (pledge("stdio dns", NULL) != 0)
|
||||||
|
fatal("%s: pledge: %s", __progname, strerror(errno));
|
||||||
|
|
||||||
for (i = found = 0; i < NUM_KEYTYPES; i++) {
|
for (i = found = 0; i < NUM_KEYTYPES; i++) {
|
||||||
if (key_fd[i] != -1)
|
if (key_fd[i] != -1)
|
||||||
found = 1;
|
found = 1;
|
||||||
@ -240,9 +243,6 @@ main(int argc, char **argv)
|
|||||||
if (!found)
|
if (!found)
|
||||||
fatal("no hostkey found");
|
fatal("no hostkey found");
|
||||||
|
|
||||||
if (pledge("stdio dns", NULL) != 0)
|
|
||||||
fatal("%s: pledge: %s", __progname, strerror(errno));
|
|
||||||
|
|
||||||
if ((b = sshbuf_new()) == NULL)
|
if ((b = sshbuf_new()) == NULL)
|
||||||
fatal("%s: sshbuf_new failed", __progname);
|
fatal("%s: sshbuf_new failed", __progname);
|
||||||
if (ssh_msg_recv(STDIN_FILENO, b) < 0)
|
if (ssh_msg_recv(STDIN_FILENO, b) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user