mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 20:43:18 +00:00
a few fixes.
I'm not going to continue working on this due to a lack of knowledge of the security api, so someone else who knows a bit more about them should step in... svn path=/trunk/; revision=10529
This commit is contained in:
parent
d07b810759
commit
e3e1c39945
7 changed files with 106 additions and 30 deletions
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile,v 1.3 2004/08/11 01:21:52 weiden Exp $
|
# $Id: Makefile,v 1.4 2004/08/14 11:50:25 weiden Exp $
|
||||||
|
|
||||||
PATH_TO_TOP = ../..
|
PATH_TO_TOP = ../..
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ TARGET_CFLAGS = \
|
||||||
-DUNICODE \
|
-DUNICODE \
|
||||||
-D_UNICODE \
|
-D_UNICODE \
|
||||||
-D__REACTOS__ \
|
-D__REACTOS__ \
|
||||||
|
-D_WIN32_IE=0x0500 \
|
||||||
-D_WIN32_WINNT=0x501 \
|
-D_WIN32_WINNT=0x501 \
|
||||||
-DWINVER=0x600 \
|
-DWINVER=0x600 \
|
||||||
-Wall \
|
-Wall \
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
/* $Id: aclui.c,v 1.5 2004/08/14 00:46:54 weiden Exp $
|
/* $Id: aclui.c,v 1.6 2004/08/14 11:50:25 weiden Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS Access Control List Editor
|
* PROJECT: ReactOS Access Control List Editor
|
||||||
* FILE: lib/aclui/aclui.c
|
* FILE: lib/aclui/aclui.c
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
*/
|
*/
|
||||||
#define INITGUID
|
#define INITGUID
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
#include <prsht.h>
|
#include <prsht.h>
|
||||||
#include <aclui.h>
|
#include <aclui.h>
|
||||||
#include <rosrtl/resstr.h>
|
#include <rosrtl/resstr.h>
|
||||||
|
@ -36,38 +37,39 @@
|
||||||
|
|
||||||
HINSTANCE hDllInstance;
|
HINSTANCE hDllInstance;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOL STDCALL
|
|
||||||
DllMain(HINSTANCE hinstDLL,
|
|
||||||
DWORD dwReason,
|
|
||||||
LPVOID lpvReserved)
|
|
||||||
{
|
|
||||||
switch (dwReason)
|
|
||||||
{
|
|
||||||
case DLL_PROCESS_ATTACH:
|
|
||||||
hDllInstance = hinstDLL;
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
case DLL_PROCESS_DETACH:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
UINT CALLBACK
|
UINT CALLBACK
|
||||||
SecurityPageCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
|
SecurityPageCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
|
||||||
{
|
{
|
||||||
switch(uMsg)
|
switch(uMsg)
|
||||||
{
|
{
|
||||||
case PSPCB_CREATE:
|
case PSPCB_CREATE:
|
||||||
return TRUE;
|
{
|
||||||
case PSPCB_RELEASE:
|
PSECURITY_PAGE sp;
|
||||||
|
|
||||||
|
sp = LocalAlloc(LHND, sizeof(SECURITY_PAGE));
|
||||||
|
if(sp != NULL)
|
||||||
|
{
|
||||||
|
/* save the pointer to the ISecurityInformation interface */
|
||||||
|
sp->psi = (LPSECURITYINFO)ppsp->lParam;
|
||||||
|
/* set the lParam to the allocated structure */
|
||||||
|
ppsp->lParam = (LPARAM)sp;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
case PSPCB_RELEASE:
|
||||||
|
{
|
||||||
|
if(ppsp->lParam != 0)
|
||||||
|
{
|
||||||
|
PSECURITY_PAGE sp = (PSECURITY_PAGE)ppsp->lParam;
|
||||||
|
if(sp->hiUsrs != NULL)
|
||||||
|
{
|
||||||
|
ImageList_Destroy(sp->hiUsrs);
|
||||||
|
}
|
||||||
|
LocalFree((HLOCAL)sp);
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -77,6 +79,42 @@ SecurityPageCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
|
||||||
INT_PTR CALLBACK
|
INT_PTR CALLBACK
|
||||||
SecurityPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
SecurityPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
PSECURITY_PAGE sp;
|
||||||
|
|
||||||
|
switch(uMsg)
|
||||||
|
{
|
||||||
|
case WM_INITDIALOG:
|
||||||
|
{
|
||||||
|
sp = (PSECURITY_PAGE)lParam;
|
||||||
|
if(sp != NULL)
|
||||||
|
{
|
||||||
|
LV_COLUMN lvc;
|
||||||
|
RECT rcLvClient;
|
||||||
|
|
||||||
|
sp->hWnd = hwndDlg;
|
||||||
|
sp->hWndUsrList = GetDlgItem(hwndDlg, IDC_ACELIST);
|
||||||
|
sp->hiUsrs = ImageList_LoadBitmap(hDllInstance, MAKEINTRESOURCE(IDB_USRGRPIMAGES), 16, 3, 0);
|
||||||
|
|
||||||
|
/* save the pointer to the structure */
|
||||||
|
SetWindowLong(hwndDlg, DWL_USER, (LONG)sp);
|
||||||
|
|
||||||
|
GetClientRect(sp->hWndUsrList, &rcLvClient);
|
||||||
|
|
||||||
|
/* setup the listview control */
|
||||||
|
ListView_SetExtendedListViewStyleEx(sp->hWndUsrList, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
|
||||||
|
ListView_SetImageList(sp->hWndUsrList, sp->hiUsrs, LVSIL_SMALL);
|
||||||
|
|
||||||
|
/* add a column to the list view */
|
||||||
|
lvc.mask = LVCF_FMT | LVCF_WIDTH;
|
||||||
|
lvc.fmt = LVCFMT_LEFT;
|
||||||
|
lvc.cx = rcLvClient.right;
|
||||||
|
ListView_InsertColumn(sp->hWndUsrList, 0, &lvc);
|
||||||
|
|
||||||
|
/* FIXME - hide controls in case the flags aren't present */
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,3 +247,23 @@ EditSecurity(HWND hwndOwner, LPSECURITYINFO psi)
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
DllMain(HINSTANCE hinstDLL,
|
||||||
|
DWORD dwReason,
|
||||||
|
LPVOID lpvReserved)
|
||||||
|
{
|
||||||
|
switch (dwReason)
|
||||||
|
{
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
hDllInstance = hinstDLL;
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_ATTACH:
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_DETACH:
|
||||||
|
break;
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,5 +37,6 @@ BEGIN
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDB_USRGRPIMAGES BITMAP "res/usrgrp.bmp"
|
||||||
#include "aclui_En.rc"
|
#include "aclui_En.rc"
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,11 @@ CAPTION "Security"
|
||||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "&Group or user names:", -1, 7, 7, 105, 8
|
LTEXT "&Group or user names:", -1, 7, 7, 105, 8
|
||||||
CONTROL "", IDC_GRPUSRLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 17, 213, 66, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
|
CONTROL "", IDC_ACELIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 17, 213, 66, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
|
||||||
|
PUSHBUTTON "A&dd...", IDC_ACELIST_ADD, 116, 87, 50, 14
|
||||||
|
PUSHBUTTON "&Remove", IDC_ACELIST_REMOVE, 170, 87, 50, 14
|
||||||
|
LTEXT "Allow", -1, 135, 107, 32, 8, SS_CENTER
|
||||||
|
LTEXT "Deny", -1, 176, 107, 32, 8, SS_CENTER
|
||||||
END
|
END
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
|
|
|
@ -6,6 +6,14 @@ ULONG DbgPrint(PCH Format,...);
|
||||||
|
|
||||||
extern HINSTANCE hDllInstance;
|
extern HINSTANCE hDllInstance;
|
||||||
|
|
||||||
|
typedef struct _SECURITY_PAGE
|
||||||
|
{
|
||||||
|
HWND hWnd;
|
||||||
|
HWND hWndUsrList;
|
||||||
|
HIMAGELIST hiUsrs;
|
||||||
|
LPSECURITYINFO psi;
|
||||||
|
} SECURITY_PAGE, *PSECURITY_PAGE;
|
||||||
|
|
||||||
#endif /* __ACLUI_INTERNAL_H */
|
#endif /* __ACLUI_INTERNAL_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
BIN
reactos/lib/aclui/res/usrgrp.bmp
Normal file
BIN
reactos/lib/aclui/res/usrgrp.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -1,14 +1,18 @@
|
||||||
#ifndef __ACLUI_RESOURCE_H
|
#ifndef __ACLUI_RESOURCE_H
|
||||||
#define __ACLUI_RESOURCE_H
|
#define __ACLUI_RESOURCE_H
|
||||||
|
|
||||||
#define IDD_SECPAGE 101
|
#define IDD_SECPAGE 101
|
||||||
|
|
||||||
#define IDC_GRPUSRLIST 1001
|
#define IDC_ACELIST 1001
|
||||||
|
#define IDC_ACELIST_ADD 1002
|
||||||
|
#define IDC_ACELIST_REMOVE 1003
|
||||||
|
|
||||||
#define IDI_DEVMGR 100
|
#define IDI_DEVMGR 100
|
||||||
|
|
||||||
#define IDS_PSP_TITLE 1001
|
#define IDS_PSP_TITLE 1001
|
||||||
|
|
||||||
|
#define IDB_USRGRPIMAGES 1001
|
||||||
|
|
||||||
#endif /* __ACLUI_RESOURCE_H */
|
#endif /* __ACLUI_RESOURCE_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue