r4630: for ncacn_np if we don't have an explicit request for one of the
[samba.git] / source4 / librpc / rpc / dcerpc_util.c
index 534c17678d9e22f9500903044e1cb8455b58830f..992368777c8ce5240e72f00be23ef10ff23b5f2b 100644 (file)
@@ -882,6 +882,10 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **pp,
                talloc_free(p);
                return status;
        }
+
+       if (!(binding->flags & DCERPC_AUTH_OPTIONS)) {
+               username = NULL;
+       }
        
        status = dcerpc_pipe_auth(p, binding, pipe_uuid, pipe_version, domain, username, password);
        if (!NT_STATUS_IS_OK(status)) {