diff options
-rw-r--r-- | source4/librpc/idl/samr.idl | 2 | ||||
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 22 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 8 |
3 files changed, 16 insertions, 16 deletions
diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl index 05a1fb313d..0a94756868 100644 --- a/source4/librpc/idl/samr.idl +++ b/source4/librpc/idl/samr.idl @@ -289,7 +289,7 @@ /* Function 0x0e */ NTSTATUS samr_CreateDomAlias( [in,ref] policy_handle *domain_handle, - [in,ref] samr_String *aliasname, + [in,ref] samr_String *alias_name, [in] uint32 access_mask, [out,ref] policy_handle *alias_handle, [out,ref] uint32 *rid diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 91adc84555..c2c0354a51 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -902,7 +902,7 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C struct samr_domain_state *d_state; struct samr_account_state *a_state; struct dcesrv_handle *h; - const char *aliasname, *name, *sidstr; + const char *alias_name, *name, *sidstr; struct ldb_message *msg; struct dom_sid *sid; struct dcesrv_handle *a_handle; @@ -915,9 +915,9 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C d_state = h->data; - aliasname = r->in.aliasname->string; + alias_name = r->in.alias_name->string; - if (aliasname == NULL) { + if (alias_name == NULL) { return NT_STATUS_INVALID_PARAMETER; } @@ -925,7 +925,7 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C name = samdb_search_string(d_state->sam_ctx, mem_ctx, NULL, "sAMAccountName", "(&pAMAccountName=%s)(objectclass=group))", - aliasname); + alias_name); if (name != NULL) { return NT_STATUS_ALIAS_EXISTS; @@ -937,13 +937,13 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C } /* add core elements to the ldb_message for the alias */ - msg->dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Users,%s", aliasname, + msg->dn = talloc_asprintf(mem_ctx, "CN=%s,CN=Users,%s", alias_name, d_state->domain_dn); if (!msg->dn) { return NT_STATUS_NO_MEMORY; } - samdb_msg_add_string(d_state->sam_ctx, mem_ctx, msg, "sAMAccountName", aliasname); + samdb_msg_add_string(d_state->sam_ctx, mem_ctx, msg, "sAMAccountName", alias_name); samdb_msg_add_string(d_state->sam_ctx, mem_ctx, msg, "objectClass", "group"); samdb_msg_add_string(d_state->sam_ctx, mem_ctx, msg, "groupType", "0x80000004"); @@ -973,7 +973,7 @@ static NTSTATUS samr_CreateDomAlias(struct dcesrv_call_state *dce_call, TALLOC_C return NT_STATUS_UNSUCCESSFUL; } - a_state->account_name = talloc_strdup(a_state, aliasname); + a_state->account_name = talloc_strdup(a_state, alias_name); if (!a_state->account_name) { return NT_STATUS_NO_MEMORY; } @@ -1826,7 +1826,7 @@ static NTSTATUS samr_OpenAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *m struct samr_domain_state *d_state; struct samr_account_state *a_state; struct dcesrv_handle *h; - const char *aliasname, *sidstr; + const char *alias_name, *sidstr; struct ldb_message **msgs; struct dcesrv_handle *g_handle; const char * const attrs[2] = { "sAMAccountName", NULL }; @@ -1862,8 +1862,8 @@ static NTSTATUS samr_OpenAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *m return NT_STATUS_INTERNAL_DB_CORRUPTION; } - aliasname = samdb_result_string(msgs[0], "sAMAccountName", NULL); - if (aliasname == NULL) { + alias_name = samdb_result_string(msgs[0], "sAMAccountName", NULL); + if (alias_name == NULL) { DEBUG(0,("sAMAccountName field missing for sid %s\n", sidstr)); return NT_STATUS_INTERNAL_DB_CORRUPTION; } @@ -1877,7 +1877,7 @@ static NTSTATUS samr_OpenAlias(struct dcesrv_call_state *dce_call, TALLOC_CTX *m a_state->domain_state = talloc_reference(a_state, d_state); a_state->account_dn = talloc_steal(a_state, msgs[0]->dn); a_state->account_sid = talloc_steal(a_state, sidstr); - a_state->account_name = talloc_strdup(a_state, aliasname); + a_state->account_name = talloc_strdup(a_state, alias_name); if (!a_state->account_name) { return NT_STATUS_NO_MEMORY; } diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 13a848d0b4..3f2519c239 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -1490,22 +1490,22 @@ static BOOL test_CreateAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, init_samr_String(&name, TEST_ALIASNAME); r.in.domain_handle = domain_handle; - r.in.aliasname = &name; + r.in.alias_name = &name; r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r.out.alias_handle = alias_handle; r.out.rid = &rid; - printf("Testing CreateAlias (%s)\n", r.in.aliasname->string); + printf("Testing CreateAlias (%s)\n", r.in.alias_name->string); status = dcerpc_samr_CreateDomAlias(p, mem_ctx, &r); if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) { - printf("Server refused create of '%s'\n", r.in.aliasname->string); + printf("Server refused create of '%s'\n", r.in.alias_name->string); return True; } if (NT_STATUS_EQUAL(status, NT_STATUS_ALIAS_EXISTS)) { - if (!test_DeleteAlias_byname(p, mem_ctx, domain_handle, r.in.aliasname->string)) { + if (!test_DeleteAlias_byname(p, mem_ctx, domain_handle, r.in.alias_name->string)) { return False; } status = dcerpc_samr_CreateDomAlias(p, mem_ctx, &r); |