Bugzilla – Attachment 1394 Details for
Bug 1400
add atomic rename extension to sftp-server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] add atomic rename extension to sftp-server
sftp-server-posix-rename.patch (text/plain), 1.10 KB, created by
Miklos Szeredi
on 2007-12-11 08:03:45 AEDT
(
hide
)
Description:
[PATCH] add atomic rename extension to sftp-server
Filename:
MIME Type:
Creator:
Miklos Szeredi
Created:
2007-12-11 08:03:45 AEDT
Size:
1.10 KB
patch
obsolete
>Index: ssh/sftp-server.c >=================================================================== >--- ssh.orig/sftp-server.c 2007-12-07 12:36:10.000000000 +0100 >+++ ssh/sftp-server.c 2007-12-10 21:55:47.000000000 +0100 >@@ -1095,6 +1095,23 @@ process_extended_statfs(u_int32_t id) > } > > static void >+process_extended_posix_rename(u_int32_t id) >+{ >+ char *oldpath, *newpath; >+ >+ oldpath = get_string(NULL); >+ newpath = get_string(NULL); >+ debug3("request %u: posix-rename", id); >+ logit("posix-rename old \"%s\" new \"%s\"", oldpath, newpath); >+ if (rename(oldpath, newpath) == -1) >+ send_status(id, errno_to_portable(errno)); >+ else >+ send_status(id, SSH2_FX_OK); >+ xfree(oldpath); >+ xfree(newpath); >+} >+ >+static void > process_extended(void) > { > u_int32_t id; >@@ -1104,6 +1121,8 @@ process_extended(void) > request = get_string(NULL); > if (strcmp(request, "statfs@openssh.org") == 0) > process_extended_statfs(id); >+ if (strcmp(request, "posix-rename@openssh.org") == 0) >+ process_extended_posix_rename(id); > else > send_status(id, SSH2_FX_OP_UNSUPPORTED); /* MUST */ > xfree(request);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1400
:
1394
|
1456