version 1.17, 2016/03/16 21:00:37 |
version 1.17.2.2, 2017/04/26 02:52:15 |
|
|
/* $NetBSD$ */ |
/* $NetBSD$ */ |
/* $OpenBSD: sshconnect.c,v 1.271 2016/01/14 22:56:56 markus Exp $ */ |
/* $OpenBSD: sshconnect.c,v 1.273 2017/03/10 03:22:40 dtucker Exp $ */ |
|
|
/* |
/* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
|
|
|
|
#include "includes.h" |
#include "includes.h" |
__RCSID("$NetBSD$"); |
__RCSID("$NetBSD$"); |
|
|
#include <sys/param.h> /* roundup */ |
#include <sys/param.h> /* roundup */ |
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/param.h> |
#include <sys/param.h> |
Line 1414 ssh_put_password(char *password) |
|
Line 1414 ssh_put_password(char *password) |
|
packet_put_cstring(password); |
packet_put_cstring(password); |
return; |
return; |
} |
} |
size = roundup(strlen(password) + 1, 32); |
size = ROUNDUP(strlen(password) + 1, 32); |
padded = xcalloc(1, size); |
padded = xcalloc(1, size); |
strlcpy(padded, password, size); |
strlcpy(padded, password, size); |
packet_put_string(padded, size); |
packet_put_string(padded, size); |
Line 1544 maybe_add_key_to_agent(char *authfile, K |
|
Line 1544 maybe_add_key_to_agent(char *authfile, K |
|
if (options.add_keys_to_agent == 2 && |
if (options.add_keys_to_agent == 2 && |
!ask_permission("Add key %s (%s) to agent?", authfile, comment)) { |
!ask_permission("Add key %s (%s) to agent?", authfile, comment)) { |
debug3("user denied adding this key"); |
debug3("user denied adding this key"); |
|
close(auth_sock); |
return; |
return; |
} |
} |
|
|
Line 1552 maybe_add_key_to_agent(char *authfile, K |
|
Line 1553 maybe_add_key_to_agent(char *authfile, K |
|
debug("identity added to agent: %s", authfile); |
debug("identity added to agent: %s", authfile); |
else |
else |
debug("could not add identity to agent: %s (%d)", authfile, r); |
debug("could not add identity to agent: %s (%d)", authfile, r); |
|
|
close(auth_sock); |
close(auth_sock); |
} |
} |