[python-win32] problem with PySECURITY_DESCRIPTOR.SetSecurityDescriptorControl

Gareth Walters Gareth.Walters at canberra.edu.au
Wed Mar 9 01:02:34 CET 2005


G'day all,

I am trying to get inheritance enabled/disabled working on some
folders and I cannot work out what I am doing wrong.

I am doing something like this

ALLOW_INHERITANCE=SE_SELF_RELATIVE + SE_DACL_AUTO_INHERITED + 
SE_DACL_PRESENT
DENY_INHERITANCE=SE_SELF_RELATIVE + SE_DACL_PROTECTED + 
SE_DACL_AUTO_INHERITED+SE_DACL_PRESENT

descriptor=GetNamedSecurityInfo("d:\\work\\permcheck\\blah",SE_FILE_OBJECT,DACL_SECURITY_INFORMATION)
descriptor.SetSecurityDescriptorControl(DENY_INHERITANCE,DENY_INHERITANCE)

pywintypes.error: (87, 'SetSecurityDescriptorControl', 'The parameter is 
incorrect.')



I have tried all the combinations of calling the function with differnt 
bitmasks but
I keep getting this error.

What am I doing wrong with this function?

TIA

-- 
---Gareth Walters 



More information about the Python-win32 mailing list