aclui: added a stub dll (try2)

Nikolay Sivov bunglehead at gmail.com
Tue Jan 20 03:37:59 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=17022

Allows to start Systemtools Hyena tool.

Changelog:
    - try2: removed trailing spaces, tab used in Makefile.in now
    - added stub aclui.dll


>From 8fab807d02cdfa883065b404dfd8d3389651c542 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Tue, 20 Jan 2009 01:42:05 +0300
Subject:   Added stub aclui.dll

---
 configure.ac            |    1 +
 dlls/aclui/Makefile.in  |   12 +++
 dlls/aclui/aclui.spec   |    3 +
 dlls/aclui/aclui_main.c |   60 ++++++++++++
 include/Makefile.in     |    1 +
 include/aclui.h         |  242 +++++++++++++++++++++++++++++++++++++++++++++++
 include/objbase.h       |    2 +
 7 files changed, 321 insertions(+), 0 deletions(-)
 create mode 100644 dlls/aclui/Makefile.in
 create mode 100644 dlls/aclui/aclui.spec
 create mode 100644 dlls/aclui/aclui_main.c
 create mode 100644 include/aclui.h

diff --git a/configure.ac b/configure.ac
index 72f93b7..64e9e50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1777,6 +1777,7 @@ WINE_CONFIG_MAKERULES([programs/Makeprog.rules],[MAKE_PROG_RULES],[Make.rules])
 WINE_CONFIG_MAKEFILE([Makefile],[Make.rules])
 WINE_CONFIG_MAKEFILE([dlls/Makefile],[Make.rules],[],[ALL_TOP_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/acledit/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
+WINE_CONFIG_MAKEFILE([dlls/aclui/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/activeds/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/actxprxy/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/adsiid/Makefile],[dlls/Makeimplib.rules],[dlls],[ALL_IMPLIB_DIRS])
diff --git a/dlls/aclui/Makefile.in b/dlls/aclui/Makefile.in
new file mode 100644
index 0000000..33f120c
--- /dev/null
+++ b/dlls/aclui/Makefile.in
@@ -0,0 +1,12 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = aclui.dll
+IMPORTS   = kernel32
+
+C_SRCS = aclui_main.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/aclui/aclui.spec b/dlls/aclui/aclui.spec
new file mode 100644
index 0000000..c824040
--- /dev/null
+++ b/dlls/aclui/aclui.spec
@@ -0,0 +1,3 @@
+1 stdcall CreateSecurityPage(ptr)
+2 stdcall EditSecurity(long ptr)
+16 stub IID_ISecurityInformation
diff --git a/dlls/aclui/aclui_main.c b/dlls/aclui/aclui_main.c
new file mode 100644
index 0000000..648b8c0
--- /dev/null
+++ b/dlls/aclui/aclui_main.c
@@ -0,0 +1,60 @@
+/*
+ * Implementation of the AclUI
+ *
+ * Copyright (C) 2009 Nikolay Sivov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include <winuser.h>
+#include <winnt.h>
+#include "aclui.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(aclui);
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+    TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
+
+    switch (fdwReason)
+    {
+    case DLL_WINE_PREATTACH:
+        return FALSE;    /* prefer native version */
+    case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(hinstDLL);
+        break;
+    }
+    return TRUE;
+}
+
+HPROPSHEETPAGE WINAPI CreateSecurityPage(LPSECURITYINFO psi)
+{
+    FIXME("(%p): stub\n", psi);
+    return NULL;
+}
+
+BOOL WINAPI EditSecurity(HWND owner, LPSECURITYINFO psi)
+{
+    FIXME("(%p, %p): stub\n", owner, psi);
+    return FALSE;
+}
diff --git a/include/Makefile.in b/include/Makefile.in
index 98bd715..b8a6805 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -89,6 +89,7 @@ SRCDIR_INCLUDES = \
 	$(PUBLIC_IDL_H_SRCS) \
 	accctrl.h \
 	aclapi.h \
+	aclui.h \
 	adshlp.h \
 	advpub.h \
 	appmgmt.h \
diff --git a/include/aclui.h b/include/aclui.h
new file mode 100644
index 0000000..fa690a4
--- /dev/null
+++ b/include/aclui.h
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2009 Nikolay Sivov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_ACLUI_H
+#define __WINE_ACLUI_H
+
+#ifndef __WINESRC__
+# include <windows.h>
+#endif
+
+#include <objbase.h>
+#include <commctrl.h>
+#include <accctrl.h>
+
+typedef struct _SI_OBJECT_INFO
+{
+    DWORD       dwFlags;
+    HINSTANCE   hInstance;
+    LPWSTR      pszServerName;
+    LPWSTR      pszObjectName;
+    LPWSTR      pszPageTitle;
+    GUID        guidObjectType;
+} SI_OBJECT_INFO, *PSI_OBJECT_INFO;
+
+/* SI_OBJECT_INFO flags */
+#define SI_EDIT_PERMS               0x00000000L
+#define SI_EDIT_OWNER               0x00000001L
+#define SI_EDIT_AUDITS              0x00000002L
+#define SI_CONTAINER                0x00000004L
+#define SI_READONLY                 0x00000008L
+#define SI_ADVANCED                 0x00000010L
+#define SI_RESET                    0x00000020L
+#define SI_OWNER_READONLY           0x00000040L
+#define SI_EDIT_PROPERTIES          0x00000080L
+#define SI_OWNER_RECURSE            0x00000100L
+#define SI_NO_ACL_PROTECT           0x00000200L
+#define SI_NO_TREE_APPLY            0x00000400L
+#define SI_PAGE_TITLE               0x00000800L
+#define SI_SERVER_IS_DC             0x00001000L
+#define SI_RESET_DACL_TREE          0x00004000L
+#define SI_RESET_SACL_TREE          0x00008000L
+#define SI_OBJECT_GUID              0x00010000L
+#define SI_EDIT_EFFECTIVE           0x00020000L
+#define SI_RESET_DACL               0x00040000L
+#define SI_RESET_SACL               0x00080000L
+#define SI_RESET_OWNER              0x00100000L
+#define SI_NO_ADDITIONAL_PERMISSION 0x00200000L
+#define SI_VIEW_ONLY                0x00400000L
+#define SI_PERMS_ELEVATION_REQUIRED 0x01000000L
+#define SI_AUDITS_ELEVATION_REQUIRED 0x02000000L
+#define SI_OWNER_ELEVATION_REQUIRED 0x04000000L
+#define SI_MAY_WRITE                0x10000000L
+
+#define SI_EDIT_ALL     (SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS)
+
+typedef struct _SI_ACCESS
+{
+    const GUID *pguid;
+    ACCESS_MASK mask;
+    LPCWSTR     pszName;
+    DWORD       dwFlags;
+} SI_ACCESS, *PSI_ACCESS;
+
+/* SI_ACCESS flags */
+#define SI_ACCESS_SPECIFIC  0x00010000L
+#define SI_ACCESS_GENERAL   0x00020000L
+#define SI_ACCESS_CONTAINER 0x00040000L
+#define SI_ACCESS_PROPERTY  0x00080000L
+
+typedef struct _SI_INHERIT_TYPE
+{
+    const GUID *pguid;
+    ULONG       dwFlags;
+    LPCWSTR     pszName;
+} SI_INHERIT_TYPE, *PSI_INHERIT_TYPE;
+
+typedef enum _SI_PAGE_TYPE
+{
+    SI_PAGE_PERM=0,
+    SI_PAGE_ADVPERM,
+    SI_PAGE_AUDIT,
+    SI_PAGE_OWNER,
+    SI_PAGE_EFFECTIVE,
+    SI_PAGE_TAKEOWNERSHIP,
+} SI_PAGE_TYPE;
+
+#define PSPCB_SI_INITDIALOG    (WM_USER + 1)
+
+#undef INTERFACE
+#define INTERFACE   ISecurityInformation
+DECLARE_INTERFACE_IID_(ISecurityInformation, IUnknown, "965fc360-16ff-11d0-91cb-00aa00bbb723")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation methods */
+    STDMETHOD(GetObjectInformation) (THIS_ PSI_OBJECT_INFO pObjectInfo ) PURE;
+    STDMETHOD(GetSecurity) (THIS_ SECURITY_INFORMATION RequestedInformation,
+                            PSECURITY_DESCRIPTOR *ppSecurityDescriptor,
+                            BOOL fDefault ) PURE;
+    STDMETHOD(SetSecurity) (THIS_ SECURITY_INFORMATION SecurityInformation,
+                            PSECURITY_DESCRIPTOR pSecurityDescriptor ) PURE;
+    STDMETHOD(GetAccessRights) (THIS_ const GUID* pguidObjectType,
+                                DWORD dwFlags,
+                                PSI_ACCESS *ppAccess,
+                                ULONG *pcAccesses,
+                                ULONG *piDefaultAccess ) PURE;
+    STDMETHOD(MapGeneric) (THIS_ const GUID *pguidObjectType,
+                           UCHAR *pAceFlags,
+                           ACCESS_MASK *pMask) PURE;
+    STDMETHOD(GetInheritTypes) (THIS_ PSI_INHERIT_TYPE *ppInheritTypes,
+                                ULONG *pcInheritTypes ) PURE;
+    STDMETHOD(PropertySheetPageCallback)(THIS_ HWND hwnd, UINT uMsg, SI_PAGE_TYPE uPage ) PURE;
+};
+typedef ISecurityInformation *LPSECURITYINFO;
+
+#undef INTERFACE
+#define INTERFACE   ISecurityInformation2
+DECLARE_INTERFACE_IID_(ISecurityInformation2, IUnknown, "c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation2 methods */
+    STDMETHOD_(BOOL,IsDaclCanonical) (THIS_ IN PACL pDacl) PURE;
+    STDMETHOD(LookupSids) (THIS_ IN ULONG cSids, IN PSID *rgpSids, OUT LPDATAOBJECT *ppdo) PURE;
+};
+typedef ISecurityInformation2 *LPSECURITYINFO2;
+
+#define CFSTR_ACLUI_SID_INFO_LIST   TEXT("CFSTR_ACLUI_SID_INFO_LIST")
+
+typedef struct _SID_INFO
+{
+    PSID    pSid;
+    PWSTR   pwzCommonName;
+    PWSTR   pwzClass;
+    PWSTR   pwzUPN;
+} SID_INFO, *PSID_INFO;
+typedef struct _SID_INFO_LIST
+{
+    ULONG       cItems;
+    SID_INFO    aSidInfo[ANYSIZE_ARRAY];
+} SID_INFO_LIST, *PSID_INFO_LIST;
+
+
+#undef INTERFACE
+#define INTERFACE   IEffectivePermission
+DECLARE_INTERFACE_IID_(IEffectivePermission, IUnknown, "3853DC76-9F35-407c-88A1-D19344365FBC")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation methods */
+    STDMETHOD(GetEffectivePermission) (  THIS_ const GUID* pguidObjectType,
+                                         PSID pUserSid,
+                                         LPCWSTR pszServerName,
+                                         PSECURITY_DESCRIPTOR pSD,
+                                         POBJECT_TYPE_LIST *ppObjectTypeList,
+                                         ULONG *pcObjectTypeListLength,
+                                         PACCESS_MASK *ppGrantedAccessList,
+                                         ULONG *pcGrantedAccessListLength) PURE;
+};
+typedef IEffectivePermission *LPEFFECTIVEPERMISSION;
+
+#undef INTERFACE
+#define INTERFACE   ISecurityObjectTypeInfo
+DECLARE_INTERFACE_IID_(ISecurityObjectTypeInfo, IUnknown, "FC3066EB-79EF-444b-9111-D18A75EBF2FA")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation methods */
+    STDMETHOD(GetInheritSource)(THIS_ SECURITY_INFORMATION si,
+                                PACL pACL,
+                                #ifndef WINE_NO_UNICODE_MACROS
+                                PINHERITED_FROM *ppInheritArray
+                                #else
+                                PINHERITED_FROMW *ppInheritArray
+                                #endif
+                                ) PURE;
+};
+typedef ISecurityObjectTypeInfo *LPSecurityObjectTypeInfo;
+
+
+#undef INTERFACE
+#define INTERFACE   ISecurityInformation3
+DECLARE_INTERFACE_IID_(ISecurityInformation3, IUnknown, "E2CDC9CC-31BD-4f8f-8C8B-B641AF516A1A")
+{
+    /* IUnknown methods */
+    STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
+    STDMETHOD_(ULONG,Release) (THIS) PURE;
+
+    /* ISecurityInformation3 methods */
+    STDMETHOD(GetFullResourceName) (THIS_ OUT LPWSTR *ppszResourceName) PURE;
+    STDMETHOD(OpenElevatedEditor) (THIS_ IN HWND hWnd, IN SI_PAGE_TYPE uPage) PURE;
+};
+typedef ISecurityInformation3 *LPSECURITYINFO3;
+
+/* {965fc360-16ff-11d0-91cb-00aa00bbb723} */
+DEFINE_GUID(IID_ISecurityInformation, 0x965fc360, 0x16ff, 0x11d0, 0x91, 0xcb, 0x0, 0xaa, 0x0, 0xbb, 0xb7, 0x23);
+/* {c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a} */
+DEFINE_GUID(IID_ISecurityInformation2, 0xc3ccfdb4, 0x6f88, 0x11d2, 0xa3, 0xce, 0x0, 0xc0, 0x4f, 0xb1, 0x78, 0x2a);
+/* {3853dc76-9f35-407c-88a1-d19344365fbc} */
+DEFINE_GUID(IID_IEffectivePermission, 0x3853dc76, 0x9f35, 0x407c, 0x88, 0xa1, 0xd1, 0x93, 0x44, 0x36, 0x5f, 0xbc);
+/* {fc3066eb-79ef-444b-9111-d18a75ebf2fa} */
+DEFINE_GUID(IID_ISecurityObjectTypeInfo, 0xfc3066eb, 0x79ef, 0x444b, 0x91, 0x11, 0xd1, 0x8a, 0x75, 0xeb, 0xf2, 0xfa);
+/* {e2cdc9cc-31bd-4f8f-8c8b-b641af516a1a} */
+DEFINE_GUID(IID_ISecurityInformation3, 0xe2cdc9cc, 0x31bd, 0x4f8f, 0x8c, 0x8b, 0xb6, 0x41, 0xaf, 0x51, 0x6a, 0x1a);
+
+HPROPSHEETPAGE WINAPI CreateSecurityPage(LPSECURITYINFO psi);
+BOOL WINAPI EditSecurity(HWND owner, LPSECURITYINFO psi);
+HRESULT WINAPI EditSecurityAdvanced(HWND owner, LPSECURITYINFO psi, SI_PAGE_TYPE uSIPage);
+
+#ifdef __cplusplus
+}
+#endif  /* __cplusplus */
+
+#endif /* __WINE_ACLUI_H */
diff --git a/include/objbase.h b/include/objbase.h
index 7e72fad..91c18af 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -227,6 +227,7 @@
 #define interface struct
 #define DECLARE_INTERFACE(iface)        interface iface
 #define DECLARE_INTERFACE_(iface,ibase) interface iface : public ibase
+#define DECLARE_INTERFACE_IID_(iface, ibase, iid) interface DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE iface : public ibase
 
 #define BEGIN_INTERFACE
 #define END_INTERFACE
@@ -266,6 +267,7 @@
          struct iface##Vtbl
 #endif
 #define DECLARE_INTERFACE_(iface,ibase) DECLARE_INTERFACE(iface)
+#define DECLARE_INTERFACE_IID_(iface, ibase, iid) DECLARE_INTERFACE_(iface, ibase)
 
 #define BEGIN_INTERFACE
 #define END_INTERFACE
-- 
1.5.6.5






More information about the wine-patches mailing list