mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 14:10:39 -05:00
In pwmod, ctx may be empty so always pass current username
This commit is contained in:
parent
b588e7e8a2
commit
20657af2de
2 changed files with 4 additions and 3 deletions
|
|
@ -266,6 +266,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hosts.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netgroup.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networks.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passwd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocols.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpc.Po@am__quote@
|
||||
|
|
|
|||
|
|
@ -532,11 +532,11 @@ int pam_sm_close_session(
|
|||
}
|
||||
|
||||
static enum nss_status pam_do_pwmod(
|
||||
pld_ctx *ctx, const char *oldpw, const char *newpw, int *errnop)
|
||||
pld_ctx *ctx, const char *user, const char *oldpw, const char *newpw, int *errnop)
|
||||
{
|
||||
NSS_BYGEN(NSLCD_ACTION_PAM_PWMOD,
|
||||
WRITE_STRING(fp,ctx->dn);
|
||||
WRITE_STRING(fp,ctx->user);
|
||||
WRITE_STRING(fp,user);
|
||||
WRITE_STRING(fp,oldpw);
|
||||
WRITE_STRING(fp,newpw),
|
||||
pam_read_authz(fp,ctx,errnop));
|
||||
|
|
@ -632,7 +632,7 @@ int pam_sm_chauthtok(
|
|||
if (rc != PAM_SUCCESS)
|
||||
return rc;
|
||||
}
|
||||
rc = pam_do_pwmod(ctx, p, q, &err);
|
||||
rc = pam_do_pwmod(ctx, username, p, q, &err);
|
||||
p = NULL; q = NULL;
|
||||
NSS2PAM_RC(rc, ignore_flags, PAM_SUCCESS);
|
||||
if (rc == PAM_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue