Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
paramiko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Python
Modules
paramiko
Commits
4ec300e11e5f
Commit
4ec300e11e5f
authored
11 years ago
by
Jeff Forcier
Browse files
Options
Downloads
Plain Diff
Merge branch '1.11' into 1.12
Conflicts: NEWS
parents
034a53cab5df
45eebb7ea9ae
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS
+21
-0
21 additions, 0 deletions
NEWS
paramiko/_winapi.py
+12
-7
12 additions, 7 deletions
paramiko/_winapi.py
paramiko/win_pageant.py
+17
-7
17 additions, 7 deletions
paramiko/win_pageant.py
with
50 additions
and
14 deletions
NEWS
+
21
−
0
View file @
4ec300e1
...
...
@@ -12,6 +12,27 @@
Releases
========
v1.12.2 (21st Jan 2014)
-----------------------
* #193 (and its attentant PRs #230 & #253): Fix SSH agent problems present on
Windows. Thanks to David Hobbs for initial report and to Aarni Koskela & Olle
Lundberg for the patches.
v1.11.4 (21st Jan 2014)
-----------------------
* #193 (and its attentant PRs #230 & #253): Fix SSH agent problems present on
Windows. Thanks to David Hobbs for initial report and to Aarni Koskela & Olle
Lundberg for the patches.
v1.10.6 (21st Jan 2014)
-----------------------
* #193 (and its attentant PRs #230 & #253): Fix SSH agent problems present on
Windows. Thanks to David Hobbs for initial report and to Aarni Koskela & Olle
Lundberg for the patches.
v1.12.1 (8th Jan 2014)
----------------------
...
...
This diff is collapsed.
Click to expand it.
paramiko/_winapi.py
+
12
−
7
View file @
4ec300e1
...
...
@@ -10,6 +10,11 @@
import
ctypes.wintypes
import
__builtin__
try
:
USHORT
=
ctypes
.
wintypes
.
USHORT
except
AttributeError
:
USHORT
=
ctypes
.
c_ushort
######################
# jaraco.windows.error
...
...
@@ -81,9 +86,6 @@
raise
WindowsError
()
#####################
# jaraco.windows.mmap
CreateFileMapping
=
ctypes
.
windll
.
kernel32
.
CreateFileMappingW
CreateFileMapping
.
argtypes
=
[
ctypes
.
wintypes
.
HANDLE
,
...
...
@@ -130,11 +132,14 @@
self
.
pos
=
pos
def
write
(
self
,
msg
):
ctypes
.
windll
.
msvcrt
.
memcpy
(
self
.
view
+
self
.
pos
,
msg
,
len
(
msg
))
self
.
pos
+=
len
(
msg
)
n
=
len
(
msg
)
if
self
.
pos
+
n
>=
self
.
length
:
# A little safety.
raise
ValueError
(
"
Refusing to write %d bytes
"
%
n
)
ctypes
.
windll
.
kernel32
.
RtlMoveMemory
(
self
.
view
+
self
.
pos
,
msg
,
n
)
self
.
pos
+=
n
def
read
(
self
,
n
):
"""
Read n bytes from mapped view.
"""
out
=
ctypes
.
create_string_buffer
(
n
)
...
...
@@ -135,10 +140,10 @@
def
read
(
self
,
n
):
"""
Read n bytes from mapped view.
"""
out
=
ctypes
.
create_string_buffer
(
n
)
ctypes
.
windll
.
msvcrt
.
memcp
y
(
out
,
self
.
view
+
self
.
pos
,
n
)
ctypes
.
windll
.
kernel32
.
RtlMoveMemor
y
(
out
,
self
.
view
+
self
.
pos
,
n
)
self
.
pos
+=
n
return
out
.
raw
...
...
@@ -173,7 +178,7 @@
PACL Dacl;
} SECURITY_DESCRIPTOR;
"""
SECURITY_DESCRIPTOR_CONTROL
=
ctypes
.
wintypes
.
USHORT
SECURITY_DESCRIPTOR_CONTROL
=
USHORT
REVISION
=
1
_fields_
=
[
...
...
This diff is collapsed.
Click to expand it.
paramiko/win_pageant.py
+
17
−
7
View file @
4ec300e1
...
...
@@ -23,4 +23,7 @@
from
__future__
import
with_statement
import
array
import
ctypes.wintypes
import
platform
import
struct
...
...
@@ -26,8 +29,9 @@
import
struct
import
threading
import
array
import
platform
import
ctypes.wintypes
try
:
import
_thread
as
thread
# Python 3.x
except
ImportError
:
import
thread
# Python 2.5-2.7
from
.
import
_winapi
...
...
@@ -31,6 +35,7 @@
from
.
import
_winapi
_AGENT_COPYDATA_ID
=
0x804e50ba
_AGENT_MAX_MSGLEN
=
8192
# Note: The WM_COPYDATA value is pulled from win32con, as a workaround
...
...
@@ -51,4 +56,5 @@
"""
return
bool
(
_get_pageant_window_object
())
ULONG_PTR
=
ctypes
.
c_uint64
if
platform
.
architecture
()[
0
]
==
'
64bit
'
else
ctypes
.
c_uint32
...
...
@@ -54,4 +60,6 @@
ULONG_PTR
=
ctypes
.
c_uint64
if
platform
.
architecture
()[
0
]
==
'
64bit
'
else
ctypes
.
c_uint32
class
COPYDATASTRUCT
(
ctypes
.
Structure
):
"""
ctypes implementation of
...
...
@@ -63,6 +71,7 @@
(
'
data_loc
'
,
ctypes
.
c_void_p
),
]
def
_query_pageant
(
msg
):
"""
Communication with the Pageant process is done through a shared
...
...
@@ -74,7 +83,7 @@
return
None
# create a name for the mmap
map_name
=
'
PageantRequest%08x
'
%
thread
ing
.
current_thread
().
ident
map_name
=
'
PageantRequest%08x
'
%
thread
.
get_
ident
()
pymap
=
_winapi
.
MemoryMap
(
map_name
,
_AGENT_MAX_MSGLEN
,
_winapi
.
get_security_attributes_for_user
(),
...
...
@@ -98,6 +107,7 @@
return
datalen
+
pymap
.
read
(
retlen
)
return
None
class
PageantConnection
(
object
):
"""
Mock
"
connection
"
to an agent which roughly approximates the behavior of
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment