Author: jra
Date: 2005-08-25 01:02:14 +0000 (Thu, 25 Aug 2005)
New Revision: 9601

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9601

Log:
Ensure we become the authenticated user for all NTLMSSP auth types.
Jeremy.

Modified:
   trunk/source/rpc_server/srv_pipe.c


Changeset:
Modified: trunk/source/rpc_server/srv_pipe.c
===================================================================
--- trunk/source/rpc_server/srv_pipe.c  2005-08-25 00:57:21 UTC (rev 9600)
+++ trunk/source/rpc_server/srv_pipe.c  2005-08-25 01:02:14 UTC (rev 9601)
@@ -2081,13 +2081,17 @@
 BOOL api_pipe_request(pipes_struct *p)
 {
        BOOL ret = False;
+       BOOL changed_user = False;
        PIPE_RPC_FNS *pipe_fns;
        
-       if (p->pipe_bound && p->auth.auth_type == PIPE_AUTH_TYPE_NTLMSSP) {
+       if (p->pipe_bound &&
+                       ((p->auth.auth_type == PIPE_AUTH_TYPE_NTLMSSP) ||
+                        (p->auth.auth_type == PIPE_AUTH_TYPE_SPNEGO_NTLMSSP))) 
{
                if(!become_authenticated_pipe_user(p)) {
                        prs_mem_free(&p->out_data.rdata);
                        return False;
                }
+               changed_user = True;
        }
 
        DEBUG(5, ("Requested \\PIPE\\%s\n", p->name));
@@ -2106,7 +2110,7 @@
                        p->hdr_req.context_id, p->name));
        }
 
-       if (p->pipe_bound && p->auth.auth_type == PIPE_AUTH_TYPE_NTLMSSP) {
+       if (changed_user) {
                unbecome_authenticated_pipe_user();
        }
 

Reply via email to