Displaying 1 result from an estimated 1 matches for "peek_u64".
2016 Jun 02
2
[PATCH] Link count attribute extension
...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 ||
(r = sshbuf_put_u32(b, a->mtime)) != 0)
return r;
+ }
+ if (a->flags & SSH2_FILEXFER_ATTR_EXTENDED) {
+ u_int32_t count = 0;
+ if (a->has_nlink) {
+...