99 references to Utils
System.DirectoryServices.AccountManagement (99)
System\DirectoryServices\AccountManagement\AccountInfo.cs (1)
384return !Utils.AreBytesEqual(_permittedLogonTimes, _permittedLogonTimesOriginal);
System\DirectoryServices\AccountManagement\AD\ADDNLinkedAttrSet.cs (6)
600SidType sidType = Utils.ClassifySID(sid); 614Utils.ByteArrayToString(sid)); 621Utils.ByteArrayToString(sid)); 672byte[] sid = Utils.ConvertNativeSidToByteArray(foreignSid.pSid); 689SidType sidType = Utils.ClassifySID(foreignSid.pSid); 709(new SecurityIdentifier(Utils.ConvertNativeSidToByteArray(_foreignMembersToReturn[0].pSid), 0)).ToString(),
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (15)
633Utils.ClearBit(ref uacValue, 0x2); // UF_ACCOUNTDISABLE 642Utils.SetBit(ref uacValue, 0x2); // UF_ACCOUNTDISABLE 1440string stringSid = Utils.SecurityIdentifierToLdapHexFilterString(Sid); 1542string sddlSid = Utils.ConvertSidToSDDL(userSid); 1557groupSid = Utils.ConvertNativeSidToByteArray((IntPtr)pGroupSid); 1570return "<SID=" + Utils.ByteArrayToString(groupSid) + ">"; 1704int groupRid = Utils.GetLastRidFromSid(groupSid); 1818string stringSid = Utils.SecurityIdentifierToLdapHexFilterString(Sid); 1997int groupRid = Utils.GetLastRidFromSid(groupSid); 2069SidType sidType = Utils.ClassifySID(sid); 2079Utils.ByteArrayToString(sid)); 2104int err = Utils.LookupSid(serverName, this.credentials, sid, out name, out domainName, out accountUsage); 2214Utils.ByteArrayToString(sid), 2218Principal p = Utils.ConstructFakePrincipalFromSID( 2482UnsafeNativeMethods.DomainControllerInfo info = Utils.GetDcName(null, dnsDomainName, null, flags);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (14)
527pSid = Utils.ConvertByteArrayToIntPtr(sidb); 529if (Interop.Advapi32.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject)) 582pSid = Utils.ConvertByteArrayToIntPtr(sidb); 584if (Interop.Advapi32.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject)) 1434Utils.ClearBit(ref groupTypeCombined, 0x80000000); // disabled --> clear GROUP_TYPE_SECURITY_ENABLED 1436Utils.SetBit(ref groupTypeCombined, 0x80000000); // enabled --> set GROUP_TYPE_SECURITY_ENABLED 1445Utils.ClearBit(ref groupTypeCombined, ADGroupScope.Local); 1446Utils.ClearBit(ref groupTypeCombined, ADGroupScope.Global); 1447Utils.ClearBit(ref groupTypeCombined, ADGroupScope.Universal); 1452Utils.SetBit(ref groupTypeCombined, ADGroupScope.Local); 1456Utils.SetBit(ref groupTypeCombined, ADGroupScope.Global); 1461Utils.SetBit(ref groupTypeCombined, ADGroupScope.Universal); 1654return @"<SID=" + Utils.SecurityIdentifierToLdapHexBindingString(Sid) + ">"; 1675return @"<SID=" + Utils.ByteArrayToString(sid) + ">";
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (1)
506sidB = Utils.ConvertNativeSidToByteArray((IntPtr)pSid);
System\DirectoryServices\AccountManagement\AD\ADStoreKey.cs (2)
51Utils.ByteArrayToString(sid)); 72(Utils.AreBytesEqual(_sid, that._sid)))
System\DirectoryServices\AccountManagement\AD\ADUtils.cs (1)
508if (Utils.AreBytesEqual(wellKnownContainerGuid, (byte[])value.BinaryValue))
System\DirectoryServices\AccountManagement\AD\SDSCache.cs (2)
54userName = Utils.GetNT4UserName(); 72UnsafeNativeMethods.DomainControllerInfo info = Utils.GetDcName(null, contextName, null, flags);
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (2)
760Utils.SetBit(ref uacValue, bitmask); 762Utils.ClearBit(ref uacValue, bitmask);
System\DirectoryServices\AccountManagement\AD\SidList.cs (3)
30pSids[i] = Utils.ConvertByteArrayToIntPtr(sidListByteFormat[i]); 37Utils.BeginImpersonation(credentials, out hUser); 45Utils.EndImpersonation(hUser);
System\DirectoryServices\AccountManagement\AD\TokenGroupsSet.cs (1)
54string SidBindingString = $"<SID={Utils.SecurityIdentifierToLdapHexBindingString(_currentSID)}>";
System\DirectoryServices\AccountManagement\AuthZSet.cs (13)
28Utils.ByteArrayToString(userSid), 56_psMachineSid = new SafeMemoryPtr(Utils.GetMachineDomainSid()); 57_psUserSid = new SafeMemoryPtr(Utils.ConvertByteArrayToIntPtr(userSid)); 235byte[] sid = Utils.ConvertNativeSidToByteArray(pSid); 247SecurityIdentifier sidObj = new SecurityIdentifier(Utils.ConvertSidToSDDL(sid)); 256SidType sidType = Utils.ClassifySID(pSid); 261GlobalDebug.WriteLineIf(GlobalDebug.Info, "AuthZSet", "CurrentAsPrincipal: fake principal {0}", Utils.ByteArrayToString(sid)); 271GlobalDebug.WriteLineIf(GlobalDebug.Info, "AuthZSet", "CurrentAsPrincipal: builtin principal {0}", Utils.ByteArrayToString(sid)); 277GlobalDebug.WriteLineIf(GlobalDebug.Info, "AuthZSet", "CurrentAsPrincipal: real principal {0}", Utils.ByteArrayToString(sid)); 337_localMachineIsDC = (bool?)Utils.IsMachineDC(null); 363!string.Equals(Utils.GetComputerFlatName(), sidIssuerName, StringComparison.OrdinalIgnoreCase)); 422if (Utils.ClassifySID(pSid) == SidType.RealObject && Interop.Advapi32.EqualDomainSid(_psUserSid.DangerousGetHandle(), pSid, ref sameDomain)) 426int lastRid = Utils.GetLastRidFromSid(pSid);
System\DirectoryServices\AccountManagement\Context.cs (3)
627string hostname = _name ?? Utils.GetComputerFlatName(); 850if (Utils.AreBytesEqual(USERS_CONTAINER_GUID, (byte[])value.BinaryValue)) 862if (Utils.AreBytesEqual(COMPUTERS_CONTAINER_GUID, (byte[])value.BinaryValue))
System\DirectoryServices\AccountManagement\SAM\SAMMembersSet.cs (7)
112SidType sidType = Utils.ClassifySID(sid); 115GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMMembersSet", "MoveNextLocal: fake principal, sid={0}", Utils.ByteArrayToString(sid)); 386SidType sidType = Utils.ClassifySID(sid); 394Utils.ByteArrayToString(sid)); 404int err = Utils.LookupSid( 417Utils.ByteArrayToString(sid), 431Utils.ByteArrayToString(sid),
System\DirectoryServices\AccountManagement\SAM\SAMQuerySet.cs (4)
498byte[] sidToMatch = Utils.StringToByteArray((string)filter.Value); 505return Utils.AreBytesEqual(sidToMatch, (byte[])de.Properties["objectSid"].Value); 611if ((value != null) && Utils.AreBytesEqual(value, valueToMatch)) 847if (Utils.AreBytesEqual(memberSid, _memberSidToMatch))
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (4)
257GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMStoreCtx", "Insert: new SID is ", Utils.ByteArrayToString((byte[])de.Properties["objectSid"].Value)); 831int err = Utils.LookupSid(this.MachineUserSuppliedName, _credentials, sid, out name, out domainName, out accountUsage); 918Utils.ByteArrayToString(sid), 921Principal p = Utils.ConstructFakePrincipalFromSID(
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (8)
354pSid = Utils.ConvertByteArrayToIntPtr(sid); 356if (Interop.Advapi32.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject)) 419pSid = Utils.ConvertByteArrayToIntPtr(sid); 421if (Interop.Advapi32.IsValidSid(pSid) && (Utils.ClassifySID(pSid) == SidType.FakeObject)) 426Utils.ByteArrayToString(sid)); 489int err = Utils.LookupSid(this.MachineUserSuppliedName, _credentials, sid, out name, out domainName, out _); 504if (Utils.ClassifySID(sid) == SidType.RealObjectFakeDomain) 784string sddlSid = Utils.ConvertSidToSDDL(sid);
System\DirectoryServices\AccountManagement\SAM\SAMStoreKey.cs (2)
31Utils.ByteArrayToString(sid)); 44return Utils.AreBytesEqual(_sid, that._sid);
System\DirectoryServices\AccountManagement\UnknownPrincipal.cs (1)
42SecurityIdentifier sidObj = new SecurityIdentifier(Utils.ConvertSidToSDDL(sid));
System\DirectoryServices\AccountManagement\User.cs (3)
179if (Utils.IsSamUser()) 199pSid = Utils.GetCurrentUserSid(); 200byte[] sid = Utils.ConvertNativeSidToByteArray(pSid);
System\DirectoryServices\AccountManagement\Utils.cs (6)
261pSid = Utils.ConvertByteArrayToIntPtr(sid); 601Utils.BeginImpersonation(credentials, out hUser); 644Utils.EndImpersonation(hUser); 660Utils.ByteArrayToString(sid), 673int err = Utils.LookupSid(serverName, credentials, sid, out name, out domainName, out accountUsage); 707SecurityIdentifier sidObj = new SecurityIdentifier(Utils.ConvertSidToSDDL(sid));