summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/ssh-agent.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-12-05 02:55:12 +0000
committergreen <green@FreeBSD.org>2000-12-05 02:55:12 +0000
commitab6b35a1d6b61fa8d2bb7336a0ef6fa9378898ef (patch)
treeccefbd34ee9fea2be5de1744eb036cb66156f5bd /crypto/openssh/ssh-agent.c
parent6202ac16142a68bfbc9a54bc13190fafeefe1f5c (diff)
downloadFreeBSD-src-ab6b35a1d6b61fa8d2bb7336a0ef6fa9378898ef.zip
FreeBSD-src-ab6b35a1d6b61fa8d2bb7336a0ef6fa9378898ef.tar.gz
Update to OpenSSH 2.3.0 with FreeBSD modifications. OpenSSH 2.3.0
new features description elided in favor of checking out their website. Important new FreeBSD-version stuff: PAM support has been worked in, partially from the "Unix" OpenSSH version, and a lot due to the work of Eivind Eklend, too. This requires at least the following in pam.conf: sshd auth sufficient pam_skey.so sshd auth required pam_unix.so try_first_pass sshd session required pam_permit.so Parts by: Eivind Eklend <eivind@FreeBSD.org>
Diffstat (limited to 'crypto/openssh/ssh-agent.c')
-rw-r--r--crypto/openssh/ssh-agent.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/crypto/openssh/ssh-agent.c b/crypto/openssh/ssh-agent.c
index 653aed7..2c089c0 100644
--- a/crypto/openssh/ssh-agent.c
+++ b/crypto/openssh/ssh-agent.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: ssh-agent.c,v 1.37 2000/09/21 11:07:51 markus Exp $ */
+
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.35 2000/09/07 20:27:54 deraadt Exp $");
+RCSID("$OpenBSD: ssh-agent.c,v 1.37 2000/09/21 11:07:51 markus Exp $");
RCSID("$FreeBSD$");
#include "ssh.h"
@@ -55,6 +57,7 @@ RCSID("$FreeBSD$");
#include "authfd.h"
#include "dsa.h"
#include "kex.h"
+#include "compat.h"
typedef struct {
int fd;
@@ -232,6 +235,7 @@ process_sign_request2(SocketEntry *e)
Key *key, *private;
unsigned char *blob, *data, *signature = NULL;
unsigned int blen, dlen, slen = 0;
+ int flags;
Buffer msg;
int ok = -1;
@@ -239,7 +243,10 @@ process_sign_request2(SocketEntry *e)
blob = buffer_get_string(&e->input, &blen);
data = buffer_get_string(&e->input, &dlen);
- buffer_get_int(&e->input); /* flags, unused */
+
+ flags = buffer_get_int(&e->input);
+ if (flags & SSH_AGENT_OLD_SIGNATURE)
+ datafellows = SSH_BUG_SIGBLOB;
key = dsa_key_from_blob(blob, blen);
if (key != NULL) {
@@ -770,8 +777,11 @@ main(int ac, char **av)
printf("echo Agent pid %d;\n", pid);
exit(0);
}
- setenv(SSH_AUTHSOCKET_ENV_NAME, socket_name, 1);
- setenv(SSH_AGENTPID_ENV_NAME, pidstrbuf, 1);
+ if (setenv(SSH_AUTHSOCKET_ENV_NAME, socket_name, 1) == -1 ||
+ setenv(SSH_AGENTPID_ENV_NAME, pidstrbuf, 1) == -1) {
+ perror("setenv");
+ exit(1);
+ }
execvp(av[0], av);
perror(av[0]);
exit(1);
OpenPOWER on IntegriCloud