diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-06-05 03:22:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:30 -0500 |
commit | 5b04ca8080708573207eb58f2c2b207780a6ea28 (patch) | |
tree | 42d7677298d96020cfa6ecdbe81211c582511bd3 /source4/rpc_server/netlogon/dcerpc_netlogon.c | |
parent | ae067cdaf70c7725237ec58b5e23bc6f525594c2 (diff) | |
download | samba-5b04ca8080708573207eb58f2c2b207780a6ea28.tar.gz samba-5b04ca8080708573207eb58f2c2b207780a6ea28.tar.bz2 samba-5b04ca8080708573207eb58f2c2b207780a6ea28.zip |
r1025: Rename (across the samr and netlogon pipes, so far)
pwd -> password
passwd -> password
username -> account_name
Also work on consistant structure feild names between these two pipes,
and fix up some callers to use samr_Password for the netlogon
credential code.
Andrew Bartlett
(This used to be commit 4e35418c2776f7b79be5b358ffd077754685d1ac)
Diffstat (limited to 'source4/rpc_server/netlogon/dcerpc_netlogon.c')
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 59 |
1 files changed, 8 insertions, 51 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index ea76be44f5..e159123c87 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -56,16 +56,6 @@ static void netlogon_unbind(struct dcesrv_connection *conn, const struct dcesrv_ #define DCESRV_INTERFACE_NETLOGON_BIND netlogon_bind #define DCESRV_INTERFACE_NETLOGON_UNBIND netlogon_unbind -/* - netr_ServerReqChallenge - - NTSTATUS netr_ServerReqChallenge( - [in] unistr *server_name, - [in] unistr computer_name, - [in,out,ref] netr_Credential *credentials - ); - -*/ static NTSTATUS netr_ServerReqChallenge(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct netr_ServerReqChallenge *r) { @@ -113,32 +103,12 @@ static NTSTATUS netr_ServerReqChallenge(struct dcesrv_call_state *dce_call, TALL return NT_STATUS_OK; } - -/* - netr_ServerAuthenticate - - secure channel types: - - const int SEC_CHAN_WKSTA = 2; - const int SEC_CHAN_DOMAIN = 4; - const int SEC_CHAN_BDC = 6; - - NTSTATUS netr_ServerAuthenticate3( - [in] unistr *server_name, - [in] unistr username, - [in] uint16 secure_channel_type, - [in] unistr computer_name, - [in,out,ref] netr_Credential *credentials - [in,out,ref] uint32 *negotiate_flags, - [out,ref] uint32 *rid - ); -*/ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct netr_ServerAuthenticate3 *r) { struct server_pipe_state *pipe_state = dce_call->conn->private; void *sam_ctx; - uint8_t *mach_pwd; + struct samr_Password *mach_pwd; uint16_t acct_flags; int num_records; struct ldb_message **msgs; @@ -162,17 +132,17 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL /* pull the user attributes */ num_records = samdb_search(sam_ctx, mem_ctx, NULL, &msgs, attrs, "(&(sAMAccountName=%s)(objectclass=user))", - r->in.username); + r->in.account_name); if (num_records == 0) { DEBUG(3,("Couldn't find user [%s] in samdb.\n", - r->in.username)); + r->in.account_name)); samdb_close(sam_ctx); return NT_STATUS_NO_SUCH_USER; } if (num_records > 1) { - DEBUG(1,("Found %d records matching user [%s]\n", num_records, r->in.username)); + DEBUG(1,("Found %d records matching user [%s]\n", num_records, r->in.account_name)); samdb_close(sam_ctx); return NT_STATUS_INTERNAL_DB_CORRUPTION; } @@ -181,7 +151,7 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL "userAccountControl"); if (acct_flags & ACB_DISABLED) { - DEBUG(1, ("Account [%s] is disabled\n", r->in.username)); + DEBUG(1, ("Account [%s] is disabled\n", r->in.account_name)); return NT_STATUS_ACCESS_DENIED; } @@ -242,7 +212,7 @@ static NTSTATUS netr_ServerAuthenticate3(struct dcesrv_call_state *dce_call, TAL talloc_free(pipe_state->mem_ctx, pipe_state->account_name); } - pipe_state->account_name = talloc_strdup(pipe_state->mem_ctx, r->in.username); + pipe_state->account_name = talloc_strdup(pipe_state->mem_ctx, r->in.account_name); if (pipe_state->computer_name) { /* We don't want a memory leak on this long-lived talloc context */ @@ -265,7 +235,7 @@ static NTSTATUS netr_ServerAuthenticate(struct dcesrv_call_state *dce_call, TALL uint32 negotiate_flags, rid; r3.in.server_name = r->in.server_name; - r3.in.username = r->in.username; + r3.in.account_name = r->in.account_name; r3.in.secure_channel_type = r->in.secure_channel_type; r3.in.computer_name = r->in.computer_name; r3.in.credentials = r->in.credentials; @@ -284,7 +254,7 @@ static NTSTATUS netr_ServerAuthenticate2(struct dcesrv_call_state *dce_call, TAL uint32 rid; r3.in.server_name = r->in.server_name; - r3.in.username = r->in.username; + r3.in.account_name = r->in.account_name; r3.in.secure_channel_type = r->in.secure_channel_type; r3.in.computer_name = r->in.computer_name; r3.in.credentials = r->in.credentials; @@ -309,20 +279,7 @@ static BOOL netr_creds_server_step_check(struct server_pipe_state *pipe_state, return_authenticator); } -/* - netr_ServerPasswordSet - - NTSTATUS netr_ServerPasswordSet( - [in] unistr *server_name, - [in] unistr username, - [in] uint16 secure_channel_type, - [in] unistr computer_name, - [in] netr_Authenticator credential, - [in] netr_Password new_password, - [out] netr_Authenticator return_authenticator - ); -*/ static NTSTATUS netr_ServerPasswordSet(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct netr_ServerPasswordSet *r) { |