Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 201332

Summary: Password change extended operation is not allowed after password reset.
Product: [Retired] 389 Reporter: Michal Vocu <tucnacek>
Component: Directory ServerAssignee: Nathan Kinder <nkinder>
Status: CLOSED CURRENTRELEASE QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: urgent    
Version: 1.0CC: benl, jgalipea, rmeggins
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-29 22:59:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 152373, 249650, 493682    
Attachments:
Description Flags
CVS Diffs none

Description Michal Vocu 2006-08-04 13:51:36 UTC
Description of problem:
Directory server does not allow LDAP password modify extended operation after
password reset and password policy requires password change.

Version-Release number of selected component (if applicable):


How reproducible:
Always.

Steps to Reproduce:
1. Set attribute passwordMustChange on in currently used password policy.
2. Reset any user's password (by changing it as directory manager or by setting
 passwordExpirationTime to '19700101000000Z').
3. Run ldappasswd (from OpenLDAP) to change that user's password.
  
Actual results:
Server responds with 'unwilling to perform'.

Expected results:
Password is changed.

Additional info:
Function connection_need_new_password(...) (file connection.c) is responsible
for allowing only bind, unbind, abandon and modify operations when
conn->c_needpw is set. I think this check should include the password change
extop as well.

Comment 3 Nathan Kinder 2008-12-11 22:16:24 UTC
Created attachment 326682 [details]
CVS Diffs

The fix is to let extended operations pass through connection_need_new_password(), then check if the extended operation is the password modify extop if a password is expired in do_extended().  If the extended operation is something else, we return an error 53 along with the password expired control.

Comment 4 Nathan Kinder 2008-12-11 23:05:59 UTC
Checked into ldapserver (HEAD).  Thanks to Rich for his review!

Checking in ldap/servers/slapd/connection.c;
/cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v  <--  connection.c
new revision: 1.24; previous revision: 1.23
done
Checking in ldap/servers/slapd/extendop.c;
/cvs/dirsec/ldapserver/ldap/servers/slapd/extendop.c,v  <--  extendop.c
new revision: 1.11; previous revision: 1.10
done
Checking in ldap/servers/slapd/passwd_extop.c;
/cvs/dirsec/ldapserver/ldap/servers/slapd/passwd_extop.c,v  <--  passwd_extop.c
new revision: 1.18; previous revision: 1.17
done
Checking in ldap/servers/slapd/slap.h;
/cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v  <--  slap.h
new revision: 1.44; previous revision: 1.43
done

Comment 5 Jenny Severance 2009-03-16 12:39:58 UTC
fix verified - RHEL 5 DS 8.1

password change using ldappasswd successfully after administrator password reset and password policy 'user must change password after reset enabled.

Comment 6 Chandrasekar Kannan 2009-04-29 22:59:00 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0455.html