Displaying 4 results from an estimated 4 matches for "ssh2_fxf_creat".
2013 Oct 14
0
[PATCH-resend] Implement SSH2_FXF_APPEND
...rver.c
--- sftp-server.c 1 Jun 2013 21:31:19 -0000 1.114
+++ sftp-server.c 30 Sep 2013 08:16:57 -0000
@@ -130,6 +130,8 @@ flags_from_portable(int pflags)
} else if (pflags & SSH2_FXF_WRITE) {
flags = O_WRONLY;
}
+ if (pflags & SSH2_FXF_APPEND)
+ flags |= O_APPEND;
if (pflags & SSH2_FXF_CREAT)
flags |= O_CREAT;
if (pflags & SSH2_FXF_TRUNC)
@@ -156,6 +158,8 @@ string_from_portable(int pflags)
PAPPEND("READ")
if (pflags & SSH2_FXF_WRITE)
PAPPEND("WRITE")
+ if (pflags & SSH2_FXF_APPEND)
+ PAPPEND("APPEND")
if (pflags & SSH2_FXF_...
2001 Jun 20
1
SFTP Logging Redux.
...oid
+sflags_from_portable(char *psflags, int pflags)
+{
+ if (pflags & SSH2_FXF_READ)
+ *psflags = 'r';
+ psflags++;
+ if (pflags & SSH2_FXF_WRITE)
+ *psflags = 'w';
+ psflags++;
+ if (pflags & SSH2_FXF_APPEND)
+ *psflags = 'a';
+ psflags++;
+ if (pflags & SSH2_FXF_CREAT)
+ *psflags = 'c';
+ psflags++;
+ if (pflags & SSH2_FXF_TRUNC)
+ *psflags = 't';
+ psflags++;
+ if (pflags & SSH2_FXF_EXCL)
+ *psflags = 'e';
+}
+
Attrib *
get_attrib(void)
{
@@ -370,6 +398,7 @@
version = buffer_get_int(&iqueue);
TRACE("client ve...
2003 Oct 30
2
sftp client reget reput
...t handle_len, id, type;
@@ -1023,6 +1049,13 @@
buffer_put_char(&msg, SSH2_FXP_OPEN);
buffer_put_int(&msg, id);
buffer_put_cstring(&msg, remote_path);
+
+#ifdef REGET
+ if(rflag)
+ buffer_put_int(&msg, SSH2_FXF_WRITE);
+ else
+#endif
+
buffer_put_int(&msg, SSH2_FXF_WRITE|SSH2_FXF_CREAT|SSH2_FXF_TRUNC);
encode_attrib(&msg, &a);
send_msg(conn->fd_out, &msg);
@@ -1041,7 +1074,44 @@
data = xmalloc(conn->transfer_buflen);
/* Read from local and write to remote */
+#ifdef REGET
+ if(rflag) {
+ Attrib *attrs;
+ if (!(attrs = do_fstat(conn, handle, handle_le...
2002 Mar 15
4
PATCH: sftp-server logging.
..._from_portable(char *psflags, int pflags)
+ {
+ if (pflags & SSH2_FXF_READ)
+ *psflags = 'r';
+ psflags++;
+ if (pflags & SSH2_FXF_WRITE)
+ *psflags = 'w';
+ psflags++;
+ if (pflags & SSH2_FXF_APPEND)
+ *psflags = 'a';
+ psflags++;
+ if (pflags & SSH2_FXF_CREAT)
+ *psflags = 'c';
+ psflags++;
+ if (pflags & SSH2_FXF_TRUNC)
+ *psflags = 't';
+ psflags++;
+ if (pflags & SSH2_FXF_EXCL)
+ *psflags = 'e';
+ return;
+ }
+ #endif
+
static Attrib *
get_attrib(void)
{
***************
*** 370,375 ****
--- 423,431 --...