View | Details | Raw Unified | Return to bug 1400 | Differences between
and this patch

Collapse All | Expand All

(-)ssh.orig/sftp-server.c (+19 lines)
Lines 1095-1100 process_extended_statfs(u_int32_t id) Link Here
1095
}
1095
}
1096
1096
1097
static void
1097
static void
1098
process_extended_posix_rename(u_int32_t id)
1099
{
1100
	char *oldpath, *newpath;
1101
1102
	oldpath = get_string(NULL);
1103
	newpath = get_string(NULL);
1104
	debug3("request %u: posix-rename", id);
1105
	logit("posix-rename old \"%s\" new \"%s\"", oldpath, newpath);
1106
        if (rename(oldpath, newpath) == -1)
1107
            send_status(id, errno_to_portable(errno));
1108
        else
1109
            send_status(id, SSH2_FX_OK);
1110
	xfree(oldpath);
1111
	xfree(newpath);
1112
}
1113
1114
static void
1098
process_extended(void)
1115
process_extended(void)
1099
{
1116
{
1100
	u_int32_t id;
1117
	u_int32_t id;
Lines 1104-1109 process_extended(void) Link Here
1104
	request = get_string(NULL);
1121
	request = get_string(NULL);
1105
	if (strcmp(request, "statfs@openssh.org") == 0)
1122
	if (strcmp(request, "statfs@openssh.org") == 0)
1106
		process_extended_statfs(id);
1123
		process_extended_statfs(id);
1124
	if (strcmp(request, "posix-rename@openssh.org") == 0)
1125
		process_extended_posix_rename(id);
1107
	else
1126
	else
1108
		send_status(id, SSH2_FX_OP_UNSUPPORTED);	/* MUST */
1127
		send_status(id, SSH2_FX_OP_UNSUPPORTED);	/* MUST */
1109
	xfree(request);
1128
	xfree(request);

Return to bug 1400