Author: akhaldi
Date: Fri Dec 6 23:30:49 2013
New Revision: 61238
URL:
http://svn.reactos.org/svn/reactos?rev=61238&view=rev
Log:
[RPCRT4_WINETEST]
* Sync with Wine 1.7.1.
CORE-7469
Modified:
trunk/rostests/winetests/rpcrt4/ndr_marshall.c
trunk/rostests/winetests/rpcrt4/rpc.c
trunk/rostests/winetests/rpcrt4/testlist.c
Modified: trunk/rostests/winetests/rpcrt4/ndr_marshall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/ndr_mars…
==============================================================================
--- trunk/rostests/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] Fri Dec 6 23:30:49 2013
@@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdarg.h>
-
#define _WIN32_WINNT 0x0500
#define NTDDI_WIN2K 0x05000000
#define NTDDI_VERSION NTDDI_WIN2K /* for some MIDL_STUB_MESSAGE fields */
+
+#include <stdarg.h>
#include "wine/test.h"
#include <windef.h>
Modified: trunk/rostests/winetests/rpcrt4/rpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/rpc.c?re…
==============================================================================
--- trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] Fri Dec 6 23:30:49 2013
@@ -28,10 +28,12 @@
#include <winbase.h>
#include <winnt.h>
#include <winerror.h>
-#include <ntsecapi.h>
#include "rpc.h"
#include "rpcdce.h"
+#include "secext.h"
+
+typedef long NTSTATUS;
typedef unsigned int unsigned32;
typedef struct twr_t
@@ -814,6 +816,7 @@
if (version == 1)
{
UUID guid2;
+ char buf[39];
if (!ret)
{
@@ -821,7 +824,8 @@
* address in the uuid:
*/
ok(!(guid1.Data4[2] & 0x01),
- "GUID does not appear to contain a MAC address\n");
+ "GUID does not appear to contain a MAC address: %s\n",
+ printGuid(buf, sizeof(buf), &guid1));
}
else
{
@@ -829,7 +833,8 @@
* address in the uuid:
*/
ok((guid1.Data4[2] & 0x01),
- "GUID does not appear to contain a multicast MAC address\n");
+ "GUID does not appear to contain a multicast MAC address:
%s\n",
+ printGuid(buf, sizeof(buf), &guid1));
}
/* Generate another GUID, and make sure its MAC address matches the
* first.
@@ -840,7 +845,8 @@
version = (guid2.Data3 & 0xf000) >> 12;
ok(version == 1, "unexpected version %d\n", version);
ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)),
- "unexpected value in MAC address\n");
+ "unexpected value in MAC address: %s\n",
+ printGuid(buf, sizeof(buf), &guid2));
}
}
@@ -853,6 +859,59 @@
ok(status == RPC_S_INVALID_BINDING,
"RpcBindingFree should have returned RPC_S_INVALID_BINDING instead of
%d\n",
status);
+}
+
+static void test_RpcServerInqDefaultPrincName(void)
+{
+ RPC_STATUS ret;
+ RPC_CSTR principal, saved_principal;
+ BOOLEAN (WINAPI *pGetUserNameExA)(EXTENDED_NAME_FORMAT,LPSTR,PULONG);
+ char *username;
+ ULONG len = 0;
+
+ pGetUserNameExA = (void *)GetProcAddress( LoadLibraryA("secur32.dll"),
"GetUserNameExA" );
+ if (!pGetUserNameExA)
+ {
+ win_skip( "GetUserNameExA not exported\n" );
+ return;
+ }
+ pGetUserNameExA( NameSamCompatible, NULL, &len );
+ username = HeapAlloc( GetProcessHeap(), 0, len );
+ pGetUserNameExA( NameSamCompatible, username, &len );
+
+ ret = RpcServerInqDefaultPrincNameA( 0, NULL );
+ ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret );
+
+ ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_DEFAULT, NULL );
+ ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret );
+
+ principal = (RPC_CSTR)0xdeadbeef;
+ ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_DEFAULT, &principal );
+ ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret );
+ ok( principal == (RPC_CSTR)0xdeadbeef, "got unexpected principal\n" );
+
+ saved_principal = (RPC_CSTR)0xdeadbeef;
+ ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_WINNT, &saved_principal );
+ ok( ret == RPC_S_OK, "got %u\n", ret );
+ ok( saved_principal != (RPC_CSTR)0xdeadbeef, "expected valid principal\n"
);
+ ok( !strcmp( (const char *)saved_principal, username ), "got
\'%s\'\n", saved_principal );
+ trace("%s\n", saved_principal);
+
+ ret = RpcServerRegisterAuthInfoA( (RPC_CSTR)"wine\\test",
RPC_C_AUTHN_WINNT, NULL, NULL );
+ ok( ret == RPC_S_OK, "got %u\n", ret );
+
+ principal = (RPC_CSTR)0xdeadbeef;
+ ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_WINNT, &principal );
+ ok( ret == RPC_S_OK, "got %u\n", ret );
+ ok( principal != (RPC_CSTR)0xdeadbeef, "expected valid principal\n" );
+ ok( !strcmp( (const char *)principal, username ), "got \'%s\'\n",
principal );
+ RpcStringFree( &principal );
+
+ ret = RpcServerRegisterAuthInfoA( saved_principal, RPC_C_AUTHN_WINNT, NULL, NULL );
+ ok( ret == RPC_S_OK, "got %u\n", ret );
+
+ RpcStringFree( &saved_principal );
+ HeapFree( GetProcessHeap(), 0, username );
}
START_TEST( rpc )
@@ -868,4 +927,5 @@
test_UuidCreate();
test_UuidCreateSequential();
test_RpcBindingFree();
-}
+ test_RpcServerInqDefaultPrincName();
+}
Modified: trunk/rostests/winetests/rpcrt4/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/testlist…
==============================================================================
--- trunk/rostests/winetests/rpcrt4/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/rpcrt4/testlist.c [iso-8859-1] Fri Dec 6 23:30:49 2013
@@ -1,10 +1,7 @@
/* Automatically generated file; DO NOT EDIT!! */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
#define STANDALONE
-#include "wine/test.h"
+#include <wine/test.h>
extern void func_cstub(void);
extern void func_generated(void);