mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-09-26 03:18:54 +02:00
- markus@cvs.openbsd.org 2001/04/05 10:42:57
[auth-chall.c authfd.c channels.c clientloop.c kex.c kexgex.c key.c mac.c packet.c serverloop.c sftp-client.c sftp-client.h sftp-glob.c sftp-glob.h sftp-int.c sftp-server.c sftp.c ssh-keygen.c sshconnect.c sshconnect2.c sshd.c] fix whitespace: unexpand + trailing spaces.
This commit is contained in:
parent
a6c20148f5
commit
a3700050ec
@ -11,6 +11,12 @@
|
|||||||
[version.h]
|
[version.h]
|
||||||
temporary version 2.5.4 (supports rekeying).
|
temporary version 2.5.4 (supports rekeying).
|
||||||
this is not an official release.
|
this is not an official release.
|
||||||
|
- markus@cvs.openbsd.org 2001/04/05 10:42:57
|
||||||
|
[auth-chall.c authfd.c channels.c clientloop.c kex.c kexgex.c key.c
|
||||||
|
mac.c packet.c serverloop.c sftp-client.c sftp-client.h sftp-glob.c
|
||||||
|
sftp-glob.h sftp-int.c sftp-server.c sftp.c ssh-keygen.c sshconnect.c
|
||||||
|
sshconnect2.c sshd.c]
|
||||||
|
fix whitespace: unexpand + trailing spaces.
|
||||||
|
|
||||||
20010405
|
20010405
|
||||||
- OpenBSD CVS Sync
|
- OpenBSD CVS Sync
|
||||||
@ -4883,4 +4889,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1066 2001/04/05 23:22:25 mouring Exp $
|
$Id: ChangeLog,v 1.1067 2001/04/05 23:26:32 mouring Exp $
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: auth-chall.c,v 1.6 2001/03/20 18:57:04 markus Exp $");
|
RCSID("$OpenBSD: auth-chall.c,v 1.7 2001/04/05 10:42:47 markus Exp $");
|
||||||
|
|
||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@ -50,8 +50,8 @@ get_challenge(Authctxt *authctxt, char *devs)
|
|||||||
debug3("bsd auth: devs %s", devs ? devs : "<default>");
|
debug3("bsd auth: devs %s", devs ? devs : "<default>");
|
||||||
authctxt->as = auth_userchallenge(authctxt->user, devs, "auth-ssh",
|
authctxt->as = auth_userchallenge(authctxt->user, devs, "auth-ssh",
|
||||||
&challenge);
|
&challenge);
|
||||||
if (authctxt->as == NULL)
|
if (authctxt->as == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
debug2("get_challenge: <%s>", challenge ? challenge : "EMPTY");
|
debug2("get_challenge: <%s>", challenge ? challenge : "EMPTY");
|
||||||
return challenge;
|
return challenge;
|
||||||
}
|
}
|
||||||
|
6
authfd.c
6
authfd.c
@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: authfd.c,v 1.38 2001/03/06 00:33:03 deraadt Exp $");
|
RCSID("$OpenBSD: authfd.c,v 1.39 2001/04/05 10:42:48 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
|
|||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
l = read(auth->fd, buf + 4 - len, len);
|
l = read(auth->fd, buf + 4 - len, len);
|
||||||
if (l == -1 && (errno == EAGAIN || errno == EINTR))
|
if (l == -1 && (errno == EAGAIN || errno == EINTR))
|
||||||
continue;
|
continue;
|
||||||
if (l <= 0) {
|
if (l <= 0) {
|
||||||
error("Error reading response length from authentication socket.");
|
error("Error reading response length from authentication socket.");
|
||||||
return 0;
|
return 0;
|
||||||
@ -142,7 +142,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
|
|||||||
l = sizeof(buf);
|
l = sizeof(buf);
|
||||||
l = read(auth->fd, buf, l);
|
l = read(auth->fd, buf, l);
|
||||||
if (l == -1 && (errno == EAGAIN || errno == EINTR))
|
if (l == -1 && (errno == EAGAIN || errno == EINTR))
|
||||||
continue;
|
continue;
|
||||||
if (l <= 0) {
|
if (l <= 0) {
|
||||||
error("Error reading response from authentication socket.");
|
error("Error reading response from authentication socket.");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: channels.c,v 1.100 2001/04/04 20:25:35 markus Exp $");
|
RCSID("$OpenBSD: channels.c,v 1.101 2001/04/05 10:42:48 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
@ -1793,7 +1793,7 @@ channel_permit_all_opens()
|
|||||||
all_opens_permitted = 1;
|
all_opens_permitted = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
channel_add_permitted_opens(char *host, int port)
|
channel_add_permitted_opens(char *host, int port)
|
||||||
{
|
{
|
||||||
if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION)
|
if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION)
|
||||||
@ -1807,7 +1807,7 @@ channel_add_permitted_opens(char *host, int port)
|
|||||||
all_opens_permitted = 0;
|
all_opens_permitted = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
channel_clear_permitted_opens(void)
|
channel_clear_permitted_opens(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
10
clientloop.c
10
clientloop.c
@ -59,7 +59,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: clientloop.c,v 1.56 2001/04/04 20:25:37 markus Exp $");
|
RCSID("$OpenBSD: clientloop.c,v 1.57 2001/04/05 10:42:49 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
@ -735,7 +735,7 @@ client_process_output(fd_set * writeset)
|
|||||||
}
|
}
|
||||||
/* Consume printed data from the buffer. */
|
/* Consume printed data from the buffer. */
|
||||||
buffer_consume(&stdout_buffer, len);
|
buffer_consume(&stdout_buffer, len);
|
||||||
stdout_bytes += len;
|
stdout_bytes += len;
|
||||||
}
|
}
|
||||||
/* Write buffered output to stderr. */
|
/* Write buffered output to stderr. */
|
||||||
if (FD_ISSET(fileno(stderr), writeset)) {
|
if (FD_ISSET(fileno(stderr), writeset)) {
|
||||||
@ -753,7 +753,7 @@ client_process_output(fd_set * writeset)
|
|||||||
}
|
}
|
||||||
/* Consume printed characters from the buffer. */
|
/* Consume printed characters from the buffer. */
|
||||||
buffer_consume(&stderr_buffer, len);
|
buffer_consume(&stderr_buffer, len);
|
||||||
stderr_bytes += len;
|
stderr_bytes += len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -964,7 +964,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
buffer_consume(&stdout_buffer, len);
|
buffer_consume(&stdout_buffer, len);
|
||||||
stdout_bytes += len;
|
stdout_bytes += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output any buffered data for stderr. */
|
/* Output any buffered data for stderr. */
|
||||||
@ -976,7 +976,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
buffer_consume(&stderr_buffer, len);
|
buffer_consume(&stderr_buffer, len);
|
||||||
stderr_bytes += len;
|
stderr_bytes += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_pty)
|
if (have_pty)
|
||||||
|
8
kex.c
8
kex.c
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: kex.c,v 1.32 2001/04/04 23:09:18 markus Exp $");
|
RCSID("$OpenBSD: kex.c,v 1.33 2001/04/05 10:42:50 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ kex_prop_free(char **proposal)
|
|||||||
void
|
void
|
||||||
kex_protocol_error(int type, int plen, void *ctxt)
|
kex_protocol_error(int type, int plen, void *ctxt)
|
||||||
{
|
{
|
||||||
error("Hm, kex protocol error: type %d plen %d", type, plen);
|
error("Hm, kex protocol error: type %d plen %d", type, plen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -133,8 +133,8 @@ kex_finish(Kex *kex)
|
|||||||
/* packet_write_wait(); */
|
/* packet_write_wait(); */
|
||||||
debug("SSH2_MSG_NEWKEYS sent");
|
debug("SSH2_MSG_NEWKEYS sent");
|
||||||
|
|
||||||
debug("waiting for SSH2_MSG_NEWKEYS");
|
debug("waiting for SSH2_MSG_NEWKEYS");
|
||||||
packet_read_expect(&plen, SSH2_MSG_NEWKEYS);
|
packet_read_expect(&plen, SSH2_MSG_NEWKEYS);
|
||||||
debug("SSH2_MSG_NEWKEYS received");
|
debug("SSH2_MSG_NEWKEYS received");
|
||||||
|
|
||||||
kex->done = 1;
|
kex->done = 1;
|
||||||
|
8
kexgex.c
8
kexgex.c
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: kexgex.c,v 1.4 2001/04/04 22:04:35 markus Exp $");
|
RCSID("$OpenBSD: kexgex.c,v 1.5 2001/04/05 10:42:50 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ kexgex_hash(
|
|||||||
buffer_append(&b, skexinit, skexinitlen);
|
buffer_append(&b, skexinit, skexinitlen);
|
||||||
|
|
||||||
buffer_put_string(&b, serverhostkeyblob, sbloblen);
|
buffer_put_string(&b, serverhostkeyblob, sbloblen);
|
||||||
if (min == -1 || max == -1)
|
if (min == -1 || max == -1)
|
||||||
buffer_put_int(&b, wantbits);
|
buffer_put_int(&b, wantbits);
|
||||||
else {
|
else {
|
||||||
buffer_put_int(&b, min);
|
buffer_put_int(&b, min);
|
||||||
@ -205,7 +205,7 @@ kexgex_client(Kex *kex)
|
|||||||
kbuf = xmalloc(klen);
|
kbuf = xmalloc(klen);
|
||||||
kout = DH_compute_key(kbuf, dh_server_pub, dh);
|
kout = DH_compute_key(kbuf, dh_server_pub, dh);
|
||||||
#ifdef DEBUG_KEXDH
|
#ifdef DEBUG_KEXDH
|
||||||
dump_digest("shared secret", kbuf, kout);
|
dump_digest("shared secret", kbuf, kout);
|
||||||
#endif
|
#endif
|
||||||
shared_secret = BN_new();
|
shared_secret = BN_new();
|
||||||
BN_bin2bn(kbuf, kout, shared_secret);
|
BN_bin2bn(kbuf, kout, shared_secret);
|
||||||
@ -339,7 +339,7 @@ kexgex_server(Kex *kex)
|
|||||||
kbuf = xmalloc(klen);
|
kbuf = xmalloc(klen);
|
||||||
kout = DH_compute_key(kbuf, dh_client_pub, dh);
|
kout = DH_compute_key(kbuf, dh_client_pub, dh);
|
||||||
#ifdef DEBUG_KEXDH
|
#ifdef DEBUG_KEXDH
|
||||||
dump_digest("shared secret", kbuf, kout);
|
dump_digest("shared secret", kbuf, kout);
|
||||||
#endif
|
#endif
|
||||||
shared_secret = BN_new();
|
shared_secret = BN_new();
|
||||||
BN_bin2bn(kbuf, kout, shared_secret);
|
BN_bin2bn(kbuf, kout, shared_secret);
|
||||||
|
10
key.c
10
key.c
@ -32,7 +32,7 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: key.c,v 1.22 2001/03/12 22:02:01 markus Exp $");
|
RCSID("$OpenBSD: key.c,v 1.23 2001/04/05 10:42:50 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ key_fingerprint_raw(Key *k, enum fp_type dgst_type, size_t *dgst_raw_length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
key_fingerprint_hex(u_char* dgst_raw, size_t dgst_raw_len)
|
key_fingerprint_hex(u_char* dgst_raw, size_t dgst_raw_len)
|
||||||
{
|
{
|
||||||
char *retval;
|
char *retval;
|
||||||
int i;
|
int i;
|
||||||
@ -228,7 +228,7 @@ key_fingerprint_hex(u_char* dgst_raw, size_t dgst_raw_len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
key_fingerprint_bubblebabble(u_char* dgst_raw, size_t dgst_raw_len)
|
key_fingerprint_bubblebabble(u_char* dgst_raw, size_t dgst_raw_len)
|
||||||
{
|
{
|
||||||
char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'y' };
|
char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'y' };
|
||||||
char consonants[] = { 'b', 'c', 'd', 'f', 'g', 'h', 'k', 'l', 'm',
|
char consonants[] = { 'b', 'c', 'd', 'f', 'g', 'h', 'k', 'l', 'm',
|
||||||
@ -277,9 +277,9 @@ key_fingerprint_bubblebabble(u_char* dgst_raw, size_t dgst_raw_len)
|
|||||||
char*
|
char*
|
||||||
key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep)
|
key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep)
|
||||||
{
|
{
|
||||||
char *retval = NULL;
|
char *retval = NULL;
|
||||||
u_char *dgst_raw;
|
u_char *dgst_raw;
|
||||||
size_t dgst_raw_len;
|
size_t dgst_raw_len;
|
||||||
|
|
||||||
dgst_raw = key_fingerprint_raw(k, dgst_type, &dgst_raw_len);
|
dgst_raw = key_fingerprint_raw(k, dgst_type, &dgst_raw_len);
|
||||||
if (!dgst_raw)
|
if (!dgst_raw)
|
||||||
|
4
mac.c
4
mac.c
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: mac.c,v 1.1 2001/02/11 12:59:24 markus Exp $");
|
RCSID("$OpenBSD: mac.c,v 1.2 2001/04/05 10:42:51 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/hmac.h>
|
#include <openssl/hmac.h>
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ struct {
|
|||||||
{ "hmac-md5-96", EVP_md5, 96 },
|
{ "hmac-md5-96", EVP_md5, 96 },
|
||||||
{ "hmac-ripemd160", EVP_ripemd160, 0 },
|
{ "hmac-ripemd160", EVP_ripemd160, 0 },
|
||||||
{ "hmac-ripemd160@openssh.com", EVP_ripemd160, 0 },
|
{ "hmac-ripemd160@openssh.com", EVP_ripemd160, 0 },
|
||||||
{ NULL, NULL, 0 }
|
{ NULL, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
8
packet.c
8
packet.c
@ -37,7 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: packet.c,v 1.60 2001/04/05 10:39:03 markus Exp $");
|
RCSID("$OpenBSD: packet.c,v 1.61 2001/04/05 10:42:51 markus Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
@ -529,7 +529,7 @@ set_newkeys(int mode)
|
|||||||
enc = &newkeys[mode]->enc;
|
enc = &newkeys[mode]->enc;
|
||||||
mac = &newkeys[mode]->mac;
|
mac = &newkeys[mode]->mac;
|
||||||
comp = &newkeys[mode]->comp;
|
comp = &newkeys[mode]->comp;
|
||||||
memset(mac->key, 0, mac->key_len);
|
memset(mac->key, 0, mac->key_len);
|
||||||
xfree(enc->name);
|
xfree(enc->name);
|
||||||
xfree(enc->iv);
|
xfree(enc->iv);
|
||||||
xfree(enc->key);
|
xfree(enc->key);
|
||||||
@ -1329,10 +1329,10 @@ packet_set_maxsize(int s)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* 9.2. Ignored Data Message
|
* 9.2. Ignored Data Message
|
||||||
*
|
*
|
||||||
* byte SSH_MSG_IGNORE
|
* byte SSH_MSG_IGNORE
|
||||||
* string data
|
* string data
|
||||||
*
|
*
|
||||||
* All implementations MUST understand (and ignore) this message at any
|
* All implementations MUST understand (and ignore) this message at any
|
||||||
* time (after receiving the protocol version). No implementation is
|
* time (after receiving the protocol version). No implementation is
|
||||||
* required to send them. This message can be used as an additional
|
* required to send them. This message can be used as an additional
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: serverloop.c,v 1.58 2001/04/04 22:04:35 markus Exp $");
|
RCSID("$OpenBSD: serverloop.c,v 1.59 2001/04/05 10:42:51 markus Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
@ -667,7 +667,7 @@ server_loop2(void)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
process_buffered_input_packets();
|
process_buffered_input_packets();
|
||||||
|
|
||||||
rekeying = (xxx_kex != NULL && !xxx_kex->done);
|
rekeying = (xxx_kex != NULL && !xxx_kex->done);
|
||||||
|
|
||||||
if (!had_channel && channel_still_open())
|
if (!had_channel && channel_still_open())
|
||||||
had_channel = 1;
|
had_channel = 1;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
/* XXX: copy between two remote sites */
|
/* XXX: copy between two remote sites */
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sftp-client.c,v 1.15 2001/03/19 10:52:51 djm Exp $");
|
RCSID("$OpenBSD: sftp-client.c,v 1.16 2001/04/05 10:42:52 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
@ -284,7 +284,7 @@ do_close(int fd_in, int fd_out, char *handle, u_int handle_len)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
do_lsreaddir(int fd_in, int fd_out, char *path, int printflag,
|
do_lsreaddir(int fd_in, int fd_out, char *path, int printflag,
|
||||||
SFTP_DIRENT ***dir)
|
SFTP_DIRENT ***dir)
|
||||||
{
|
{
|
||||||
Buffer msg;
|
Buffer msg;
|
||||||
@ -370,7 +370,7 @@ do_lsreaddir(int fd_in, int fd_out, char *path, int printflag,
|
|||||||
printf("%s\n", longname);
|
printf("%s\n", longname);
|
||||||
|
|
||||||
if (dir) {
|
if (dir) {
|
||||||
*dir = xrealloc(*dir, sizeof(**dir) *
|
*dir = xrealloc(*dir, sizeof(**dir) *
|
||||||
(ents + 2));
|
(ents + 2));
|
||||||
(*dir)[ents] = xmalloc(sizeof(***dir));
|
(*dir)[ents] = xmalloc(sizeof(***dir));
|
||||||
(*dir)[ents]->filename = xstrdup(filename);
|
(*dir)[ents]->filename = xstrdup(filename);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sftp-client.h,v 1.4 2001/03/16 08:16:18 djm Exp $ */
|
/* $OpenBSD: sftp-client.h,v 1.5 2001/04/05 10:42:52 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Damien Miller. All rights reserved.
|
* Copyright (c) 2001 Damien Miller. All rights reserved.
|
||||||
@ -34,8 +34,8 @@ struct SFTP_DIRENT {
|
|||||||
Attrib a;
|
Attrib a;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialiase a SSH filexfer connection. Returns -1 on error or
|
* Initialiase a SSH filexfer connection. Returns -1 on error or
|
||||||
* protocol version on success.
|
* protocol version on success.
|
||||||
*/
|
*/
|
||||||
int do_init(int fd_in, int fd_out);
|
int do_init(int fd_in, int fd_out);
|
||||||
@ -68,7 +68,7 @@ Attrib *do_stat(int fd_in, int fd_out, char *path, int quiet);
|
|||||||
Attrib *do_lstat(int fd_in, int fd_out, char *path, int quiet);
|
Attrib *do_lstat(int fd_in, int fd_out, char *path, int quiet);
|
||||||
|
|
||||||
/* Get file attributes of open file 'handle' */
|
/* Get file attributes of open file 'handle' */
|
||||||
Attrib *do_fstat(int fd_in, int fd_out, char *handle, u_int handle_len,
|
Attrib *do_fstat(int fd_in, int fd_out, char *handle, u_int handle_len,
|
||||||
int quiet);
|
int quiet);
|
||||||
|
|
||||||
/* Set file attributes of 'path' */
|
/* Set file attributes of 'path' */
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sftp-glob.c,v 1.3 2001/04/03 13:56:11 stevesk Exp $");
|
RCSID("$OpenBSD: sftp-glob.c,v 1.4 2001/04/05 10:42:53 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
@ -84,7 +84,7 @@ struct dirent *fudge_readdir(struct SFTP_OPENDIR *od)
|
|||||||
#ifdef BROKEN_ONE_BYTE_DIRENT_D_NAME
|
#ifdef BROKEN_ONE_BYTE_DIRENT_D_NAME
|
||||||
strlcpy(ret->d_name, od->dir[od->offset++]->filename, MAXPATHLEN);
|
strlcpy(ret->d_name, od->dir[od->offset++]->filename, MAXPATHLEN);
|
||||||
#else
|
#else
|
||||||
strlcpy(ret->d_name, od->dir[od->offset++]->filename,
|
strlcpy(ret->d_name, od->dir[od->offset++]->filename,
|
||||||
sizeof(ret->d_name));
|
sizeof(ret->d_name));
|
||||||
#endif
|
#endif
|
||||||
#ifdef __GNU_LIBRARY__
|
#ifdef __GNU_LIBRARY__
|
||||||
@ -150,7 +150,7 @@ int fudge_stat(const char *path, struct stat *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
|
remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
|
||||||
const int (*errfunc)(const char *, int), glob_t *pglob)
|
const int (*errfunc)(const char *, int), glob_t *pglob)
|
||||||
{
|
{
|
||||||
pglob->gl_opendir = (void*)fudge_opendir;
|
pglob->gl_opendir = (void*)fudge_opendir;
|
||||||
@ -163,6 +163,6 @@ remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
|
|||||||
cur.fd_in = fd_in;
|
cur.fd_in = fd_in;
|
||||||
cur.fd_out = fd_out;
|
cur.fd_out = fd_out;
|
||||||
|
|
||||||
return(glob(pattern, flags | GLOB_ALTDIRFUNC, (void*)errfunc,
|
return(glob(pattern, flags | GLOB_ALTDIRFUNC, (void*)errfunc,
|
||||||
pglob));
|
pglob));
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sftp-glob.h,v 1.1 2001/03/13 22:42:54 djm Exp $ */
|
/* $OpenBSD: sftp-glob.h,v 1.2 2001/04/05 10:42:53 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Damien Miller. All rights reserved.
|
* Copyright (c) 2001 Damien Miller. All rights reserved.
|
||||||
@ -27,6 +27,6 @@
|
|||||||
/* Remote sftp filename globbing */
|
/* Remote sftp filename globbing */
|
||||||
|
|
||||||
int
|
int
|
||||||
remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
|
remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
|
||||||
const int (*errfunc)(const char *, int), glob_t *pglob);
|
const int (*errfunc)(const char *, int), glob_t *pglob);
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
/* XXX: recursive operations */
|
/* XXX: recursive operations */
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sftp-int.c,v 1.32 2001/03/23 13:10:57 markus Exp $");
|
RCSID("$OpenBSD: sftp-int.c,v 1.33 2001/04/05 10:42:53 markus Exp $");
|
||||||
|
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
@ -665,8 +665,8 @@ parse_dispatch_command(int in, int out, const char *cmd, char **pwd)
|
|||||||
break;
|
break;
|
||||||
case I_PUT:
|
case I_PUT:
|
||||||
err = process_put(in, out, path1, path2, *pwd, pflag);
|
err = process_put(in, out, path1, path2, *pwd, pflag);
|
||||||
break;
|
break;
|
||||||
case I_RENAME:
|
case I_RENAME:
|
||||||
path1 = make_absolute(path1, *pwd);
|
path1 = make_absolute(path1, *pwd);
|
||||||
path2 = make_absolute(path2, *pwd);
|
path2 = make_absolute(path2, *pwd);
|
||||||
err = do_rename(in, out, path1, path2);
|
err = do_rename(in, out, path1, path2);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sftp-server.c,v 1.24 2001/03/14 22:50:25 deraadt Exp $");
|
RCSID("$OpenBSD: sftp-server.c,v 1.25 2001/04/05 10:42:53 markus Exp $");
|
||||||
|
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "bufaux.h"
|
#include "bufaux.h"
|
||||||
@ -288,7 +288,7 @@ send_status(u_int32_t id, u_int32_t error)
|
|||||||
buffer_put_int(&msg, id);
|
buffer_put_int(&msg, id);
|
||||||
buffer_put_int(&msg, error);
|
buffer_put_int(&msg, error);
|
||||||
if (version >= 3) {
|
if (version >= 3) {
|
||||||
buffer_put_cstring(&msg,
|
buffer_put_cstring(&msg,
|
||||||
status_messages[MIN(error,SSH2_FX_MAX)]);
|
status_messages[MIN(error,SSH2_FX_MAX)]);
|
||||||
buffer_put_cstring(&msg, "");
|
buffer_put_cstring(&msg, "");
|
||||||
}
|
}
|
||||||
|
6
sftp.c
6
sftp.c
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
|
||||||
RCSID("$OpenBSD: sftp.c,v 1.11 2001/03/07 10:11:23 djm Exp $");
|
RCSID("$OpenBSD: sftp.c,v 1.12 2001/04/05 10:42:54 markus Exp $");
|
||||||
|
|
||||||
/* XXX: commandline mode */
|
/* XXX: commandline mode */
|
||||||
/* XXX: copy between two remote hosts (commandline) */
|
/* XXX: copy between two remote hosts (commandline) */
|
||||||
@ -191,9 +191,9 @@ main(int argc, char **argv)
|
|||||||
case 'b':
|
case 'b':
|
||||||
if (infile == stdin) {
|
if (infile == stdin) {
|
||||||
infile = fopen(optarg, "r");
|
infile = fopen(optarg, "r");
|
||||||
if (infile == NULL)
|
if (infile == NULL)
|
||||||
fatal("%s (%s).", strerror(errno), optarg);
|
fatal("%s (%s).", strerror(errno), optarg);
|
||||||
} else
|
} else
|
||||||
fatal("Filename already specified.");
|
fatal("Filename already specified.");
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: ssh-keygen.c,v 1.54 2001/04/03 13:56:11 stevesk Exp $");
|
RCSID("$OpenBSD: ssh-keygen.c,v 1.55 2001/04/05 10:42:54 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
@ -118,7 +118,7 @@ try_load_pem_key(char *filename)
|
|||||||
char *pass;
|
char *pass;
|
||||||
Key *prv;
|
Key *prv;
|
||||||
|
|
||||||
prv = key_load_private(filename, "", NULL);
|
prv = key_load_private(filename, "", NULL);
|
||||||
if (prv == NULL) {
|
if (prv == NULL) {
|
||||||
pass = read_passphrase("Enter passphrase: ", 1);
|
pass = read_passphrase("Enter passphrase: ", 1);
|
||||||
prv = key_load_private(filename, pass, NULL);
|
prv = key_load_private(filename, pass, NULL);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sshconnect.c,v 1.101 2001/03/26 08:07:09 markus Exp $");
|
RCSID("$OpenBSD: sshconnect.c,v 1.102 2001/04/05 10:42:55 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
|
|||||||
temporarily_use_uid(original_real_uid);
|
temporarily_use_uid(original_real_uid);
|
||||||
if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) {
|
if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) {
|
||||||
/* Successful connection. */
|
/* Successful connection. */
|
||||||
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
|
memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
|
||||||
restore_uid();
|
restore_uid();
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sshconnect2.c,v 1.66 2001/04/04 20:25:38 markus Exp $");
|
RCSID("$OpenBSD: sshconnect2.c,v 1.67 2001/04/05 10:42:56 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
@ -642,7 +642,7 @@ int agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
|
|||||||
int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
|
int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
|
||||||
u_char *data, int datalen)
|
u_char *data, int datalen)
|
||||||
{
|
{
|
||||||
return key_sign(key, sigp, lenp, data, datalen);
|
return key_sign(key, sigp, lenp, data, datalen);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -825,7 +825,7 @@ static char *preferred = NULL;
|
|||||||
/*
|
/*
|
||||||
* Given the authentication method list sent by the server, return the
|
* Given the authentication method list sent by the server, return the
|
||||||
* next method we should try. If the server initially sends a nil list,
|
* next method we should try. If the server initially sends a nil list,
|
||||||
* use a built-in default list.
|
* use a built-in default list.
|
||||||
*/
|
*/
|
||||||
Authmethod *
|
Authmethod *
|
||||||
authmethod_get(char *authlist)
|
authmethod_get(char *authlist)
|
||||||
|
8
sshd.c
8
sshd.c
@ -40,7 +40,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: sshd.c,v 1.190 2001/04/04 20:25:38 markus Exp $");
|
RCSID("$OpenBSD: sshd.c,v 1.191 2001/04/05 10:42:57 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
@ -282,11 +282,11 @@ generate_ephemeral_server_key(void)
|
|||||||
u_int32_t rand = 0;
|
u_int32_t rand = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
verbose("Generating %s%d bit RSA key.",
|
verbose("Generating %s%d bit RSA key.",
|
||||||
sensitive_data.server_key ? "new " : "", options.server_key_bits);
|
sensitive_data.server_key ? "new " : "", options.server_key_bits);
|
||||||
if (sensitive_data.server_key != NULL)
|
if (sensitive_data.server_key != NULL)
|
||||||
key_free(sensitive_data.server_key);
|
key_free(sensitive_data.server_key);
|
||||||
sensitive_data.server_key = key_generate(KEY_RSA1,
|
sensitive_data.server_key = key_generate(KEY_RSA1,
|
||||||
options.server_key_bits);
|
options.server_key_bits);
|
||||||
verbose("RSA key generation complete.");
|
verbose("RSA key generation complete.");
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read other side's version identification. */
|
/* Read other side's version identification. */
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
for (i = 0; i < sizeof(buf) - 1; i++) {
|
for (i = 0; i < sizeof(buf) - 1; i++) {
|
||||||
if (atomicio(read, sock_in, &buf[i], 1) != 1) {
|
if (atomicio(read, sock_in, &buf[i], 1) != 1) {
|
||||||
log("Did not receive identification string from %s.",
|
log("Did not receive identification string from %s.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user