[python-win32] Problems retrieving SACL of registry key from remote machine

Eli Sandler Eli.Sandler at vanadium-soft.com
Thu Dec 24 08:26:55 CET 2009


Hi, I have a problem retrieving SACL of a registry key from a remote machine.

It fails with the exception: (14, 'RegGetKeySecurity', 'Not enough storage is available to complete this operation.')

 

Here is the code snippet:

 

logon_type = win32security.LOGON32_LOGON_INTERACTIVE

default_provider = win32security.LOGON32_PROVIDER_DEFAULT

handle = win32security.LogonUser(user, domain, password, logon_type, default_provider)

win32security.ImpersonateLoggedOnUser(handle)

regHandle = win32api.RegConnectRegistry(ip, hive_const)

keyHandle = win32api.RegOpenKey(regHandle, key)

sd = win32api.RegGetKeySecurity(keyHandle, win32security.SACL_SECURITY_INFORMATION)

 

Any help will be appreciated.

 

--

Eliyahu Sandler

Software Engineer

Vanadium Software Ltd.

www.vanadium-soft.com <http://www.vanadium-soft.com/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20091224/b24af4f4/attachment.htm>


More information about the python-win32 mailing list