void _clusapi_OpenNodeEx(struct pipes_struct *p,
struct clusapi_OpenNodeEx *r)
{
- p->fault_state = DCERPC_FAULT_OP_RNG_ERROR;
+ struct clusapi_handle *h;
+ bool ok;
+
+ if (p->auth.auth_level < DCERPC_AUTH_LEVEL_PRIVACY) {
+ p->fault_state = DCERPC_FAULT_ACCESS_DENIED;
+ *r->out.Status = WERR_ACCESS_DENIED;
+ return;
+ }
+
+ h = talloc_zero(p, struct clusapi_handle);
+ if (h == NULL) {
+ *r->out.Status = WERR_NOT_ENOUGH_MEMORY;
+ return;
+ }
+
+ h->type = CLUSAPI_HANDLE_TYPE_NODE;
+
+ ok = create_policy_hnd(p, r->out.hNode, h);
+ if (!ok) {
+ *r->out.Status = WERR_FOOBAR;
+ return;
+ }
+
+ *r->out.lpdwGrantedAccess = CLUSAPI_GENERIC_ALL;
+ *r->out.Status = WERR_OK;
}