Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e01f4f6bfd | ||
|
|
63bfbba9f4 | ||
|
|
293e6d2eca | ||
|
|
727a3bfd3b | ||
|
|
13cfd6d682 | ||
|
|
4425e64da7 | ||
|
|
eea312e61a | ||
|
|
203eaf49fe |
@@ -1,73 +1,25 @@
|
||||
20130828
|
||||
- (djm) [openbsd-compat/bsd-snprintf.c] teach our local snprintf code the
|
||||
'j' (intmax_t/uintmax_t) and 'z' (size_t/ssize_t) conversions in case we
|
||||
start to use them in the future.
|
||||
- (djm) [openbsd-compat/bsd-snprintf.c] #ifdef noytet for intmax_t bits
|
||||
until we have configure support.
|
||||
|
||||
20130821
|
||||
20131108
|
||||
- (djm) OpenBSD CVS Sync
|
||||
- djm@cvs.openbsd.org 2013/08/06 23:03:49
|
||||
[sftp.c]
|
||||
fix some whitespace at EOL
|
||||
make list of commands an enum rather than a long list of defines
|
||||
add -a to usage()
|
||||
- [email protected] 2013/08/06 23:05:01
|
||||
[sftp.1]
|
||||
document top-level -a option (the -a option to 'get' was already
|
||||
documented)
|
||||
- [email protected] 2013/08/06 23:06:01
|
||||
[servconf.c]
|
||||
add cast to avoid format warning; from portable
|
||||
- [email protected] 2013/08/07 06:24:51
|
||||
[sftp.1 sftp.c]
|
||||
sort -a;
|
||||
- [email protected] 2013/08/08 04:52:04
|
||||
[sftp.c]
|
||||
fix two year old regression: symlinking a file would incorrectly
|
||||
canonicalise the target path. bz#2129 report from delphij AT freebsd.org
|
||||
- [email protected] 2013/08/08 05:04:03
|
||||
[sftp-client.c sftp-client.h sftp.c]
|
||||
add a "-l" flag for the rename command to force it to use the silly
|
||||
standard SSH_FXP_RENAME command instead of the POSIX-rename- like
|
||||
[email protected] extension.
|
||||
- markus@cvs.openbsd.org 2013/11/06 16:52:11
|
||||
[monitor_wrap.c]
|
||||
fix rekeying for AES-GCM modes; ok deraadt
|
||||
- [email protected] 2013/11/08 00:39:15
|
||||
[auth-options.c auth2-chall.c authfd.c channels.c cipher-3des1.c]
|
||||
[clientloop.c gss-genr.c monitor_mm.c packet.c schnorr.c umac.c]
|
||||
[sftp-client.c sftp-glob.c]
|
||||
use calloc for all structure allocations; from markus@
|
||||
- (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
|
||||
[contrib/suse/openssh.spec] update version numbers
|
||||
- [email protected] 2013/11/08 01:38:11
|
||||
[version.h]
|
||||
openssh-6.4
|
||||
- (djm) Release 6.4p1
|
||||
|
||||
intended for use in regress tests, so no documentation.
|
||||
- djm@cvs.openbsd.org 2013/08/09 03:37:25
|
||||
[sftp.c]
|
||||
do getopt parsing for all sftp commands (with an empty optstring for
|
||||
commands without arguments) to ensure consistent behaviour
|
||||
- [email protected] 2013/08/09 03:39:13
|
||||
[sftp-client.c]
|
||||
two problems found by a to-be-committed regress test: 1) msg_id was not
|
||||
being initialised so was starting at a random value from the heap
|
||||
(harmless, but confusing). 2) some error conditions were not being
|
||||
propagated back to the caller
|
||||
- [email protected] 2013/08/09 03:56:42
|
||||
[sftp.c]
|
||||
enable ctrl-left-arrow and ctrl-right-arrow to move forward/back a word;
|
||||
matching ksh's relatively recent change.
|
||||
- [email protected] 2013/08/13 18:32:08
|
||||
[ssh-keygen.c]
|
||||
typo in error message; from Stephan Rickauer
|
||||
- [email protected] 2013/08/13 18:33:08
|
||||
[ssh-keygen.c]
|
||||
another of the same typo
|
||||
- [email protected] 2013/08/14 08:39:27
|
||||
[scp.1 ssh.1]
|
||||
some Bx/Ox conversion;
|
||||
From: Jan Stary
|
||||
- [email protected] 2013/08/20 00:11:38
|
||||
[readconf.c readconf.h ssh_config.5 sshconnect.c]
|
||||
Add a ssh_config ProxyUseFDPass option that supports the use of
|
||||
ProxyCommands that establish a connection and then pass a connected
|
||||
file descriptor back to ssh(1). This allows the ProxyCommand to exit
|
||||
rather than have to shuffle data back and forth and enables ssh to use
|
||||
getpeername, etc. to obtain address information just like it does with
|
||||
regular directly-connected sockets. ok markus@
|
||||
- [email protected] 2013/08/20 06:56:07
|
||||
[ssh.1 ssh_config.5]
|
||||
some proxyusefdpass tweaks;
|
||||
20130913
|
||||
- (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code;
|
||||
ok dtucker@
|
||||
- (djm) [channels.c] sigh, typo s/buffet_/buffer_/
|
||||
- (djm) Release 6.3p1
|
||||
|
||||
20130808
|
||||
- (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
See http://www.openssh.com/txt/release-6.3 for the release notes.
|
||||
See http://www.openssh.com/txt/release-6.4 for the release notes.
|
||||
|
||||
- A Japanese translation of this document and of the OpenSSH FAQ is
|
||||
- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
|
||||
@@ -62,4 +62,4 @@ References -
|
||||
[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
|
||||
[7] http://www.openssh.com/faq.html
|
||||
|
||||
$Id: README,v 1.83 2013/07/25 02:34:00 djm Exp $
|
||||
$Id: README,v 1.83.4.1 2013/11/08 01:36:17 djm Exp $
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth-options.c,v 1.59 2013/07/12 00:19:58 djm Exp $ */
|
||||
/* $OpenBSD: auth-options.c,v 1.61 2013/11/08 00:39:14 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <[email protected]>
|
||||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland
|
||||
@@ -239,7 +239,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
|
||||
auth_debug_add("Adding to environment: %.900s", s);
|
||||
debug("Adding to environment: %.900s", s);
|
||||
opts++;
|
||||
new_envstring = xmalloc(sizeof(struct envstring));
|
||||
new_envstring = xcalloc(1, sizeof(struct envstring));
|
||||
new_envstring->s = s;
|
||||
new_envstring->next = custom_environment;
|
||||
custom_environment = new_envstring;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth2-chall.c,v 1.38 2013/05/17 00:13:13 djm Exp $ */
|
||||
/* $OpenBSD: auth2-chall.c,v 1.39 2013/11/08 00:39:14 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||
* Copyright (c) 2001 Per Allansson. All rights reserved.
|
||||
@@ -111,7 +111,7 @@ kbdint_alloc(const char *devs)
|
||||
remove_kbdint_device("pam");
|
||||
#endif
|
||||
|
||||
kbdintctxt = xmalloc(sizeof(KbdintAuthctxt));
|
||||
kbdintctxt = xcalloc(1, sizeof(KbdintAuthctxt));
|
||||
if (strcmp(devs, "") == 0) {
|
||||
buffer_init(&b);
|
||||
for (i = 0; devices[i]; i++) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: authfd.c,v 1.87 2013/05/17 00:13:13 djm Exp $ */
|
||||
/* $OpenBSD: authfd.c,v 1.88 2013/11/08 00:39:14 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@@ -206,7 +206,7 @@ ssh_get_authentication_connection(void)
|
||||
if (sock < 0)
|
||||
return NULL;
|
||||
|
||||
auth = xmalloc(sizeof(*auth));
|
||||
auth = xcalloc(1, sizeof(*auth));
|
||||
auth->fd = sock;
|
||||
buffer_init(&auth->identities);
|
||||
auth->howmany = 0;
|
||||
|
||||
+3
-4
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: channels.c,v 1.324 2013/07/12 00:19:58 djm Exp $ */
|
||||
/* $OpenBSD: channels.c,v 1.327 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@@ -704,7 +704,7 @@ channel_register_status_confirm(int id, channel_confirm_cb *cb,
|
||||
if ((c = channel_lookup(id)) == NULL)
|
||||
fatal("channel_register_expect: %d: bad id", id);
|
||||
|
||||
cc = xmalloc(sizeof(*cc));
|
||||
cc = xcalloc(1, sizeof(*cc));
|
||||
cc->cb = cb;
|
||||
cc->abandon_cb = abandon_cb;
|
||||
cc->ctx = ctx;
|
||||
@@ -1239,11 +1239,10 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
|
||||
s5_rsp.command = SSH_SOCKS5_SUCCESS;
|
||||
s5_rsp.reserved = 0; /* ignored */
|
||||
s5_rsp.atyp = SSH_SOCKS5_IPV4;
|
||||
((struct in_addr *)&dest_addr)->s_addr = INADDR_ANY;
|
||||
dest_port = 0; /* ignored */
|
||||
|
||||
buffer_append(&c->output, &s5_rsp, sizeof(s5_rsp));
|
||||
buffer_append(&c->output, &dest_addr, sizeof(struct in_addr));
|
||||
buffer_put_int(&c->output, ntohl(INADDR_ANY)); /* bind address */
|
||||
buffer_append(&c->output, &dest_port, sizeof(dest_port));
|
||||
return 1;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cipher-3des1.c,v 1.8 2013/05/17 00:13:13 djm Exp $ */
|
||||
/* $OpenBSD: cipher-3des1.c,v 1.9 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@@ -67,7 +67,7 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
|
||||
u_char *k1, *k2, *k3;
|
||||
|
||||
if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
|
||||
c = xmalloc(sizeof(*c));
|
||||
c = xcalloc(1, sizeof(*c));
|
||||
EVP_CIPHER_CTX_set_app_data(ctx, c);
|
||||
}
|
||||
if (key == NULL)
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: clientloop.c,v 1.253 2013/06/07 15:37:52 dtucker Exp $ */
|
||||
/* $OpenBSD: clientloop.c,v 1.255 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@@ -837,7 +837,7 @@ void
|
||||
client_expect_confirm(int id, const char *request,
|
||||
enum confirm_action action)
|
||||
{
|
||||
struct channel_reply_ctx *cr = xmalloc(sizeof(*cr));
|
||||
struct channel_reply_ctx *cr = xcalloc(1, sizeof(*cr));
|
||||
|
||||
cr->request_type = request;
|
||||
cr->action = action;
|
||||
@@ -860,7 +860,7 @@ client_register_global_confirm(global_confirm_cb *cb, void *ctx)
|
||||
return;
|
||||
}
|
||||
|
||||
gc = xmalloc(sizeof(*gc));
|
||||
gc = xcalloc(1, sizeof(*gc));
|
||||
gc->cb = cb;
|
||||
gc->ctx = ctx;
|
||||
gc->ref_count = 1;
|
||||
@@ -1438,7 +1438,7 @@ client_new_escape_filter_ctx(int escape_char)
|
||||
{
|
||||
struct escape_filter_ctx *ret;
|
||||
|
||||
ret = xmalloc(sizeof(*ret));
|
||||
ret = xcalloc(1, sizeof(*ret));
|
||||
ret->escape_pending = 0;
|
||||
ret->escape_char = escape_char;
|
||||
return (void *)ret;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#old cvs stuff. please update before use. may be deprecated.
|
||||
%define use_stable 1
|
||||
%define version 6.3p1
|
||||
%define version 6.4p1
|
||||
%if %{use_stable}
|
||||
%define cvs %{nil}
|
||||
%define release 1
|
||||
@@ -363,4 +363,4 @@ fi
|
||||
* Mon Jan 01 1998 ...
|
||||
Template Version: 1.31
|
||||
|
||||
$Id: openssh.spec,v 1.80 2013/07/25 02:34:00 djm Exp $
|
||||
$Id: openssh.spec,v 1.80.4.1 2013/11/08 01:36:19 djm Exp $
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
%define ver 6.3p1
|
||||
%define ver 6.4p1
|
||||
%define rel 1
|
||||
|
||||
# OpenSSH privilege separation requires a user & group ID
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
|
||||
Name: openssh
|
||||
Version: 6.3p1
|
||||
Version: 6.4p1
|
||||
URL: http://www.openssh.com/
|
||||
Release: 1
|
||||
Source0: openssh-%{version}.tar.gz
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gss-genr.c,v 1.21 2013/05/17 00:13:13 djm Exp $ */
|
||||
/* $OpenBSD: gss-genr.c,v 1.22 2013/11/08 00:39:15 djm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
|
||||
@@ -62,7 +62,7 @@ ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len)
|
||||
free(ctx->oid->elements);
|
||||
free(ctx->oid);
|
||||
}
|
||||
ctx->oid = xmalloc(sizeof(gss_OID_desc));
|
||||
ctx->oid = xcalloc(1, sizeof(gss_OID_desc));
|
||||
ctx->oid->length = len;
|
||||
ctx->oid->elements = xmalloc(len);
|
||||
memcpy(ctx->oid->elements, data, len);
|
||||
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: monitor_mm.c,v 1.17 2013/05/17 00:13:13 djm Exp $ */
|
||||
/* $OpenBSD: monitor_mm.c,v 1.18 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
* All rights reserved.
|
||||
@@ -65,7 +65,7 @@ mm_make_entry(struct mm_master *mm, struct mmtree *head,
|
||||
struct mm_share *tmp, *tmp2;
|
||||
|
||||
if (mm->mmalloc == NULL)
|
||||
tmp = xmalloc(sizeof(struct mm_share));
|
||||
tmp = xcalloc(1, sizeof(struct mm_share));
|
||||
else
|
||||
tmp = mm_xmalloc(mm->mmalloc, sizeof(struct mm_share));
|
||||
tmp->address = address;
|
||||
@@ -88,7 +88,7 @@ mm_create(struct mm_master *mmalloc, size_t size)
|
||||
struct mm_master *mm;
|
||||
|
||||
if (mmalloc == NULL)
|
||||
mm = xmalloc(sizeof(struct mm_master));
|
||||
mm = xcalloc(1, sizeof(struct mm_master));
|
||||
else
|
||||
mm = mm_xmalloc(mmalloc, sizeof(struct mm_master));
|
||||
|
||||
@@ -161,6 +161,7 @@ mm_xmalloc(struct mm_master *mm, size_t size)
|
||||
address = mm_malloc(mm, size);
|
||||
if (address == NULL)
|
||||
fatal("%s: mm_malloc(%lu)", __func__, (u_long)size);
|
||||
memset(address, 0, size);
|
||||
return (address);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: monitor_wrap.c,v 1.76 2013/05/17 00:13:13 djm Exp $ */
|
||||
/* $OpenBSD: monitor_wrap.c,v 1.77 2013/11/06 16:52:11 markus Exp $ */
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright 2002 Markus Friedl <markus@openbsd.org>
|
||||
@@ -482,7 +482,7 @@ mm_newkeys_from_blob(u_char *blob, int blen)
|
||||
buffer_init(&b);
|
||||
buffer_append(&b, blob, blen);
|
||||
|
||||
newkey = xmalloc(sizeof(*newkey));
|
||||
newkey = xcalloc(1, sizeof(*newkey));
|
||||
enc = &newkey->enc;
|
||||
mac = &newkey->mac;
|
||||
comp = &newkey->comp;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: packet.c,v 1.188 2013/07/12 00:19:58 djm Exp $ */
|
||||
/* $OpenBSD: packet.c,v 1.189 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@@ -996,7 +996,7 @@ packet_send2(void)
|
||||
(type == SSH2_MSG_SERVICE_REQUEST) ||
|
||||
(type == SSH2_MSG_SERVICE_ACCEPT)) {
|
||||
debug("enqueue packet: %u", type);
|
||||
p = xmalloc(sizeof(*p));
|
||||
p = xcalloc(1, sizeof(*p));
|
||||
p->type = type;
|
||||
memcpy(&p->payload, &active_state->outgoing_packet,
|
||||
sizeof(Buffer));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: schnorr.c,v 1.7 2013/05/17 00:13:14 djm Exp $ */
|
||||
/* $OpenBSD: schnorr.c,v 1.8 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 Damien Miller. All rights reserved.
|
||||
*
|
||||
@@ -549,7 +549,7 @@ modp_group_from_g_and_safe_p(const char *grp_g, const char *grp_p)
|
||||
{
|
||||
struct modp_group *ret;
|
||||
|
||||
ret = xmalloc(sizeof(*ret));
|
||||
ret = xcalloc(1, sizeof(*ret));
|
||||
ret->p = ret->q = ret->g = NULL;
|
||||
if (BN_hex2bn(&ret->p, grp_p) == 0 ||
|
||||
BN_hex2bn(&ret->g, grp_g) == 0)
|
||||
|
||||
+12
-16
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sftp-client.c,v 1.103 2013/08/09 03:39:13 djm Exp $ */
|
||||
/* $OpenBSD: sftp-client.c,v 1.108 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||
*
|
||||
@@ -337,8 +337,7 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests,
|
||||
Buffer msg;
|
||||
struct sftp_conn *ret;
|
||||
|
||||
ret = xcalloc(1, sizeof(*ret));
|
||||
ret->msg_id = 1;
|
||||
ret = xmalloc(sizeof(*ret));
|
||||
ret->fd_in = fd_in;
|
||||
ret->fd_out = fd_out;
|
||||
ret->transfer_buflen = transfer_buflen;
|
||||
@@ -472,7 +471,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
|
||||
|
||||
if (dir) {
|
||||
ents = 0;
|
||||
*dir = xmalloc(sizeof(**dir));
|
||||
*dir = xcalloc(1, sizeof(**dir));
|
||||
(*dir)[0] = NULL;
|
||||
}
|
||||
|
||||
@@ -546,7 +545,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
|
||||
|
||||
if (dir) {
|
||||
*dir = xrealloc(*dir, ents + 2, sizeof(**dir));
|
||||
(*dir)[ents] = xmalloc(sizeof(***dir));
|
||||
(*dir)[ents] = xcalloc(1, sizeof(***dir));
|
||||
(*dir)[ents]->filename = xstrdup(filename);
|
||||
(*dir)[ents]->longname = xstrdup(longname);
|
||||
memcpy(&(*dir)[ents]->a, a, sizeof(*a));
|
||||
@@ -565,7 +564,7 @@ do_lsreaddir(struct sftp_conn *conn, char *path, int printflag,
|
||||
/* Don't return partial matches on interrupt */
|
||||
if (interrupted && dir != NULL && *dir != NULL) {
|
||||
free_sftp_dirents(*dir);
|
||||
*dir = xmalloc(sizeof(**dir));
|
||||
*dir = xcalloc(1, sizeof(**dir));
|
||||
**dir = NULL;
|
||||
}
|
||||
|
||||
@@ -769,18 +768,16 @@ do_realpath(struct sftp_conn *conn, char *path)
|
||||
}
|
||||
|
||||
int
|
||||
do_rename(struct sftp_conn *conn, char *oldpath, char *newpath,
|
||||
int force_legacy)
|
||||
do_rename(struct sftp_conn *conn, char *oldpath, char *newpath)
|
||||
{
|
||||
Buffer msg;
|
||||
u_int status, id;
|
||||
int use_ext = (conn->exts & SFTP_EXT_POSIX_RENAME) && !force_legacy;
|
||||
|
||||
buffer_init(&msg);
|
||||
|
||||
/* Send rename request */
|
||||
id = conn->msg_id++;
|
||||
if (use_ext) {
|
||||
if ((conn->exts & SFTP_EXT_POSIX_RENAME)) {
|
||||
buffer_put_char(&msg, SSH2_FXP_EXTENDED);
|
||||
buffer_put_int(&msg, id);
|
||||
buffer_put_cstring(&msg, "[email protected]");
|
||||
@@ -792,8 +789,8 @@ do_rename(struct sftp_conn *conn, char *oldpath, char *newpath,
|
||||
buffer_put_cstring(&msg, newpath);
|
||||
send_msg(conn, &msg);
|
||||
debug3("Sent message %s \"%s\" -> \"%s\"",
|
||||
use_ext ? "[email protected]" : "SSH2_FXP_RENAME",
|
||||
oldpath, newpath);
|
||||
(conn->exts & SFTP_EXT_POSIX_RENAME) ? "[email protected]" :
|
||||
"SSH2_FXP_RENAME", oldpath, newpath);
|
||||
buffer_free(&msg);
|
||||
|
||||
status = get_status(conn, id);
|
||||
@@ -1108,7 +1105,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
|
||||
(unsigned long long)offset,
|
||||
(unsigned long long)offset + buflen - 1,
|
||||
num_req, max_req);
|
||||
req = xmalloc(sizeof(*req));
|
||||
req = xcalloc(1, sizeof(*req));
|
||||
req->id = conn->msg_id++;
|
||||
req->len = buflen;
|
||||
req->offset = offset;
|
||||
@@ -1222,7 +1219,6 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
|
||||
if (read_error) {
|
||||
error("Couldn't read from remote file \"%s\" : %s",
|
||||
remote_path, fx2txt(status));
|
||||
status = -1;
|
||||
do_close(conn, handle, handle_len);
|
||||
} else if (write_error) {
|
||||
error("Couldn't write to \"%s\": %s", local_path,
|
||||
@@ -1231,7 +1227,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
|
||||
do_close(conn, handle, handle_len);
|
||||
} else {
|
||||
status = do_close(conn, handle, handle_len);
|
||||
if (interrupted || status != SSH2_FX_OK)
|
||||
if (interrupted)
|
||||
status = -1;
|
||||
/* Override umask and utimes if asked */
|
||||
#ifdef HAVE_FCHMOD
|
||||
@@ -1467,7 +1463,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
|
||||
strerror(errno));
|
||||
|
||||
if (len != 0) {
|
||||
ack = xmalloc(sizeof(*ack));
|
||||
ack = xcalloc(1, sizeof(*ack));
|
||||
ack->id = ++id;
|
||||
ack->offset = offset;
|
||||
ack->len = len;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sftp-glob.c,v 1.24 2013/05/17 00:13:14 djm Exp $ */
|
||||
/* $OpenBSD: sftp-glob.c,v 1.25 2013/11/08 00:39:15 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||
*
|
||||
@@ -48,7 +48,7 @@ fudge_opendir(const char *path)
|
||||
{
|
||||
struct SFTP_OPENDIR *r;
|
||||
|
||||
r = xmalloc(sizeof(*r));
|
||||
r = xcalloc(1, sizeof(*r));
|
||||
|
||||
if (do_readdir(cur.conn, (char *)path, &r->dir)) {
|
||||
free(r);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: umac.c,v 1.7 2013/07/22 05:00:17 djm Exp $ */
|
||||
/* $OpenBSD: umac.c,v 1.8 2013/11/08 00:39:15 djm Exp $ */
|
||||
/* -----------------------------------------------------------------------
|
||||
*
|
||||
* umac.c -- C Implementation UMAC Message Authentication
|
||||
@@ -1227,7 +1227,7 @@ struct umac_ctx *umac_new(const u_char key[])
|
||||
size_t bytes_to_add;
|
||||
aes_int_key prf_key;
|
||||
|
||||
octx = ctx = xmalloc(sizeof(*ctx) + ALLOC_BOUNDARY);
|
||||
octx = ctx = xcalloc(1, sizeof(*ctx) + ALLOC_BOUNDARY);
|
||||
if (ctx) {
|
||||
if (ALLOC_BOUNDARY) {
|
||||
bytes_to_add = ALLOC_BOUNDARY -
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* $OpenBSD: version.h,v 1.67 2013/07/25 00:57:37 djm Exp $ */
|
||||
/* $OpenBSD: version.h,v 1.68 2013/11/08 01:38:11 djm Exp $ */
|
||||
|
||||
#define SSH_VERSION "OpenSSH_6.3"
|
||||
#define SSH_VERSION "OpenSSH_6.4"
|
||||
|
||||
#define SSH_PORTABLE "p1"
|
||||
#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
|
||||
|
||||
Reference in New Issue
Block a user