(self, sd)
| 489 | |
| 490 | |
| 491 | def set_security_descriptor(self, sd): |
| 492 | if isinstance(sd, basestring): |
| 493 | sd = security.SecurityDescriptor.from_string(sd) |
| 494 | open_flags = gdef.WRITE_OWNER | gdef.WRITE_DAC |
| 495 | if (sd.sacl and |
| 496 | any(ace.Header.AceType != gdef.SYSTEM_MANDATORY_LABEL_ACE_TYPE for ace in sd.sacl)): |
| 497 | # Print error if requested but no SecurityPrivilege ? |
| 498 | open_flags |= gdef.ACCESS_SYSTEM_SECURITY |
| 499 | tmp_handle = windows.winproxy.OpenProcess(open_flags, 0, self.pid) |
| 500 | try: |
| 501 | sd._apply_to_handle_and_type(tmp_handle, gdef.SE_KERNEL_OBJECT) |
| 502 | finally: |
| 503 | windows.winproxy.CloseHandle(tmp_handle) |
| 504 | |
| 505 | security_descriptor = property(get_security_descriptor, set_security_descriptor) |
| 506 |
nothing calls this directly
no test coverage detected