Пример #1
0
        /// <summary>
        /// Create a remote AuthZ resource manager from a raw binding string.
        /// </summary>
        /// <param name="server">The address of the server.</param>
        /// <param name="server_spn">The SPN for the server.</param>
        /// <param name="type">Specify the type of </param>
        /// <param name="throw_on_error">True to throw on error.</param>
        /// <returns>The created AuthZ resource manager.</returns>
        public static NtResult <AuthZResourceManager> Create(string server, string server_spn, AuthZResourceManagerRemoteServiceType type, bool throw_on_error)
        {
            AUTHZ_RPC_INIT_INFO_CLIENT client_info = new AUTHZ_RPC_INIT_INFO_CLIENT
            {
                version     = AUTHZ_RPC_INIT_INFO_CLIENT.AUTHZ_RPC_INIT_INFO_CLIENT_VERSION_V1,
                ProtSeq     = "ncacn_ip_tcp",
                Options     = null,
                NetworkAddr = server,
                Endpoint    = null,
                ObjectUuid  = type == AuthZResourceManagerRemoteServiceType.Default ?
                              "5fc860e0-6f6e-4fc2-83cd-46324f25e90b" : "9a81c2bd-a525-471d-a4ed-49907c0b23da",
                ServerSpn = string.IsNullOrEmpty(server_spn) ? null : server_spn
            };

            return(Create(client_info, throw_on_error));
        }
Пример #2
0
 /// <summary>
 /// Create a remote AuthZ resource manager from a raw binding string.
 /// </summary>
 /// <param name="server">The network address of the server.</param>
 /// <param name="server_spn">The SPN for the server.</param>
 /// <param name="type">Specify the type of </param>
 /// <returns>The created AuthZ resource manager.</returns>
 public static AuthZResourceManager Create(string server, string server_spn, AuthZResourceManagerRemoteServiceType type)
 {
     return(Create(server, server_spn, type, true).Result);
 }
Пример #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public NewAuthZResourceManagerCmdlet()
 {
     Flags       = AuthZResourceManagerInitializeFlags.NoAudit;
     ServiceType = AuthZResourceManagerRemoteServiceType.Default;
 }