Displaying 1 result from an estimated 1 matches for "sftp_ext_attr_link_count".
2016 Jun 02
2
[PATCH] Link count attribute extension
...gs & SSH2_FILEXFER_ATTR_EXTENDED) {
+ if (a->has_nlink) {
+ st->st_nlink = a->nlink;
+ }
+ }
}
/* Decode attributes in buffer */
@@ -138,6 +148,15 @@
return r;
debug3("Got file attribute \"%.100s\" len %zu",
type, dlen);
+ if (strcmp(type, SFTP_EXT_ATTR_LINK_COUNT) == 0) {
+ if (dlen < 8) {
+ return SSH_ERR_MESSAGE_INCOMPLETE;
+ free(type);
+ free(data);
+ }
+ a->has_nlink = 1;
+ a->nlink = PEEK_U64(data);
+ }
free(type);
free(data);
}
@@ -170,6 +189,24 @@
if ((r = sshbuf_put_u32(b, a->atime)) != 0 ||...