summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-10-04 03:51:43 +0000
committerGerald Carter <jerry@samba.org>2002-10-04 03:51:43 +0000
commit83e58265b5595f5268bbcbda1a078a81d6fd5a40 (patch)
treea70b9f8b36df2cc9e634c042e30c309b31046ad1 /source3/rpc_server/srv_pipe.c
parenta237fb349aba013aec8367d4a1b435b60b0c8458 (diff)
downloadsamba-83e58265b5595f5268bbcbda1a078a81d6fd5a40.tar.gz
samba-83e58265b5595f5268bbcbda1a078a81d6fd5a40.tar.bz2
samba-83e58265b5595f5268bbcbda1a078a81d6fd5a40.zip
merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD (This used to be commit 38c9e4299845fd77cc8629945ce2d259489f7437)
Diffstat (limited to 'source3/rpc_server/srv_pipe.c')
-rw-r--r--source3/rpc_server/srv_pipe.c41
1 files changed, 32 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 1947d5514e..5a935be279 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -681,26 +681,49 @@ BOOL check_bind_req(char* pipe_name, RPC_IFACE* abstract,
fstrcpy(pname,"\\PIPE\\");
fstrcat(pname,pipe_name);
- for(i=0;pipe_names[i].client_pipe; i++) {
- if(strequal(pipe_names[i].client_pipe, pname))
+
+#ifndef SUPPORT_NEW_LSARPC_UUID
+
+ /* check for the first pipe matching the name */
+
+ for ( i=0; pipe_names[i].client_pipe; i++ ) {
+ if ( strequal(pipe_names[i].client_pipe, pname) )
+ break;
+ }
+#else
+ /* we have to check all now since win2k introduced a new UUID on the lsaprpc pipe */
+
+ for ( i=0; pipe_names[i].client_pipe; i++ )
+ {
+ if ( strequal(pipe_names[i].client_pipe, pname)
+ && (abstract->version == pipe_names[i].abstr_syntax.version)
+ && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(RPC_UUID)) == 0)
+ && (transfer->version == pipe_names[i].trans_syntax.version)
+ && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(RPC_UUID)) == 0) )
+ {
break;
+ }
}
+#endif
if(pipe_names[i].client_pipe == NULL)
return False;
+#ifndef SUPPORT_NEW_LSARPC_UUID
/* check the abstract interface */
- if((abstract->version != pipe_names[i].abstr_syntax.version) ||
- (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid,
- sizeof(RPC_UUID)) != 0))
+ if ( (abstract->version != pipe_names[i].abstr_syntax.version)
+ || (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(RPC_UUID)) != 0) )
+ {
return False;
+ }
/* check the transfer interface */
- if((transfer->version != pipe_names[i].trans_syntax.version) ||
- (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid,
- sizeof(RPC_UUID)) != 0))
+ if ( (transfer->version != pipe_names[i].trans_syntax.version)
+ || (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(RPC_UUID)) != 0) )
+ {
return False;
-
+ }
+#endif
return True;
}