[pywin32-checkins] pywin32/win32/Demos/security explicit_entries.py,1.1,1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2003-10-23 01:36:10
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/security In directory sc8-pr-cvs1:/tmp/cvs-serv10106 Modified Files: explicit_entries.py Log Message: Don't use a hardcoded filename in the tests. Index: explicit_entries.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/security/explicit_entries.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** explicit_entries.py 10 Mar 2003 01:18:15 -0000 1.1 --- explicit_entries.py 23 Oct 2003 00:53:37 -0000 1.2 *************** *** 1,5 **** ! fname=r'h:\tmp.txt' 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,11 ---- ! import os import win32security,win32file,win32api,ntsecuritycon,win32con from security_enums import TRUSTEE_TYPE,TRUSTEE_FORM,ACE_FLAGS,ACCESS_MODE + + fname = os.path.join(win32api.GetTempPath(), "win32security_test.txt") + f=open(fname, "w") + f.write("Hello from Python\n"); + f.close() + print "Testing on file", fname new_privs = ((win32security.LookupPrivilegeValue('',ntsecuritycon.SE_SECURITY_NAME),win32con.SE_PRIVILEGE_ENABLED), |