Skip to content

Commit

Permalink
Sftp attrs (#124)
Browse files Browse the repository at this point in the history
* Minor fixes for kdb int
* Added SFTP attribute flags. Updated sftp tests - resolves #119
* Updated change log
  • Loading branch information
pkittenis authored Oct 24, 2020
1 parent 9b8b5b3 commit c0e6b67
Show file tree
Hide file tree
Showing 43 changed files with 1,491 additions and 1,334 deletions.
16 changes: 15 additions & 1 deletion Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Change Log
=============

0.23.0
++++++

Changes
-------

* Added ``ssh2.sftp.LIBSSH2_SFTP_ATTR_*`` constants for checking and setting SFTP attributes.

Fixes
-----

* ``Session.userauth_keyboardinteractive`` would cause segmentation fault.


0.20.0
++++++

Expand All @@ -23,7 +37,7 @@ Changes
Fixes
------

* Session.userauth_publickey_frommemory would not work without an empty publickey provided - #86
* ``Session.userauth_publickey_frommemory`` would not work without an empty passphrase provided - #86

Packaging
----------
Expand Down
4 changes: 2 additions & 2 deletions ssh2/agent.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ssh2/agent.pxd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
8 changes: 4 additions & 4 deletions ssh2/agent.pyx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
15 changes: 11 additions & 4 deletions ssh2/c_sftp.pxd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down Expand Up @@ -79,6 +79,13 @@ cdef extern from "libssh2_sftp.h" nogil:
LIBSSH2_SFTP_S_IROTH # R for other
LIBSSH2_SFTP_S_IWOTH # W for other
LIBSSH2_SFTP_S_IXOTH # X for other
# SFTP attributes
enum:
LIBSSH2_SFTP_ATTR_SIZE
LIBSSH2_SFTP_ATTR_UIDGID
LIBSSH2_SFTP_ATTR_PERMISSIONS
LIBSSH2_SFTP_ATTR_ACMODTIME
LIBSSH2_SFTP_ATTR_EXTENDED
int LIBSSH2_SFTP_S_ISLNK(unsigned long m)
int LIBSSH2_SFTP_S_ISREG(unsigned long m)
int LIBSSH2_SFTP_S_ISDIR(unsigned long m)
Expand Down
8 changes: 4 additions & 4 deletions ssh2/c_ssh2.pxd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
4 changes: 2 additions & 2 deletions ssh2/channel.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ssh2/channel.pxd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
8 changes: 4 additions & 4 deletions ssh2/channel.pyx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
4 changes: 2 additions & 2 deletions ssh2/error_codes.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ssh2/error_codes.pxd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
8 changes: 4 additions & 4 deletions ssh2/error_codes.pyx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
4 changes: 2 additions & 2 deletions ssh2/exceptions.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ssh2/exceptions.pyx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017-2018 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
6 changes: 3 additions & 3 deletions ssh2/fileinfo.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions ssh2/fileinfo.pxd
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# This file is part of ssh2-python.
# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

cimport c_ssh2

IF EMBEDDED_LIB:
Expand Down
8 changes: 4 additions & 4 deletions ssh2/fileinfo.pyx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
4 changes: 2 additions & 2 deletions ssh2/knownhost.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ssh2/knownhost.pxd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
8 changes: 4 additions & 4 deletions ssh2/knownhost.pyx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis

# Copyright (C) 2017-2020 Panos Kittenis
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.

#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.

#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Expand Down
4 changes: 2 additions & 2 deletions ssh2/listener.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c0e6b67

Please sign in to comment.