1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

s4:dsdb: Remove unused ‘domain_dn’ parameter

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Jo Sutton 2024-01-20 12:01:30 +13:00 committed by Andrew Bartlett
parent 470a9838e1
commit ed37c6f23b
4 changed files with 7 additions and 26 deletions

View File

@ -2584,7 +2584,7 @@ static NTSTATUS samdb_set_password_request(struct ldb_context *ldb, TALLOC_CTX *
* NT_STATUS_ACCESS_DENIED, NT_STATUS_ACCOUNT_LOCKED_OUT, NT_STATUS_NO_MEMORY
*/
static NTSTATUS samdb_set_password_internal(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
struct ldb_dn *user_dn, struct ldb_dn *domain_dn,
struct ldb_dn *user_dn,
const DATA_BLOB *new_password,
const struct samr_Password *ntNewHash,
enum dsdb_password_checked old_password_checked,
@ -2692,7 +2692,7 @@ static NTSTATUS samdb_set_password_internal(struct ldb_context *ldb, TALLOC_CTX
}
NTSTATUS samdb_set_password(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
struct ldb_dn *user_dn, struct ldb_dn *domain_dn,
struct ldb_dn *user_dn,
const DATA_BLOB *new_password,
const struct samr_Password *ntNewHash,
enum dsdb_password_checked old_password_checked,
@ -2700,7 +2700,7 @@ NTSTATUS samdb_set_password(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
struct samr_DomInfo1 **_dominfo)
{
return samdb_set_password_internal(ldb, mem_ctx,
user_dn, domain_dn,
user_dn,
new_password,
ntNewHash,
old_password_checked,
@ -3087,7 +3087,7 @@ NTSTATUS samdb_set_password_sid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
}
nt_status = samdb_set_password_internal(ldb, mem_ctx,
user_msg->dn, NULL,
user_msg->dn,
new_password,
ntNewHash,
old_password_checked,

View File

@ -221,7 +221,6 @@ NTSTATUS kpasswd_samdb_set_password(TALLOC_CTX *mem_ctx,
status = samdb_set_password(samdb,
mem_ctx,
target_dn,
NULL, /* domain_dn */
password,
NULL, /* ntNewHash */
DSDB_PASSWORD_RESET,

View File

@ -3726,7 +3726,6 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
status = samr_set_password_buffers(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
r->in.info->info18.lm_pwd_active ? r->in.info->info18.lm_pwd.hash : NULL,
r->in.info->info18.nt_pwd_active ? r->in.info->info18.nt_pwd.hash : NULL);
@ -3828,7 +3827,6 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
status = samr_set_password_buffers(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
lm_pwd_hash,
nt_pwd_hash);
@ -3914,14 +3912,12 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
status = samr_set_password(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info23.password);
} else IFSET(SAMR_FIELD_LM_PASSWORD_PRESENT) {
status = samr_set_password(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info23.password);
}
@ -3951,7 +3947,6 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
status = samr_set_password(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info24.password);
if (!NT_STATUS_IS_OK(status)) {
@ -4027,14 +4022,12 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
status = samr_set_password_ex(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info25.password);
} else IFSET(SAMR_FIELD_LM_PASSWORD_PRESENT) {
status = samr_set_password_ex(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info25.password);
}
@ -4064,7 +4057,6 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
status = samr_set_password_ex(dce_call,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
mem_ctx,
&r->in.info->info26.password);
if (!NT_STATUS_IS_OK(status)) {
@ -4100,7 +4092,6 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
&session_key,
sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
&r->in.info->info31.password,
DSDB_PASSWORD_RESET);
if (!NT_STATUS_IS_OK(status)) {
@ -4254,7 +4245,6 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
&session_key,
a_state->sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
&r->in.info->info32.password,
DSDB_PASSWORD_RESET);
}
@ -4266,7 +4256,6 @@ static NTSTATUS dcesrv_samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALL
&session_key,
a_state->sam_ctx,
a_state->account_dn,
a_state->domain_state->domain_dn,
&r->in.info->info32.password,
DSDB_PASSWORD_RESET);
}

View File

@ -239,7 +239,6 @@ NTSTATUS dcesrv_samr_ChangePasswordUser4(struct dcesrv_call_state *dce_call,
&cdk,
sam_ctx,
dn,
NULL,
r->in.password,
DSDB_PASSWORD_CHECKED_AND_CORRECT);
BURN_DATA(cdk_data);
@ -459,7 +458,7 @@ static NTSTATUS dcesrv_samr_ChangePasswordUser_impl(struct dcesrv_call_state *dc
* from the database since they were already checked against the user-
* provided ones. */
status = samdb_set_password(sam_ctx, mem_ctx,
user_dn, NULL,
user_dn,
&new_password,
NULL,
DSDB_PASSWORD_CHECKED_AND_CORRECT,
@ -575,7 +574,7 @@ NTSTATUS dcesrv_samr_ChangePasswordUser2(struct dcesrv_call_state *dce_call,
*/
NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
struct ldb_context *sam_ctx,
struct ldb_dn *account_dn, struct ldb_dn *domain_dn,
struct ldb_dn *account_dn,
TALLOC_CTX *mem_ctx,
struct samr_CryptPassword *pwbuf)
{
@ -643,7 +642,6 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
nt_status = samdb_set_password(sam_ctx,
mem_ctx,
account_dn,
domain_dn,
&new_password,
NULL,
DSDB_PASSWORD_RESET,
@ -660,7 +658,6 @@ out:
NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call,
struct ldb_context *sam_ctx,
struct ldb_dn *account_dn,
struct ldb_dn *domain_dn,
TALLOC_CTX *mem_ctx,
struct samr_CryptPasswordEx *pwbuf)
{
@ -713,7 +710,6 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call,
nt_status = samdb_set_password(sam_ctx,
mem_ctx,
account_dn,
domain_dn,
&new_password,
NULL,
DSDB_PASSWORD_RESET,
@ -732,7 +728,6 @@ out:
NTSTATUS samr_set_password_buffers(struct dcesrv_call_state *dce_call,
struct ldb_context *sam_ctx,
struct ldb_dn *account_dn,
struct ldb_dn *domain_dn,
TALLOC_CTX *mem_ctx,
const uint8_t *lm_pwd_hash,
const uint8_t *nt_pwd_hash)
@ -778,7 +773,7 @@ NTSTATUS samr_set_password_buffers(struct dcesrv_call_state *dce_call,
if ((d_lm_pwd_hash != NULL) || (d_nt_pwd_hash != NULL)) {
nt_status = samdb_set_password(sam_ctx, mem_ctx, account_dn,
domain_dn, NULL,
NULL,
d_nt_pwd_hash,
DSDB_PASSWORD_RESET,
NULL, NULL);
@ -792,7 +787,6 @@ NTSTATUS samr_set_password_aes(struct dcesrv_call_state *dce_call,
const DATA_BLOB *cdk,
struct ldb_context *sam_ctx,
struct ldb_dn *account_dn,
struct ldb_dn *domain_dn,
struct samr_EncryptedPasswordAES *pwbuf,
enum dsdb_password_checked old_password_checked)
{
@ -829,7 +823,6 @@ NTSTATUS samr_set_password_aes(struct dcesrv_call_state *dce_call,
nt_status = samdb_set_password(sam_ctx,
mem_ctx,
account_dn,
domain_dn,
&new_password,
NULL,
old_password_checked,