- markus@cvs.openbsd.org 2002/05/31 10:30:33
[sshconnect2.c] extent ssh-keysign protocol: pass # of socket-fd to ssh-keysign, keysign verfies locally used ip-address using this socket-fd, restricts fake local hostnames to actual local hostnames; ok stevesk@
This commit is contained in:
parent
f088f4374a
commit
cec2ea8d02
|
@ -59,6 +59,12 @@
|
||||||
use rijndael/aes from libcrypto (openssl >= 0.9.7) instead of
|
use rijndael/aes from libcrypto (openssl >= 0.9.7) instead of
|
||||||
our own implementation. allow use of AES hardware via libcrypto,
|
our own implementation. allow use of AES hardware via libcrypto,
|
||||||
ok deraadt@
|
ok deraadt@
|
||||||
|
- markus@cvs.openbsd.org 2002/05/31 10:30:33
|
||||||
|
[sshconnect2.c]
|
||||||
|
extent ssh-keysign protocol:
|
||||||
|
pass # of socket-fd to ssh-keysign, keysign verfies locally used
|
||||||
|
ip-address using this socket-fd, restricts fake local hostnames
|
||||||
|
to actual local hostnames; ok stevesk@
|
||||||
|
|
||||||
20020604
|
20020604
|
||||||
- (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed
|
- (stevesk) [channels.c] bug #164 patch from YOSHIFUJI Hideaki (changed
|
||||||
|
@ -743,4 +749,4 @@
|
||||||
- (stevesk) entropy.c: typo in debug message
|
- (stevesk) entropy.c: typo in debug message
|
||||||
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2161 2002/06/06 20:50:07 mouring Exp $
|
$Id: ChangeLog,v 1.2162 2002/06/06 20:51:04 mouring Exp $
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sshconnect2.c,v 1.102 2002/05/25 08:50:39 markus Exp $");
|
RCSID("$OpenBSD: sshconnect2.c,v 1.103 2002/05/31 10:30:33 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh2.h"
|
#include "ssh2.h"
|
||||||
|
@ -902,7 +902,7 @@ ssh_keysign(
|
||||||
Buffer b;
|
Buffer b;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int to[2], from[2], status, version = 1;
|
int to[2], from[2], status, version = 2;
|
||||||
|
|
||||||
debug("ssh_keysign called");
|
debug("ssh_keysign called");
|
||||||
|
|
||||||
|
@ -933,6 +933,8 @@ ssh_keysign(
|
||||||
close(to[1]);
|
close(to[1]);
|
||||||
if (dup2(to[0], STDIN_FILENO) < 0)
|
if (dup2(to[0], STDIN_FILENO) < 0)
|
||||||
fatal("ssh_keysign: dup2: %s", strerror(errno));
|
fatal("ssh_keysign: dup2: %s", strerror(errno));
|
||||||
|
close(from[1]);
|
||||||
|
close(to[0]);
|
||||||
execl(_PATH_SSH_KEY_SIGN, _PATH_SSH_KEY_SIGN, (char *) 0);
|
execl(_PATH_SSH_KEY_SIGN, _PATH_SSH_KEY_SIGN, (char *) 0);
|
||||||
fatal("ssh_keysign: exec(%s): %s", _PATH_SSH_KEY_SIGN,
|
fatal("ssh_keysign: exec(%s): %s", _PATH_SSH_KEY_SIGN,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
@ -941,6 +943,7 @@ ssh_keysign(
|
||||||
close(to[0]);
|
close(to[0]);
|
||||||
|
|
||||||
buffer_init(&b);
|
buffer_init(&b);
|
||||||
|
buffer_put_int(&b, packet_get_connection_in()); /* send # of socket */
|
||||||
buffer_put_string(&b, data, datalen);
|
buffer_put_string(&b, data, datalen);
|
||||||
msg_send(to[1], version, &b);
|
msg_send(to[1], version, &b);
|
||||||
|
|
||||||
|
@ -952,9 +955,9 @@ ssh_keysign(
|
||||||
close(from[0]);
|
close(from[0]);
|
||||||
close(to[1]);
|
close(to[1]);
|
||||||
|
|
||||||
while (waitpid(pid, &status, 0) < 0)
|
while (waitpid(pid, &status, 0) < 0)
|
||||||
if (errno != EINTR)
|
if (errno != EINTR)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (buffer_get_char(&b) != version) {
|
if (buffer_get_char(&b) != version) {
|
||||||
error("ssh_keysign: bad version");
|
error("ssh_keysign: bad version");
|
||||||
|
|
Loading…
Reference in New Issue