Update of /cvsroot/pywin32/pywin32/win32/Demos/security
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25938/win32/Demos/security
Modified Files:
Tag: py3k
GetTokenInformation.py list_rights.py security_enums.py
Log Message:
merge lots of fixes from the trunk
Index: GetTokenInformation.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/security/GetTokenInformation.py,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** GetTokenInformation.py 29 Aug 2008 04:59:24 -0000 1.1.2.1
--- GetTokenInformation.py 27 Nov 2008 11:31:05 -0000 1.1.2.2
***************
*** 48,52 ****
print('TokenElevation:', is_elevated)
except pywintypes.error as details:
! if details.args[0] != winerror.ERROR_INVALID_PARAMETER:
raise
return None
--- 48,52 ----
print('TokenElevation:', is_elevated)
except pywintypes.error as details:
! if details.winerror != winerror.ERROR_INVALID_PARAMETER:
raise
return None
Index: list_rights.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/security/list_rights.py,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -C2 -d -r1.1.4.1 -r1.1.4.2
*** list_rights.py 29 Aug 2008 04:59:24 -0000 1.1.4.1
--- list_rights.py 27 Nov 2008 11:31:05 -0000 1.1.4.2
***************
*** 1,4 ****
import win32security,win32file,win32api,ntsecuritycon,win32con
! from .security_enums import TRUSTEE_TYPE,TRUSTEE_FORM,ACE_FLAGS,ACCESS_MODE
new_privs = ((win32security.LookupPrivilegeValue('',ntsecuritycon.SE_SECURITY_NAME),win32con.SE_PRIVILEGE_ENABLED),
--- 1,4 ----
import win32security,win32file,win32api,ntsecuritycon,win32con
! from security_enums import TRUSTEE_TYPE,TRUSTEE_FORM,ACE_FLAGS,ACCESS_MODE
new_privs = ((win32security.LookupPrivilegeValue('',ntsecuritycon.SE_SECURITY_NAME),win32con.SE_PRIVILEGE_ENABLED),
Index: security_enums.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/security/security_enums.py,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** security_enums.py 29 Aug 2008 04:59:24 -0000 1.2.2.1
--- security_enums.py 27 Nov 2008 11:31:05 -0000 1.2.2.2
***************
*** 15,19 ****
const_val=getattr(winnt, const_name)
except AttributeError:
! raise AttributeError('Constant "%s" not found in win32security, ntsecuritycon, or winnt.' %const_name)
setattr(self, const_name, const_val)
--- 15,19 ----
const_val=getattr(winnt, const_name)
except AttributeError:
! raise AttributeError('Constant "%s" not found in win32security, ntsecuritycon, or winnt.' %const_name)
setattr(self, const_name, const_val)
|