sddl.h revision 4b9d6701570cb98fd36e209314239d104ec584d3
2707a226168717ec0ca29abd7fef59989493d3d4semery/*
2707a226168717ec0ca29abd7fef59989493d3d4semery * Copyright (C) 2003 Ulrich Czekalla for CodeWeavers
2707a226168717ec0ca29abd7fef59989493d3d4semery *
2707a226168717ec0ca29abd7fef59989493d3d4semery * This library is free software; you can redistribute it and/or
2707a226168717ec0ca29abd7fef59989493d3d4semery * modify it under the terms of the GNU Lesser General Public
2707a226168717ec0ca29abd7fef59989493d3d4semery * License as published by the Free Software Foundation; either
2707a226168717ec0ca29abd7fef59989493d3d4semery * version 2.1 of the License, or (at your option) any later version.
2707a226168717ec0ca29abd7fef59989493d3d4semery *
2707a226168717ec0ca29abd7fef59989493d3d4semery * This library is distributed in the hope that it will be useful,
2707a226168717ec0ca29abd7fef59989493d3d4semery * but WITHOUT ANY WARRANTY; without even the implied warranty of
2707a226168717ec0ca29abd7fef59989493d3d4semery * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2707a226168717ec0ca29abd7fef59989493d3d4semery * Lesser General Public License for more details.
2707a226168717ec0ca29abd7fef59989493d3d4semery *
2707a226168717ec0ca29abd7fef59989493d3d4semery * You should have received a copy of the GNU Lesser General Public
2707a226168717ec0ca29abd7fef59989493d3d4semery * License along with this library; if not, write to the Free Software
2707a226168717ec0ca29abd7fef59989493d3d4semery * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
2707a226168717ec0ca29abd7fef59989493d3d4semery */
2707a226168717ec0ca29abd7fef59989493d3d4semery
2707a226168717ec0ca29abd7fef59989493d3d4semery/*
1fceb383a3f0b59711832b9dc4e8329d7f216604semery * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
1fceb383a3f0b59711832b9dc4e8329d7f216604semery * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
1fceb383a3f0b59711832b9dc4e8329d7f216604semery * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
1fceb383a3f0b59711832b9dc4e8329d7f216604semery * a choice of LGPL license versions is made available with the language indicating
1fceb383a3f0b59711832b9dc4e8329d7f216604semery * that LGPLv2 or any later version may be used, or where a choice of which version
1fceb383a3f0b59711832b9dc4e8329d7f216604semery * of the LGPL is applied is otherwise unspecified.
1fceb383a3f0b59711832b9dc4e8329d7f216604semery */
1fceb383a3f0b59711832b9dc4e8329d7f216604semery
1fceb383a3f0b59711832b9dc4e8329d7f216604semery#ifndef __SDDL_H__
1fceb383a3f0b59711832b9dc4e8329d7f216604semery#define __SDDL_H__
1fceb383a3f0b59711832b9dc4e8329d7f216604semery
1fceb383a3f0b59711832b9dc4e8329d7f216604semery#ifdef __cplusplus
1fceb383a3f0b59711832b9dc4e8329d7f216604semeryextern "C" {
1fceb383a3f0b59711832b9dc4e8329d7f216604semery#endif
1fceb383a3f0b59711832b9dc4e8329d7f216604semery
1fceb383a3f0b59711832b9dc4e8329d7f216604semery/* Versioning */
1fceb383a3f0b59711832b9dc4e8329d7f216604semery#define SDDL_REVISION_1 1
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe#define SDDL_REVISION SDDL_REVISION_1
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe#ifndef __WINESRC__
55c4b5faaa3d3ff8bea0d08505e7ea0850b949e8semery/* Component tags */
1fceb383a3f0b59711832b9dc4e8329d7f216604semery#ifndef UNICODE
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross# define SDDL_OWNER "O"
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross# define SDDL_GROUP "G"
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_DACL "D"
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_SACL "S"
1fceb383a3f0b59711832b9dc4e8329d7f216604semery#else
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# if defined(__GNUC__)
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_OWNER (const WCHAR[]){ 'O',0 }
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_GROUP (const WCHAR[]){ 'G',0 }
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_DACL (const WCHAR[]){ 'D',0 }
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_SACL (const WCHAR[]){ 'S',0 }
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# elif defined(_MSC_VER)
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_OWNER L"O"
55c4b5faaa3d3ff8bea0d08505e7ea0850b949e8semery# define SDDL_GROUP L"G"
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_DACL L"D"
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# define SDDL_SACL L"S"
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# else
1fceb383a3f0b59711832b9dc4e8329d7f216604semery static const WCHAR SDDL_OWNER[] = { 'O',0 };
1fceb383a3f0b59711832b9dc4e8329d7f216604semery static const WCHAR SDDL_GROUP[] = { 'G',0 };
b6805bf78d2bbbeeaea8909a05623587b42d58b3Gordon Ross static const WCHAR SDDL_DACL[] = { 'D',0 };
1fceb383a3f0b59711832b9dc4e8329d7f216604semery static const WCHAR SDDL_SACL[] = { 'S',0 };
1fceb383a3f0b59711832b9dc4e8329d7f216604semery# endif
#endif /* UNICODE */
/* Separators as characters */
/* SDDL_SEPERATORC is not a typo, as per Microsoft's headers */
#ifndef UNICODE
# define SDDL_SEPERATORC ';'
# define SDDL_DELIMINATORC ':'
# define SDDL_ACE_BEGINC '('
# define SDDL_ACE_ENDC ')'
#else
# define SDDL_SEPERATORC ((WCHAR)';')
# define SDDL_DELIMINATORC ((WCHAR)':')
# define SDDL_ACE_BEGINC ((WCHAR)'(')
# define SDDL_ACE_ENDC ((WCHAR)')')
#endif /* UNICODE */
/* Separators as strings */
/* SDDL_SEPERATOR is not a typo, as per Microsoft's headers */
#ifndef UNICODE
# define SDDL_SEPERATOR ";"
# define SDDL_DELIMINATOR ":"
# define SDDL_ACE_BEGIN "("
# define SDDL_ACE_END ")"
#else
# if defined(__GNUC__)
# define SDDL_SEPERATOR (const WCHAR[]){ ';',0 }
# define SDDL_DELIMINATOR (const WCHAR[]){ ':',0 }
# define SDDL_ACE_BEGIN (const WCHAR[]){ '(',0 }
# define SDDL_ACE_END (const WCHAR[]){ ')',0 }
# elif defined(_MSC_VER)
# define SDDL_SEPERATOR L";"
# define SDDL_DELIMINATOR L":"
# define SDDL_ACE_BEGIN L"("
# define SDDL_ACE_END L")"
# else
static const WCHAR SDDL_SEPERATOR[] = { ';',0 };
static const WCHAR SDDL_DELIMINATOR[] = { ':',0 };
static const WCHAR SDDL_ACE_BEGIN[] = { '(',0 };
static const WCHAR SDDL_ACE_END[] = { ')',0 };
# endif
#endif /* UNICODE */
#endif /* __WINESRC__ */
BOOL WINAPI ConvertSidToStringSidA( PSID, LPSTR* );
BOOL WINAPI ConvertSidToStringSidW( PSID, LPWSTR* );
#define ConvertSidToStringSid WINELIB_NAME_AW(ConvertSidToStringSid)
BOOL WINAPI ConvertStringSidToSidA( LPCSTR, PSID* );
BOOL WINAPI ConvertStringSidToSidW( LPCWSTR, PSID* );
#define ConvertStringSidToSid WINELIB_NAME_AW(ConvertStringSidToSid)
BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorA(
LPCSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG );
BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(
LPCWSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG );
#define ConvertStringSecurityDescriptorToSecurityDescriptor WINELIB_NAME_AW(ConvertStringSecurityDescriptorToSecurityDescriptor)
BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA(
PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPSTR*, PULONG );
BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW(
PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPWSTR*, PULONG );
#define ConvertSecurityDescriptorToStringSecurityDescriptor WINELIB_NAME_AW(ConvertSecurityDescriptorToStringSecurityDescriptor)
#ifdef __cplusplus
}
#endif
#endif /* __SDDL_H__ */