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:
parent
54f47c45b8
commit
6fbbfc4462
@ -79,6 +79,7 @@ struct dcesrv_call_state {
|
||||
} *replies;
|
||||
};
|
||||
|
||||
#define DCESRV_HANDLE_ANY 255
|
||||
|
||||
/* a dcerpc handle in internal format */
|
||||
struct dcesrv_handle {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user