Skip to content

Commit 11c01ce

Browse files
author
Pan
committed
Added version and agent auth helper functions. Added Agent and PublicKey extension classes and methods. Implemented more channel methods. Implemented session handshake, authenticated, user auth list and agent init methods. Updated agent auth helper function, added docstrings.
Added session disconnect and sftp shutdown functions. Added TODO for handling reference cycles. Added license files
1 parent e0a5b95 commit 11c01ce

File tree

6 files changed

+17965
-11817
lines changed

6 files changed

+17965
-11817
lines changed

COPYING

Lines changed: 458 additions & 0 deletions
Large diffs are not rendered by default.

LICENSE.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
This library is free software; you can redistribute it and/or
2+
modify it under the terms of the GNU Lesser General Public
3+
License as published by the Free Software Foundation, version 2.1.
4+
5+
This library is distributed in the hope that it will be useful,
6+
but WITHOUT ANY WARRANTY; without even the implied warranty of
7+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8+
Lesser General Public License for more details.
9+
10+
You should have received a copy of the GNU Lesser General Public
11+
License along with this library; if not, write to the Free Software
12+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

ssh2/sftp.pxd

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,23 @@ cdef extern from "libssh2_sftp.h" nogil:
2525
ctypedef struct LIBSSH2_SFTP_HANDLE:
2626
pass
2727
ctypedef struct LIBSSH2_SFTP_ATTRIBUTES:
28-
pass
28+
unsigned long flags
29+
uint64_t filesize
30+
unsigned long uid, gid
31+
unsigned long permissions
32+
unsigned long atime, mtime
2933
ctypedef struct LIBSSH2_SFTP_STATVFS:
30-
pass
34+
uint64_t f_bsize # file system block size
35+
uint64_t f_frsize # fragment size
36+
uint64_t f_blocks # size of fs in f_frsize units
37+
uint64_t f_bfree # free blocks
38+
uint64_t f_bavail # free blocks for non-root
39+
uint64_t f_files # inodes
40+
uint64_t f_ffree # free inodes
41+
uint64_t f_favail # free inodes for non-root
42+
uint64_t f_fsid # file system ID
43+
uint64_t f_flag # mount flags
44+
uint64_t f_namemax # maximum filename length
3145
LIBSSH2_SFTP *libssh2_sftp_init(LIBSSH2_SESSION *session)
3246
int libssh2_sftp_shutdown(LIBSSH2_SFTP *sftp)
3347
unsigned long libssh2_sftp_last_error(LIBSSH2_SFTP *sftp)

0 commit comments

Comments
 (0)