Пример #1
0
func (self *SecurityPolicy) RemoveAllAccountRights(sid SecurityID) error {
	status := wrappers.LsaRemoveAccountRights(self.handle, sid.sid, true, nil, 0)
	if err := wrappers.LsaNtStatusToWinError(status); err != nil {
		return err
	}
	return nil
}
Пример #2
0
func (self *SecurityPolicy) RemoveAccountRight(sid SecurityID, right AccountRightName) error {
	var rightString wrappers.UNICODE_STRING
	wrappers.RtlInitUnicodeString(&rightString, syscall.StringToUTF16Ptr(string(right)))
	status := wrappers.LsaRemoveAccountRights(self.handle, sid.sid, false, &rightString, 1)
	if err := wrappers.LsaNtStatusToWinError(status); err != nil {
		return err
	}
	return nil
}