Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1044157 - Some updates of "passwordgraceusertime" are useless when updating "userpassword"
Some updates of "passwordgraceusertime" are useless when updating "userpassword"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.0
Unspecified Unspecified
low Severity unspecified
: rc
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-17 16:32 EST by Nathan Kinder
Modified: 2015-03-05 04:31 EST (History)
2 users (show)

See Also:
Fixed In Version: 389-ds-base-1.3.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 04:31:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0416 normal SHIPPED_LIVE Important: 389-ds-base security, bug fix, and enhancement update 2015-03-05 09:26:33 EST

  None (edit)
Description Nathan Kinder 2013-12-17 16:32:59 EST
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47371

Whatever is the password policy (local or default), when updating the "userpassword" the password policy attribute "passwordgraceusertime" is reset to 0. In some cases it is useless (if the value was already 0). In addition in a customer case where password policy is default, retroCL records this unexpected update.


Test case:
Create an instance and a test entry with a password


{{{
ldapsearch -LLL -h localhost -p 2011 -D "cn=directory manager" -w Secret123 -b "dc=com" uid=xxx passwordgraceusertime
dn: uid=xxx,dc=com
passwordgraceusertime: 0

ldapmodify -h localhost -p 2011 -D "cn=directory manager" -w Secret123 
dn: uid=xxx,dc=com
changetype: modify
replace: userpassword
userpassword: secret12


(gdb) break pw_apply_mods
(gdb) c
(gdb) where
#0  pw_apply_mods (sdn=0x7f50cc000d70, mods=0x7f50eb7f9690) at ldap/servers/slapd/pw_retry.c:263
#1  0x00007f5108e2b3ff in update_pw_info (pb=0x7f50eb7fdaa0, old_pw=0x0) at ldap/servers/slapd/pw.c:686
#2  0x00007f5108e0c918 in op_shared_modify (pb=0x7f50eb7fdaa0, pw_change=1, old_pw=0x0) at ldap/servers/slapd/modify.c:1091
#3  0x00007f5108e0b084 in do_modify (pb=0x7f50eb7fdaa0) at ldap/servers/slapd/modify.c:415
#4  0x0000000000414d86 in connection_dispatch_operation (conn=0x7f5100330e10, op=0x12021d0, pb=0x7f50eb7fdaa0)
    at ldap/servers/slapd/connection.c:652
#5  0x00000000004169ab in connection_threadmain () at ldap/servers/slapd/connection.c:2479
#6  0x0000003426428afd in _pt_root (arg=0x1216d30) at ../../../mozilla/nsprpub/pr/src/pthreads/ptthread.c:191
#7  0x00000035d7007d14 in start_thread (arg=0x7f50eb7fe700) at pthread_create.c:309
#8  0x00000035d6cf168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

(gdb) break ldbm_back_modify
(gdb) c

(gdb) where
#0  ldbm_back_modify (pb=0x7f50eb7f9390) at ldap/servers/slapd/back-ldbm/ldbm_modify.c:541
#1  0x00007f5108e0c871 in op_shared_modify (pb=0x7f50eb7f9390, pw_change=0, old_pw=0x0) at ldap/servers/slapd/modify.c:1075
#2  0x00007f5108e0b643 in modify_internal_pb (pb=0x7f50eb7f9390) at ldap/servers/slapd/modify.c:627
#3  0x00007f5108e0b220 in slapi_modify_internal_pb (pb=0x7f50eb7f9390) at ldap/servers/slapd/modify.c:482
#4  0x00007f5108e3000b in pw_apply_mods (sdn=0x7f50cc00e810, mods=0x7f50eb7f9690) at ldap/servers/slapd/pw_retry.c:274
#5  0x00007f5108e2b3ff in update_pw_info (pb=0x7f50eb7fdaa0, old_pw=0x0) at ldap/servers/slapd/pw.c:686
#6  0x00007f5108e0c918 in op_shared_modify (pb=0x7f50eb7fdaa0, pw_change=1, old_pw=0x0) at ldap/servers/slapd/modify.c:1091
#7  0x00007f5108e0b084 in do_modify (pb=0x7f50eb7fdaa0) at ldap/servers/slapd/modify.c:415
#8  0x0000000000414d86 in connection_dispatch_operation (conn=0x7f5100330e10, op=0x12021d0, pb=0x7f50eb7fdaa0)
    at ldap/servers/slapd/connection.c:652
#9  0x00000000004169ab in connection_threadmain () at ldap/servers/slapd/connection.c:2479
#10 0x0000003426428afd in _pt_root (arg=0x1216d30) at ../../../mozilla/nsprpub/pr/src/pthreads/ptthread.c:191
#11 0x00000035d7007d14 in start_thread (arg=0x7f50eb7fe700) at pthread_create.c:309
#12 0x00000035d6cf168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

...
(gdb) 
541				if (modify_apply_check_expand(pb, operation, mods, e, ec, &postentry,
(gdb) print mods[0]->mod_type
$2 = 0x7f50cc007890 "passwordgraceusertime"
(gdb) print mods[0]->mod_vals->modv_bvals->bv_len
$6 = 1
(gdb) print mods[0]->mod_vals->modv_bvals->bv_val
$7 = 0x7f50cc0077b0 "0"




}}}
Comment 2 Amita Sharma 2014-12-26 07:43:50 EST
[root@dhcp201-126 en]# ldapmodify -D "cn=directory manager" -w Secret123 -p 389 -h localhost << EOF
> dn: uid=ami,dc=example,dc=com
> changetype: modify
> replace: userpassword
> userpassword: secret12
> EOF
modifying entry "uid=ami,dc=example,dc=com"

[root@dhcp201-126 en]# ldapsearch -LLL -D "cn=directory manager" -w Secret123 -p 389 -h localhost -b  "uid=ami,dc=example,dc=com" passwordgraceusertime
dn: uid=ami,dc=example,dc=com
passwordgraceusertime: 0

[root@dhcp201-126 en]# ldapsearch -LLL -D "cn=directory manager" -w Secret123 -p 389 -h localhost -b  "uid=ami1,dc=example,dc=com" passwordgraceusertime
dn: uid=ami1,dc=example,dc=com

[root@dhcp201-126 en]# ldapmodify -D "cn=directory manager" -w Secret123 -p 389 -h localhost << EOFdn: uid=ami1,dc=example,dc=com
changetype: modify
replace: userpassword
userpassword: secret12
EOF

modifying entry "uid=ami1,dc=example,dc=com"

[root@dhcp201-126 en]# ldapsearch -LLL -D "cn=directory manager" -w Secret123 -p 389 -h localhost -b  "uid=ami1,dc=example,dc=com" passwordgraceusertime
dn: uid=ami1,dc=example,dc=com
passwordgraceusertime: 0

NOTE :: passwordgraceusertime does not get set automatically, it gets set as 0 only when changing user password.
Hence VERIFIED.
Comment 4 errata-xmlrpc 2015-03-05 04:31:49 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0416.html

Note You need to log in before you can comment on or make changes to this bug.