Bug 715064
Summary: | ldclt adds a leading space to values when using -e attrreplace | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sankar Ramalingam <sramling> | |
Component: | 389-ds-base | Assignee: | Rich Megginson <rmeggins> | |
Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 14 | CC: | edewata, nhosoi, nkinder, rmeggins | |
Target Milestone: | --- | Keywords: | screened | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 781544 (view as bug list) | Environment: | ||
Last Closed: | 2012-02-28 08:40:27 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: | 690319, 781544 |
Description
Sankar Ramalingam
2011-06-21 18:40:43 UTC
This bug actually has nothing to do with operational attributes. It appears that ldclt is adding a leading space, which causes the value for lastLoginTime to violate the requirements of the Generalized Time syntax. > dn: uid=test_01stress1000,ou=people,dc=accPolicy,dc=com > lastLoginTime:: IDIwMTEwNjIxMTgzMDU2Wg== python >>> import base64 >>> base64.b64decode('IDIwMTEwNjIxMTgzMDU2Wg==') ' 20110621183056Z' The value has a leading space (note the space after the ' and before the 2). The proper thing to do is for ldclt to not add a leading space to the value. Could you attach /tmp/Users.ldif to this bug?
> 2. Add 1000 users using ldclt operation.
> ldclt -v -h $HOST -p $PORT -D "cn=directory manager" -w $PASSWD -b "$SUFFIX" -e
> object=/tmp/Users.ldif,rdn=uid:test_01stress[A=INCRNNOLOOP(1000;1999;4)] -e
> add,commoncounter -n 20 -N 120 -T 100
Upstream ticket: https://fedorahosted.org/389/ticket/171 Cannot reproduce the problem. I could not see ldclt to add leading space(s). Here's the steps I tried: 1. Check nsslapd-syntaxcheck is enabled. # egrep nsslapd-syntaxcheck /etc/dirsrv/slapd-jiji/dse.ldif nsslapd-syntaxcheck: on 2. Set NewLoginTime as suggested. NewLoginTime=`date -u +"%Y%m%d%H%M%SZ" $ echo $NewLoginTime 20120125231440Z 3. Run ldclt with '-v'; make sure attribute's head does not start with space(s). $ ldclt -v -h localhost -p 389 -D 'cn=directory manager' -w <pw> -b "dc=example,dc=com" -f uid=testX -e incr -e noloop -r 0 -R 9 -e attreplace="lastLoginTime:$NewLoginTime" -n 1 -T 10 [...] Attribute's head = "20120125231440Z" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Note: no space in front of the value Attribute's tail = "" [...] 4. Search entries with lastLoginTime in the attrlist. $ ldapsearch -LLLx -h localhost -p 389 -D 'cn=directory manager' -w <pw> -b "dc=example,dc=com" lastLoginTime dn: dc=example,dc=com dn: uid=test0,dc=example,dc=com lastLoginTime: 20120125231440Z dn: uid=test1,dc=example,dc=com lastLoginTime: 20120125231440Z [...] 5. Run dbscan against the primary db file and see the lastLoginTime values are not base64 encoded. # dbscan -f id2entry.db4 | egrep lastLoginTime lastLoginTime: 20120125231440Z lastLoginTime: 20120125231440Z [...] Please provide steps/test data to reproduce the problem. The due of this bug fix is Feb. 3rd. If no steps are provided, we are closing this bug with WORKSFORME... Problem doesn't seems to be reproducible. In my ldclt command, I used single quotes to attreplace='lastLoginTime:$NewLoginTime', instead of double quotes. When I use the double quotes for the same, the problem disappears. attreplace="lastLoginTime:$NewLoginTime". Hence closing the bug as WORKSFORME as Noriko stated. |