- Timestamp:
- 06/12/11 22:27:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/pyregfi-smoketest.py
r252 r253 222 222 for t in threads: 223 223 t.join() 224 225 226 def loopSecurity(hive, fh): 227 start = hive.root.fetch_security() 228 print(start.descriptor.group) 229 cur = start.next_security() 230 231 while cur != start: 232 print(start.descriptor.group) 233 cur = cur.next_security() 234 224 235 236 def iterSecurity(hive, fh): 237 stat = 0 238 for k in hive: 239 security = k.fetch_security() 240 stat += security.ref_count 241 stat += len(security.descriptor.owner) 242 stat += len(security.descriptor.group) 243 if security.descriptor.sacl: 244 for ace in security.descriptor.sacl: 245 stat += ace.flags 246 if ace.object: 247 stat += ace.object.int 248 if ace.inherited_object: 249 stat += ace.inherited_object.int 250 251 if security.descriptor.dacl: 252 for ace in security.descriptor.dacl: 253 stat += ace.flags 254 if ace.object: 255 stat += ace.object.int 256 if ace.inherited_object: 257 stat += ace.inherited_object.int 258 print(" Security stat: %d" % stat) 225 259 226 260 tests = { … … 233 267 "iterCallbackIO":iterCallbackIO, 234 268 "iterMultithread":iterMultithread, 269 "loopSecurity":loopSecurity, 270 "iterSecurity":iterSecurity, 235 271 } 236 272
Note: See TracChangeset
for help on using the changeset viewer.