From 39d6ef884a6b66e8fb1773fe01e361703224ab73 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 23 Feb 2010 22:50:43 +0100 Subject: Added owner and group information in sftp attributes. Parse the longname which is the output of 'ls -l' and set the owner and group if we are talking to an openssh server. --- include/libssh/sftp.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/libssh') diff --git a/include/libssh/sftp.h b/include/libssh/sftp.h index 5d53f861..a42c76e1 100644 --- a/include/libssh/sftp.h +++ b/include/libssh/sftp.h @@ -149,17 +149,16 @@ struct sftp_status_message_struct { char *langmsg; }; -/* don't worry much of these aren't really used */ struct sftp_attributes_struct { char *name; - char *longname; /* some weird stuff */ + char *longname; /* ls -l output on openssh, not reliable else */ uint32_t flags; uint8_t type; uint64_t size; uint32_t uid; uint32_t gid; - char *owner; - char *group; + char *owner; /* set if openssh and version 4 */ + char *group; /* set if openssh and version 4 */ uint32_t permissions; uint64_t atime64; uint32_t atime; -- cgit