Exemple #1
0
 internal LsaTrustedDomainInformation(TRUSTED_DOMAIN_INFORMATION_EX info)
 {
     Name            = info.Name.ToString();
     FlatName        = info.FlatName.ToString();
     Sid             = new Sid(info.Sid);
     TrustDirection  = info.TrustDirection;
     TrustType       = info.TrustType;
     TrustAttributes = info.TrustAttributes;
 }
Exemple #2
0
        public void LsaCreateTrustedDomainExTest()
        {
            var tdi = new TRUSTED_DOMAIN_INFORMATION_EX
            {
                Name            = new SafeLSA_UNICODE_STRING("MINE"),
                Sid             = pSid,
                TrustType       = TrustType.TRUST_TYPE_MIT,
                TrustAttributes = TrustAttributes.TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL,
                TrustDirection  = TrustDirection.TRUST_DIRECTION_DISABLED
            };
            var tdai = new TRUSTED_DOMAIN_AUTH_INFORMATION {
            };

            Assert.That(LsaCreateTrustedDomainEx(hPol, tdi, tdai, ACCESS_MASK.GENERIC_ALL, out var hDom), ResultIs.Failure);
        }