ReactOS  0.4.13-dev-259-g5ca9c9c
safer.c File Reference
#include <advapi32.h>
Include dependency graph for safer.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (advapi)
 
BOOL WINAPI SaferCreateLevel (_In_ DWORD dwScopeId, _In_ DWORD dwLevelId, _In_ DWORD OpenFlags, _Outptr_ SAFER_LEVEL_HANDLE *pLevelHandle, _Reserved_ PVOID pReserved)
 
BOOL WINAPI SaferIdentifyLevel (_In_ DWORD dwNumProperties, _In_reads_opt_(dwNumProperties) PSAFER_CODE_PROPERTIES pCodeProperties, _Outptr_ SAFER_LEVEL_HANDLE *pLevelHandle, _Reserved_ PVOID pReserved)
 
BOOL WINAPI SaferCloseLevel (_In_ SAFER_LEVEL_HANDLE hLevelHandle)
 
BOOL WINAPI SaferGetLevelInformation (_In_ SAFER_LEVEL_HANDLE LevelHandle, _In_ SAFER_OBJECT_INFO_CLASS dwInfoType, _Out_writes_bytes_opt_(dwInBufferSize) PVOID pQueryBuffer, _In_ DWORD dwInBufferSize, _Out_ PDWORD pdwOutBufferSize)
 
BOOL WINAPI SaferSetLevelInformation (_In_ SAFER_LEVEL_HANDLE LevelHandle, _In_ SAFER_OBJECT_INFO_CLASS dwInfoType, _In_reads_bytes_(dwInBufferSize) PVOID pQueryBuffer, _In_ DWORD dwInBufferSize)
 
BOOL WINAPI SaferGetPolicyInformation (_In_ DWORD dwScopeId, _In_ SAFER_POLICY_INFO_CLASS SaferPolicyInfoClass, _In_ DWORD InfoBufferSize, _Out_writes_bytes_opt_(InfoBufferSize) PVOID InfoBuffer, _Out_ PDWORD InfoBufferRetSize, _Reserved_ PVOID pReserved)
 
BOOL WINAPI SaferSetPolicyInformation (_In_ DWORD dwScopeId, _In_ SAFER_POLICY_INFO_CLASS SaferPolicyInfoClass, _In_ DWORD InfoBufferSize, _In_reads_bytes_(InfoBufferSize) PVOID InfoBuffer, _Reserved_ PVOID pReserved)
 
BOOL WINAPI SaferComputeTokenFromLevel (_In_ SAFER_LEVEL_HANDLE LevelHandle, _In_opt_ HANDLE InAccessToken, _Out_ PHANDLE OutAccessToken, _In_ DWORD dwFlags, _Inout_opt_ PVOID pReserved)
 
BOOL WINAPI SaferRecordEventLogEntry (_In_ SAFER_LEVEL_HANDLE hLevel, _In_ PCWSTR szTargetPath, _Reserved_ PVOID pReserved)
 
BOOL WINAPI SaferiIsExecutableFileType (_In_ PCWSTR szFullPath, _In_ BOOLEAN bFromShellExecute)
 

Function Documentation

◆ SaferCloseLevel()

BOOL WINAPI SaferCloseLevel ( _In_ SAFER_LEVEL_HANDLE  hLevelHandle)

Definition at line 80 of file safer.c.

82 {
83  FIXME("(%p) stub\n", hLevelHandle);
84  if (hLevelHandle != (SAFER_LEVEL_HANDLE)0x42)
85  {
87  return FALSE;
88  }
89  return TRUE;
90 }
#define TRUE
Definition: types.h:120
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
#define FIXME(fmt,...)
Definition: debug.h:110
#define SetLastError(x)
Definition: compat.h:409

Referenced by START_TEST().

◆ SaferComputeTokenFromLevel()

BOOL WINAPI SaferComputeTokenFromLevel ( _In_ SAFER_LEVEL_HANDLE  LevelHandle,
_In_opt_ HANDLE  InAccessToken,
_Out_ PHANDLE  OutAccessToken,
_In_ DWORD  dwFlags,
_Inout_opt_ PVOID  pReserved 
)

Definition at line 150 of file safer.c.

156 {
157  FIXME("(%p, %p, %p, 0x%lx, %p) stub\n", LevelHandle, InAccessToken, OutAccessToken, dwFlags, pReserved);
159  return FALSE;
160 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define SetLastError(x)
Definition: compat.h:409
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ SaferCreateLevel()

BOOL WINAPI SaferCreateLevel ( _In_ DWORD  dwScopeId,
_In_ DWORD  dwLevelId,
_In_ DWORD  OpenFlags,
_Outptr_ SAFER_LEVEL_HANDLE *  pLevelHandle,
_Reserved_ PVOID  pReserved 
)

Definition at line 23 of file safer.c.

29 {
30  FIXME("(%lu, %lu, %lu, %p, %p) stub\n", dwScopeId, dwLevelId, OpenFlags, pLevelHandle, pReserved);
31  *pLevelHandle = (SAFER_LEVEL_HANDLE)0x42;
32  return TRUE;
33 }
#define TRUE
Definition: types.h:120
#define FIXME(fmt,...)
Definition: debug.h:110

◆ SaferGetLevelInformation()

BOOL WINAPI SaferGetLevelInformation ( _In_ SAFER_LEVEL_HANDLE  LevelHandle,
_In_ SAFER_OBJECT_INFO_CLASS  dwInfoType,
_Out_writes_bytes_opt_(dwInBufferSize) PVOID  pQueryBuffer,
_In_ DWORD  dwInBufferSize,
_Out_ PDWORD  pdwOutBufferSize 
)

◆ SaferGetPolicyInformation()

BOOL WINAPI SaferGetPolicyInformation ( _In_ DWORD  dwScopeId,
_In_ SAFER_POLICY_INFO_CLASS  SaferPolicyInfoClass,
_In_ DWORD  InfoBufferSize,
_Out_writes_bytes_opt_(InfoBufferSize) PVOID  InfoBuffer,
_Out_ PDWORD  InfoBufferRetSize,
_Reserved_ PVOID  pReserved 
)

Definition at line 119 of file safer.c.

126 {
127  FIXME("(%lu, %d, %lu, %p, %p, %p) stub\n", dwScopeId, SaferPolicyInfoClass, InfoBufferSize, InfoBuffer, InfoBufferRetSize, pReserved);
129  return FALSE;
130 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ SaferIdentifyLevel()

BOOL WINAPI SaferIdentifyLevel ( _In_ DWORD  dwNumProperties,
_In_reads_opt_(dwNumProperties) PSAFER_CODE_PROPERTIES  pCodeProperties,
_Outptr_ SAFER_LEVEL_HANDLE *  pLevelHandle,
_Reserved_ PVOID  pReserved 
)

Definition at line 43 of file safer.c.

48 {
49  DWORD i;
50 
51  if (pLevelHandle == NULL)
52  {
54  return FALSE;
55  }
56 
57  for (i = 0; i < dwNumProperties; i++)
58  {
59  if (pCodeProperties[i].cbSize != sizeof(SAFER_CODE_PROPERTIES_V1))
60  {
62  return FALSE;
63  }
64  }
65 
66  FIXME("(%lu, %p, %p, %p) stub\n", dwNumProperties, pCodeProperties, pLevelHandle, pReserved);
67 
68  *pLevelHandle = (SAFER_LEVEL_HANDLE)0x42;
69  return TRUE;
70 }
#define TRUE
Definition: types.h:120
#define ERROR_BAD_LENGTH
Definition: winerror.h:127
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ERROR_NOACCESS
Definition: winerror.h:578
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409

◆ SaferiIsExecutableFileType()

BOOL WINAPI SaferiIsExecutableFileType ( _In_ PCWSTR  szFullPath,
_In_ BOOLEAN  bFromShellExecute 
)

◆ SaferRecordEventLogEntry()

BOOL WINAPI SaferRecordEventLogEntry ( _In_ SAFER_LEVEL_HANDLE  hLevel,
_In_ PCWSTR  szTargetPath,
_Reserved_ PVOID  pReserved 
)

Definition at line 170 of file safer.c.

174 {
175  FIXME("(%p, %s, %p) stub\n", hLevel, wine_dbgstr_w(szTargetPath), pReserved);
177  return FALSE;
178 }
#define wine_dbgstr_w
Definition: kernel32.h:34
#define FIXME(fmt,...)
Definition: debug.h:110
#define SetLastError(x)
Definition: compat.h:409
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92

◆ SaferSetLevelInformation()

BOOL WINAPI SaferSetLevelInformation ( _In_ SAFER_LEVEL_HANDLE  LevelHandle,
_In_ SAFER_OBJECT_INFO_CLASS  dwInfoType,
_In_reads_bytes_(dwInBufferSize) PVOID  pQueryBuffer,
_In_ DWORD  dwInBufferSize 
)

◆ SaferSetPolicyInformation()

BOOL WINAPI SaferSetPolicyInformation ( _In_ DWORD  dwScopeId,
_In_ SAFER_POLICY_INFO_CLASS  SaferPolicyInfoClass,
_In_ DWORD  InfoBufferSize,
_In_reads_bytes_(InfoBufferSize) PVOID  InfoBuffer,
_Reserved_ PVOID  pReserved 
)

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( advapi  )