Commit 5b4aa62f authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

advapi32: Add some more rights constants for ConvertStringSecurityDescriptorToSecurityDescriptor.

parent 316095c7
......@@ -35,6 +35,8 @@
#include "sddl.h"
#include "winsvc.h"
#include "aclapi.h"
#include "objbase.h"
#include "iads.h"
#include "advapi32_misc.h"
#include "wine/debug.h"
......@@ -246,6 +248,27 @@ static const WCHAR SDDL_READ_CONTROL[] = {'R','C',0};
static const WCHAR SDDL_WRITE_DAC[] = {'W','D',0};
static const WCHAR SDDL_WRITE_OWNER[] = {'W','O',0};
static const WCHAR SDDL_STANDARD_DELETE[] = {'S','D',0};
static const WCHAR SDDL_READ_PROPERTY[] = {'R','P',0};
static const WCHAR SDDL_WRITE_PROPERTY[] = {'W','P',0};
static const WCHAR SDDL_CREATE_CHILD[] = {'C','C',0};
static const WCHAR SDDL_DELETE_CHILD[] = {'D','C',0};
static const WCHAR SDDL_LIST_CHILDREN[] = {'L','C',0};
static const WCHAR SDDL_SELF_WRITE[] = {'S','W',0};
static const WCHAR SDDL_LIST_OBJECT[] = {'L','O',0};
static const WCHAR SDDL_DELETE_TREE[] = {'D','T',0};
static const WCHAR SDDL_CONTROL_ACCESS[] = {'C','R',0};
static const WCHAR SDDL_FILE_ALL[] = {'F','A',0};
static const WCHAR SDDL_FILE_READ[] = {'F','R',0};
static const WCHAR SDDL_FILE_WRITE[] = {'F','W',0};
static const WCHAR SDDL_FILE_EXECUTE[] = {'F','X',0};
static const WCHAR SDDL_KEY_ALL[] = {'K','A',0};
static const WCHAR SDDL_KEY_READ[] = {'K','R',0};
static const WCHAR SDDL_KEY_WRITE[] = {'K','W',0};
static const WCHAR SDDL_KEY_EXECUTE[] = {'K','X',0};
static const WCHAR SDDL_GENERIC_ALL[] = {'G','A',0};
static const WCHAR SDDL_GENERIC_READ[] = {'G','R',0};
static const WCHAR SDDL_GENERIC_WRITE[] = {'G','W',0};
......@@ -3107,10 +3130,31 @@ static const ACEFLAG AceRights[] =
{ SDDL_GENERIC_READ, GENERIC_READ },
{ SDDL_GENERIC_WRITE, GENERIC_WRITE },
{ SDDL_GENERIC_EXECUTE, GENERIC_EXECUTE },
{ SDDL_READ_CONTROL, READ_CONTROL },
{ SDDL_STANDARD_DELETE, DELETE },
{ SDDL_WRITE_DAC, WRITE_DAC },
{ SDDL_WRITE_OWNER, WRITE_OWNER },
{ SDDL_READ_PROPERTY, ADS_RIGHT_DS_READ_PROP},
{ SDDL_WRITE_PROPERTY, ADS_RIGHT_DS_WRITE_PROP},
{ SDDL_CREATE_CHILD, ADS_RIGHT_DS_CREATE_CHILD},
{ SDDL_DELETE_CHILD, ADS_RIGHT_DS_DELETE_CHILD},
{ SDDL_LIST_CHILDREN, ADS_RIGHT_ACTRL_DS_LIST},
{ SDDL_SELF_WRITE, ADS_RIGHT_DS_SELF},
{ SDDL_LIST_OBJECT, ADS_RIGHT_DS_LIST_OBJECT},
{ SDDL_DELETE_TREE, ADS_RIGHT_DS_DELETE_TREE},
{ SDDL_CONTROL_ACCESS, ADS_RIGHT_DS_CONTROL_ACCESS},
{ SDDL_FILE_ALL, FILE_ALL_ACCESS },
{ SDDL_FILE_READ, FILE_GENERIC_READ },
{ SDDL_FILE_WRITE, FILE_GENERIC_WRITE },
{ SDDL_FILE_EXECUTE, FILE_GENERIC_EXECUTE },
{ SDDL_KEY_ALL, KEY_ALL_ACCESS },
{ SDDL_KEY_READ, KEY_READ },
{ SDDL_KEY_WRITE, KEY_WRITE },
{ SDDL_KEY_EXECUTE, KEY_EXECUTE },
{ NULL, 0 },
};
......
......@@ -1848,19 +1848,16 @@ static void test_ConvertStringSecurityDescriptor(void)
SetLastError(0xdeadbeef);
ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
"D:(A;;RPWPCCDCLCSWLODTCR;;;WD)", SDDL_REVISION_1, &pSD, NULL);
todo_wine
ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
LocalFree(pSD);
SetLastError(0xdeadbeef);
ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
"D:(A;;FAFRFWFX;;;WD)", SDDL_REVISION_1, &pSD, NULL);
todo_wine
ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
LocalFree(pSD);
SetLastError(0xdeadbeef);
ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
"D:(A;;KAKRKWKX;;;WD)", SDDL_REVISION_1, &pSD, NULL);
todo_wine
ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
LocalFree(pSD);
SetLastError(0xdeadbeef);
......
......@@ -18,6 +18,30 @@
import "oaidl.idl";
typedef enum
{
ADS_RIGHT_DS_CREATE_CHILD = 0x00000001,
ADS_RIGHT_DS_DELETE_CHILD = 0x00000002,
ADS_RIGHT_ACTRL_DS_LIST = 0x00000004,
ADS_RIGHT_DS_SELF = 0x00000008,
ADS_RIGHT_DS_READ_PROP = 0x00000010,
ADS_RIGHT_DS_WRITE_PROP = 0x00000020,
ADS_RIGHT_DS_DELETE_TREE = 0x00000040,
ADS_RIGHT_DS_LIST_OBJECT = 0x00000080,
ADS_RIGHT_DS_CONTROL_ACCESS = 0x00000100,
ADS_RIGHT_DELETE = 0x00010000,
ADS_RIGHT_READ_CONTROL = 0x00020000,
ADS_RIGHT_WRITE_DAC = 0x00040000,
ADS_RIGHT_WRITE_OWNER = 0x00080000,
ADS_RIGHT_SYNCHRONIZE = 0x00100000,
ADS_RIGHT_ACCESS_SYSTEM_SECURITY = 0x00200000,
ADS_RIGHT_GENERIC_ALL = 0x10000000,
ADS_RIGHT_GENERIC_EXECUTE = 0x20000000,
ADS_RIGHT_GENERIC_WRITE = 0x40000000,
ADS_RIGHT_GENERIC_READ = 0x80000000
} ADS_RIGHTS_ENUM;
/*****************************************************************************
* IADsContainer interface
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment