diff options
author | Gerald Carter <jerry@samba.org> | 2002-10-04 04:10:23 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-10-04 04:10:23 +0000 |
commit | 36ef82a52953384acedbd51f54ded9357fa8ca3e (patch) | |
tree | 3e74148ba7567a89a444347c8d3b49922e7f9844 /source3/rpc_server | |
parent | 474340e4403648812e7d8eb9eeb4c4111afbf725 (diff) | |
download | samba-36ef82a52953384acedbd51f54ded9357fa8ca3e.tar.gz samba-36ef82a52953384acedbd51f54ded9357fa8ca3e.tar.bz2 samba-36ef82a52953384acedbd51f54ded9357fa8ca3e.zip |
merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
(This used to be commit 1cfd2ee433305e91e87804dd55d10e025d30a69e)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 41 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 2 |
2 files changed, 33 insertions, 10 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; } diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 12d6639348..41ef599a3c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -2375,7 +2375,7 @@ static BOOL spoolss_connect_to_client(struct cli_state *the_cli, char *remote_ma * Now start the NT Domain stuff :-). */ - if(cli_nt_session_open(the_cli, PIPE_SPOOLSS) == False) { + if(cli_nt_session_open(the_cli, PI_SPOOLSS) == False) { DEBUG(0,("connect_to_client: unable to open the domain client session to machine %s. Error was : %s.\n", remote_machine, cli_errstr(the_cli))); cli_nt_session_close(the_cli); cli_ulogoff(the_cli); |