1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r374: allow for a policy_handle fetch using a handle type of

DCESRV_HANDLE_ANY. This is needed for operations like samr_Close()
that take any handle type.
This commit is contained in:
Andrew Tridgell 2004-04-27 07:12:10 +00:00 committed by Gerald (Jerry) Carter
parent 54f47c45b8
commit 6fbbfc4462
2 changed files with 3 additions and 1 deletions

View File

@ -79,6 +79,7 @@ struct dcesrv_call_state {
} *replies;
};
#define DCESRV_HANDLE_ANY 255
/* a dcerpc handle in internal format */
struct dcesrv_handle {

View File

@ -83,7 +83,8 @@ struct dcesrv_handle *dcesrv_handle_fetch(struct dcesrv_connection *dce_conn,
for (h=dce_conn->handles; h; h=h->next) {
if (h->wire_handle.handle_type == p->handle_type &&
uuid_equal(&p->uuid, &h->wire_handle.uuid)) {
if (p->handle_type != handle_type) {
if (handle_type != DCESRV_HANDLE_ANY &&
p->handle_type != handle_type) {
DEBUG(0,("client gave us the wrong handle type (%d should be %d)\n",
p->handle_type, handle_type));
return NULL;