Robert Shearman : rpcrt4: If the authorisation failed during a send then we should return ERROR_ACCESS_DENIED .

Alexandre Julliard julliard at wine.codeweavers.com
Thu May 18 03:56:51 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 2aa52b07d6f974ebdb6c3f7a5334375082e8ddfb
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=2aa52b07d6f974ebdb6c3f7a5334375082e8ddfb

Author: Robert Shearman <rob at codeweavers.com>
Date:   Thu May 18 03:39:50 2006 +0100

rpcrt4: If the authorisation failed during a send then we should return ERROR_ACCESS_DENIED.

---

 dlls/rpcrt4/rpc_message.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c
index daeb668..f279910 100644
--- a/dlls/rpcrt4/rpc_message.c
+++ b/dlls/rpcrt4/rpc_message.c
@@ -393,7 +393,10 @@ static RPC_STATUS RPCRT_AuthorizeConnect
         ISC_REQ_DELEGATE, 0, SECURITY_NETWORK_DREP,
         &inp_desc, 0, &conn->ctx, &out_desc, &conn->attr, &conn->exp);
   if (r)
-    return r;
+  {
+    WARN("InitializeSecurityContext failed with error 0x%08lx\n", r);
+    return ERROR_ACCESS_DENIED;
+  }
 
   resp_hdr = RPCRT4_BuildAuthHeader(NDR_LOCAL_DATA_REPRESENTATION);
   if (!resp_hdr)
@@ -571,8 +574,10 @@ RPC_STATUS RPCRT4_Receive(RpcConnection 
     unsigned int offset;
 
     offset = common_hdr.frag_len - hdr_length - common_hdr.auth_len;
-    RPCRT_AuthorizeConnection(Connection, (LPBYTE)pMsg->Buffer + offset,
-                              common_hdr.auth_len);
+    status = RPCRT_AuthorizeConnection(Connection, (LPBYTE)pMsg->Buffer + offset,
+                                       common_hdr.auth_len);
+    if (status)
+        goto fail;
   }
 
   /* success */




More information about the wine-cvs mailing list