#include "librpc/rpc/rpc_common.h"
#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/security.h"
/* modules can use the following to determine if the interface has changed
* please increment the version number after each interface change
struct dcesrv_handle *next, *prev;
struct dcesrv_assoc_group *assoc_group;
struct policy_handle wire_handle;
- struct dom_sid *sid;
+ struct dom_sid sid;
enum dcerpc_AuthLevel min_auth_level;
const struct dcesrv_interface *iface;
void *data;
return NULL;
}
h->data = NULL;
- h->sid = dom_sid_dup(h, sid);
- if (h->sid == NULL) {
- talloc_free(h);
- return NULL;
- }
+ sid_copy(&h->sid, sid);
h->min_auth_level = call->auth_state->auth_level;
h->assoc_group = context->conn->assoc_group;
h->iface = context->iface;
p->handle_type, handle_type));
return NULL;
}
- if (!dom_sid_equal(h->sid, sid)) {
+ if (!dom_sid_equal(&h->sid, sid)) {
struct dom_sid_buf buf1, buf2;
DBG_ERR("Attempt to use invalid sid %s - %s\n",
- dom_sid_str_buf(h->sid, &buf1),
+ dom_sid_str_buf(&h->sid, &buf1),
dom_sid_str_buf(sid, &buf2));
return NULL;
}