Esempio n. 1
0
 internal static extern bool AuthzInitializeResourceManager(
     AuthZResourceManagerInitializeFlags Flags,
     AuthzAccessCheckCallback pfnDynamicAccessCheck,
     IntPtr pfnComputeDynamicGroups,
     IntPtr pfnFreeDynamicGroups,
     string szResourceManagerName,
     out SafeAuthZResourceManagerHandle phAuthzResourceManager
     );
Esempio n. 2
0
        /// <summary>
        /// Create a new AuthZ resource manager.
        /// </summary>
        /// <param name="name">The name of the resource manager, optional.</param>
        /// <param name="flags">Optional flags for the resource manager.</param>
        /// <param name="handle_callback_ace">Optional callback to handle callback ACEs.</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 name, AuthZResourceManagerInitializeFlags flags, AuthZHandleCallbackAce handle_callback_ace, bool throw_on_error)
        {
            AuthZResourceManager     ret      = new AuthZResourceManager(name);
            AuthzAccessCheckCallback callback = null;

            if (handle_callback_ace != null)
            {
                ret._handle_callback_ace = handle_callback_ace;
                callback = ret.HandleCallbackAce;
            }

            return(SecurityNativeMethods.AuthzInitializeResourceManager(flags, callback, IntPtr.Zero,
                                                                        IntPtr.Zero, name, out ret._handle).CreateWin32Result(throw_on_error, () => ret));
        }
Esempio n. 3
0
 /// <summary>
 /// Create a new AuthZ resource manager.
 /// </summary>
 /// <param name="name">The name of the resource manager, optional.</param>
 /// <param name="flags">Optional flags for the resource manager.</param>
 /// <param name="handle_callback_ace">Optional callback to handle callback ACEs.</param>
 /// <returns>The created AuthZ resource manager.</returns>
 public static AuthZResourceManager Create(string name, AuthZResourceManagerInitializeFlags flags, AuthZHandleCallbackAce handle_callback_ace)
 {
     return(Create(name, flags, handle_callback_ace, true).Result);
 }