]> git.sur5r.net Git - openldap/commitdiff
In pwmod, ctx may be empty so always pass current username
authorHoward Chu <hyc@openldap.org>
Sat, 18 Apr 2009 01:44:22 +0000 (01:44 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 18 Apr 2009 01:44:22 +0000 (01:44 +0000)
contrib/slapd-modules/nssov/nss-ldapd/nss/Makefile.in
contrib/slapd-modules/nssov/nss-ldapd/nss/pam.c

index b73538de9b35d8baa430711ae523f60813da2d1b..0482c75e43c484c325971ba03c1859317647f934 100644 (file)
@@ -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@
index f77465525632f50c464e1d6abcc1cd2d59072594..ba1a90f0a0bc1191961efd238c26f369c1c920e4 100644 (file)
@@ -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) {