advapi32: Added SaferCreateLevel stub
Nikolay Sivov
bunglehead at gmail.com
Thu Jan 15 00:35:04 CST 2009
http://bugs.winehq.org/show_bug.cgi?id=13571
Changelog:
- added SaferCreateLevel stub. Should help to move further with this bug.
>From 7f8342e403edfec031f817b4c6b3fe5a7138af7c Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Thu, 15 Jan 2009 09:30:11 +0300
Subject: Added SaferCreateLevel stub
---
dlls/advapi32/Makefile.in | 1 +
dlls/advapi32/advapi32.spec | 2 +-
dlls/advapi32/safer.c | 38 ++++++++++++++++++++++++++++++++++++++
include/winsafer.h | 40 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 80 insertions(+), 1 deletions(-)
create mode 100644 dlls/advapi32/safer.c
create mode 100644 include/winsafer.h
diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in
index d9236dc..6efc37b 100644
--- a/dlls/advapi32/Makefile.in
+++ b/dlls/advapi32/Makefile.in
@@ -22,6 +22,7 @@ C_SRCS = \
eventlog.c \
lsa.c \
registry.c \
+ safer.c \
security.c \
service.c
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 3140f62..219e3d1 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -540,7 +540,7 @@
@ stdcall RevertToSelf()
# @ stub SaferCloseLevel
# @ stub SaferComputeTokenFromLevel
-# @ stub SaferCreateLevel
+@ stdcall SaferCreateLevel(long long long ptr ptr)
# @ stub SaferGetLevelInformation
# @ stub SaferGetPolicyInformation
# @ stub SaferIdentifyLevel
diff --git a/dlls/advapi32/safer.c b/dlls/advapi32/safer.c
new file mode 100644
index 0000000..946002d
--- /dev/null
+++ b/dlls/advapi32/safer.c
@@ -0,0 +1,38 @@
+/*
+ * 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 <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winsafer.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(advapi);
+
+/******************************************************************************
+ * SaferCreateLevel [ADVAPI32.@]
+ */
+BOOL WINAPI SaferCreateLevel(DWORD ScopeId, DWORD LevelId, DWORD OpenFlags,
+ SAFER_LEVEL_HANDLE* LevelHandle, LPVOID lpReserved)
+{
+ FIXME("(%u, %x, %u, %p, %p) stub\n", ScopeId, LevelId, OpenFlags, LevelHandle, lpReserved);
+ return FALSE;
+}
diff --git a/include/winsafer.h b/include/winsafer.h
new file mode 100644
index 0000000..206e4f4
--- /dev/null
+++ b/include/winsafer.h
@@ -0,0 +1,40 @@
+/*
+ * Winsafer definitions
+ *
+ * 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_WINSAFER_H
+#define __WINE_WINSAFER_H
+
+DECLARE_HANDLE(SAFER_LEVEL_HANDLE);
+
+#define SAFER_SCOPEID_MACHINE 1
+#define SAFER_SCOPEID_USER 2
+
+#define SAFER_LEVELID_DISALLOWED 0x00000
+#define SAFER_LEVELID_UNTRUSTED 0x01000
+#define SAFER_LEVELID_CONSTRAINED 0x10000
+#define SAFER_LEVELID_NORMALUSER 0x20000
+#define SAFER_LEVELID_FULLYTRUSTED 0x40000
+
+#define SAFER_LEVEL_OPEN 1
+
+WINADVAPI BOOL WINAPI SaferCreateLevel(DWORD ScopeId, DWORD LevelId, DWORD OpenFlags,
+ SAFER_LEVEL_HANDLE* LevelHandle, LPVOID lpReserved);
+
+#endif /* __WINE_WINSAFER_H */
--
1.5.6.5
More information about the wine-patches
mailing list