[PATCH 1/5] sftp: add missing lsetstat@xxxxxxxxxxx documentation

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



---
 PROTOCOL      | 16 ++++++++++++++++
 sftp-server.c |  1 +
 sftp.1        | 27 ++++++++++++++++++---------
 3 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/PROTOCOL b/PROTOCOL
index ecdacb9dc75e..abb083af3ea0 100644
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -465,6 +465,22 @@ respond with a SSH_FXP_STATUS message.
 This extension is advertised in the SSH_FXP_VERSION hello with version
 "1".
 
+3.7. sftp: Extension request "lsetstat@xxxxxxxxxxx"
+
+This request is like the "setstat" command, but sets file attributes on
+symlinks.  It is implemented as a SSH_FXP_EXTENDED request with the
+following format:
+
+	uint32		id
+	string		"lsetstat@xxxxxxxxxxx"
+	string		path
+	ATTRS		attrs
+
+See the "setstat" command for more details.
+
+This extension is advertised in the SSH_FXP_VERSION hello with version
+"1".
+
 4. Miscellaneous changes
 
 4.1 Public key format
diff --git a/sftp-server.c b/sftp-server.c
index f00f39e64f68..ec3274d24cf5 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -671,6 +671,7 @@ process_init(void)
 	    /* fsync extension */
 	    (r = sshbuf_put_cstring(msg, "fsync@xxxxxxxxxxx")) != 0 ||
 	    (r = sshbuf_put_cstring(msg, "1")) != 0 || /* version */
+	    /* lsetstat extension */
 	    (r = sshbuf_put_cstring(msg, "lsetstat@xxxxxxxxxxx")) != 0 ||
 	    (r = sshbuf_put_cstring(msg, "1")) != 0) /* version */
 		fatal_fr(r, "compose");
diff --git a/sftp.1 b/sftp.1
index 1cfa5ec229e3..e9eec7feffa4 100644
--- a/sftp.1
+++ b/sftp.1
@@ -348,15 +348,18 @@ Change group of file
 .Ar path
 to
 .Ar grp .
-If the
-.Fl h
-flag is specified, then symlinks will not be followed.
 .Ar path
 may contain
 .Xr glob 7
 characters and may match multiple files.
 .Ar grp
 must be a numeric GID.
+.Pp
+If the
+.Fl h
+flag is specified, then symlinks will not be followed.
+Note that this is only supported by servers that implement
+the "lsetstat@xxxxxxxxxxx" extension.
 .It Xo Ic chmod
 .Op Fl h
 .Ar mode
@@ -366,13 +369,16 @@ Change permissions of file
 .Ar path
 to
 .Ar mode .
-If the
-.Fl h
-flag is specified, then symlinks will not be followed.
 .Ar path
 may contain
 .Xr glob 7
 characters and may match multiple files.
+.Pp
+If the
+.Fl h
+flag is specified, then symlinks will not be followed.
+Note that this is only supported by servers that implement
+the "lsetstat@xxxxxxxxxxx" extension.
 .It Xo Ic chown
 .Op Fl h
 .Ar own
@@ -382,15 +388,18 @@ Change owner of file
 .Ar path
 to
 .Ar own .
-If the
-.Fl h
-flag is specified, then symlinks will not be followed.
 .Ar path
 may contain
 .Xr glob 7
 characters and may match multiple files.
 .Ar own
 must be a numeric UID.
+.Pp
+If the
+.Fl h
+flag is specified, then symlinks will not be followed.
+Note that this is only supported by servers that implement
+the "lsetstat@xxxxxxxxxxx" extension.
 .It Xo Ic df
 .Op Fl hi
 .Op Ar path
-- 
2.28.0

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux