[RPCRT4_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
[reactos.git] / rostests / winetests / rpcrt4 / rpc.c
index d55a925..8ee3e12 100644 (file)
@@ -429,13 +429,10 @@ static void test_I_RpcMapWin32Status(void)
     RPC_STATUS rpc_status;
     BOOL w2k3_up = FALSE;
 
-    /* Windows 2003 and Vista return STATUS_UNSUCCESSFUL if given an unknown status */
+    /* Windows 2003 and above return STATUS_UNSUCCESSFUL if given an unknown status */
     win32status = I_RpcMapWin32Status(9999);
     if (win32status == STATUS_UNSUCCESSFUL)
-    {
-        trace("We are on Windows 2003 or Vista\n");
         w2k3_up = TRUE;
-    }
 
     /* On Windows XP-SP1 and below some statuses are not mapped and return
      * the given status
@@ -810,7 +807,7 @@ static void test_UuidCreateSequential(void)
             /* If the call succeeded, there's a valid (non-multicast) MAC
              * address in the uuid:
              */
-            ok(!(guid1.Data4[2] & 0x01),
+            ok(!(guid1.Data4[2] & 0x01) || broken(guid1.Data4[2] & 0x01), /* Win 8.1 */
                "GUID does not appear to contain a MAC address: %s\n",
                wine_dbgstr_guid(&guid1));
         }
@@ -860,19 +857,12 @@ 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 );
+    GetUserNameExA( NameSamCompatible, NULL, &len );
     username = HeapAlloc( GetProcessHeap(), 0, len );
-    pGetUserNameExA( NameSamCompatible, username, &len );
+    GetUserNameExA( NameSamCompatible, username, &len );
 
     ret = RpcServerInqDefaultPrincNameA( 0, NULL );
     ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret );
@@ -909,6 +899,14 @@ static void test_RpcServerInqDefaultPrincName(void)
     HeapFree( GetProcessHeap(), 0, username );
 }
 
+static void test_RpcServerRegisterAuthInfo(void)
+{
+    RPC_STATUS status;
+
+    status = RpcServerRegisterAuthInfoW(NULL, 600, NULL, NULL);
+    ok(status == RPC_S_UNKNOWN_AUTHN_SERVICE, "status = %x\n", status);
+}
+
 START_TEST( rpc )
 {
     UuidConversionAndComparison();
@@ -923,4 +921,5 @@ START_TEST( rpc )
     test_UuidCreateSequential();
     test_RpcBindingFree();
     test_RpcServerInqDefaultPrincName();
+    test_RpcServerRegisterAuthInfo();
 }