This makes the NDR namespace a bit clearer, in preparation of ABI checking.
enum ndr_err_code ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r);
enum ndr_err_code ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r);
void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r);
-bool policy_handle_empty(const struct policy_handle *h);
+bool ndr_policy_handle_empty(const struct policy_handle *h);
bool is_valid_policy_hnd(const struct policy_handle *hnd);
bool ndr_policy_handle_equal(const struct policy_handle *hnd1,
const struct policy_handle *hnd2);
guid->node[4], guid->node[5]);
}
-_PUBLIC_ bool policy_handle_empty(const struct policy_handle *h)
+_PUBLIC_ bool ndr_policy_handle_empty(const struct policy_handle *h)
{
return (h->handle_type == 0 && GUID_all_zero(&h->uuid));
}
_PUBLIC_ bool is_valid_policy_hnd(const struct policy_handle *hnd)
{
- return !policy_handle_empty(hnd);
+ return !ndr_policy_handle_empty(hnd);
}
_PUBLIC_ bool ndr_policy_handle_equal(const struct policy_handle *hnd1,
r->in.max_ents));
if (r->in.entry_handle == NULL ||
- policy_handle_empty(r->in.entry_handle)) {
+ ndr_policy_handle_empty(r->in.entry_handle)) {
struct GUID *obj;
char *srv_addr = NULL;
}
if (r->in.entry_handle == NULL ||
- policy_handle_empty(r->in.entry_handle)) {
+ ndr_policy_handle_empty(r->in.entry_handle)) {
struct GUID *obj;
char *srv_addr = NULL;
/* libnet context's domain handle is not empty, so check out what
was opened first, before doing anything */
- if (!policy_handle_empty(&ctx->samr.handle)) {
+ if (!ndr_policy_handle_empty(&ctx->samr.handle)) {
if (strequal(ctx->samr.name, io->in.domain_name) &&
ctx->samr.access_mask == io->in.access_mask) {
* if it's not been explicitly specified.
*/
- if (policy_handle_empty(&ctx->samr.handle)) {
+ if (ndr_policy_handle_empty(&ctx->samr.handle)) {
domain_open->in.type = DOMAIN_SAMR;
domain_open->in.domain_name = cli_credentials_get_domain(ctx->cred);
domain_open->in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
* opening a new domain otherwise.
*/
- if (policy_handle_empty(&ctx->samr.handle) ||
+ if (ndr_policy_handle_empty(&ctx->samr.handle) ||
!strequal(domain_name, ctx->samr.name)) {
domain_open->in.type = DOMAIN_SAMR;
domain_open->in.domain_name = domain_name;
* if it's not been explicitly specified.
*/
- if (policy_handle_empty(&ctx->lsa.handle)) {
+ if (ndr_policy_handle_empty(&ctx->lsa.handle)) {
domain_open->in.type = DOMAIN_LSA;
domain_open->in.domain_name = cli_credentials_get_domain(ctx->cred);
domain_open->in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
* opening a new domain otherwise.
*/
- if (policy_handle_empty(&ctx->lsa.handle) ||
+ if (ndr_policy_handle_empty(&ctx->lsa.handle) ||
!strequal(domain_name, ctx->lsa.name)) {
domain_open->in.type = DOMAIN_LSA;
domain_open->in.domain_name = domain_name;
sid = &context->conn->auth_state.session_info->security_token->sids[PRIMARY_USER_SID_INDEX];
- if (policy_handle_empty(p)) {
+ if (ndr_policy_handle_empty(p)) {
/* TODO: we should probably return a NULL handle here */
return dcesrv_handle_new(context, handle_type);
}
} while (NT_STATUS_IS_OK(status) &&
r.out.result == EPMAPPER_STATUS_OK &&
*r.out.num_ents == r.in.max_ents &&
- !policy_handle_empty(&entry_handle));
+ !ndr_policy_handle_empty(&entry_handle));
torture_assert_ntstatus_ok(tctx, status, "epm_Map_simple failed");
torture_assert(tctx,
- policy_handle_empty(&entry_handle),
+ ndr_policy_handle_empty(&entry_handle),
"epm_Map_simple failed - The policy handle should be emtpy.");
return true;
torture_skip(tctx, "Skip Insert test against Samba4");
}
- if (policy_handle_empty(entry_handle)) {
+ if (ndr_policy_handle_empty(entry_handle)) {
torture_comment(tctx,
"epm_LookupHandleFree failed - empty policy_handle\n");
return false;
} while (NT_STATUS_IS_OK(status) &&
r.out.result == EPMAPPER_STATUS_OK &&
*r.out.num_ents == r.in.max_ents &&
- !policy_handle_empty(&entry_handle));
+ !ndr_policy_handle_empty(&entry_handle));
torture_assert_ntstatus_ok(tctx, status, "epm_Lookup failed");
torture_assert(tctx, r.out.result == EPMAPPER_STATUS_NO_MORE_ENTRIES, "epm_Lookup failed");
torture_assert(tctx,
- policy_handle_empty(&entry_handle),
+ ndr_policy_handle_empty(&entry_handle),
"epm_Lookup failed - The policy handle should be emtpy.");
return true;
Copyright (C) Andrew Tridgell 2003
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2003
+ Copyright (C) Jelmer Vernooij 2005-2007
Copyright (C) Guenther Deschner 2008-2010
This program is free software; you can redistribute it and/or modify
ret = false;
}
- if (!policy_handle_empty(&user_handle)) {
+ if (!ndr_policy_handle_empty(&user_handle)) {
torture_comment(tctx, "Testing DeleteUser (createuser2 test)\n");
d.in.user_handle = &user_handle;
default:
return false;
}
- if (!policy_handle_empty(&handles[i])) {
+ if (!ndr_policy_handle_empty(&handles[i])) {
num_created++;
}
}
for (i=0; i < num_total; i++) {
- if (policy_handle_empty(&handles[i])) {
+ if (ndr_policy_handle_empty(&handles[i])) {
continue;
}
break;
}
- if (!policy_handle_empty(&user_handle) &&
+ if (!ndr_policy_handle_empty(&user_handle) &&
!test_DeleteUser(b, tctx, &user_handle)) {
ret = false;
}
- if (!policy_handle_empty(&alias_handle) &&
+ if (!ndr_policy_handle_empty(&alias_handle) &&
!test_DeleteAlias(b, tctx, &alias_handle)) {
ret = false;
}
- if (!policy_handle_empty(&group_handle) &&
+ if (!ndr_policy_handle_empty(&group_handle) &&
!test_DeleteDomainGroup(b, tctx, &group_handle)) {
ret = false;
}