Bug 1255851
| Summary: | Shell CLI fails with usage errors if an argument containing white spaces is given | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Noriko Hosoi <nhosoi> |
| Component: | 389-ds-base | Assignee: | Noriko Hosoi <nhosoi> |
| Status: | CLOSED ERRATA | QA Contact: | Viktor Ashirov <vashirov> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.0 | CC: | amsharma, lmiksik, nkinder, rmeggins |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 389-ds-base-1.3.4.0-14.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 11:44:06 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: | |||
|
Description
Noriko Hosoi
2015-08-21 17:01:40 UTC
Justification: since CLI db2index is not usable, we should fix it. *** Bug 1255850 has been marked as a duplicate of this bug. *** Steps to verify: 1. sh -x db2index -Z YOURID -n userRoot -t cn If it does not fail with "userRoot=", one bug is verified. + /usr/sbin/ns-slapd db2index -D /etc/dirsrv/slapd-YOURID -n userRoot= 2. Run following CLIs with args including white spaces. For instance, most of them takes "-s SUFFIX", where SUFFIX could be "dc=example, dc=com". Or directory name could be 'dir with spaces". /usr/sbin/db2index /usr/sbin/bak2db /usr/sbin/db2bak /usr/sbin/db2index /usr/sbin/db2ldif /usr/sbin/ldif2db /usr/sbin/vlvindex If no syntax error is returned, the fix is verified. 1. Issue1 tested sh -x db2index -Z /etc/dirsrv/slapd-dhcp201-167 -n userRoot -t cn ++ /usr/sbin/ns-slapd db2index -D /etc/dirsrv/slapd-dhcp201-167 -n userRoot -t cn [15/Sep/2015:12:51:06 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [15/Sep/2015:12:51:06 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 471032, procpages: 58158 [15/Sep/2015:12:51:06 +051800] - Import allocates 753648KB import cache. [15/Sep/2015:12:51:06 +051800] - userRoot: Indexing attribute: cn [15/Sep/2015:12:51:06 +051800] - userRoot: Finished indexing. [15/Sep/2015:12:51:06 +051800] - All database threads now stopped 2. White spaces tested:: [root@dhcp201-167 export]# db2index -Z slapd-dhcp201-167 -n redhatdb -s "dc=redhat, dc=com" -t cn [15/Sep/2015:13:00:49 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [15/Sep/2015:13:00:49 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 471032, procpages: 58306 [15/Sep/2015:13:00:49 +051800] - Import allocates 753648KB import cache. [15/Sep/2015:13:00:49 +051800] - redhatdb: Indexing attribute: cn [15/Sep/2015:13:00:49 +051800] - redhatdb: Finished indexing. [15/Sep/2015:13:00:49 +051800] - All database threads now stopped [root@dhcp201-167 export]# /usr/sbin/db2ldif -Z slapd-dhcp201-167 -n redhatdb -s "dc=redhat, dc=com"Exported ldif file: /var/lib/dirsrv/slapd-dhcp201-167/ldif/dhcp201-167-redhatdb-redhat-2015_09_15_130421.ldif ldiffile: /var/lib/dirsrv/slapd-dhcp201-167/ldif/dhcp201-167-redhatdb-redhat-2015_09_15_130421.ldif [15/Sep/2015:13:04:21 +051800] - All database threads now stopped /usr/sbin/ldif2db -Z slapd-dhcp201-167 -n redhatdb -s "dc=redhat, dc=com" -i /export/data.ldif importing data ... [15/Sep/2015:13:07:25 +051800] - import redhatdb: Created ancestorid index (new idl). [15/Sep/2015:13:07:25 +051800] - import redhatdb: Flushing caches... [15/Sep/2015:13:07:25 +051800] - import redhatdb: Closing files... [15/Sep/2015:13:07:25 +051800] - All database threads now stopped [15/Sep/2015:13:07:25 +051800] - import redhatdb: Import complete. Processed 105 entries (105 were skipped) in 7 seconds. (15.00 entries/sec) [root@dhcp201-167 export]# vlvindex -Z slapd-dhcp201-167 -n redhatdb -s "dc=redhat, dc=com" -T myVLVIndex [15/Sep/2015:13:10:04 +051800] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [15/Sep/2015:13:10:04 +051800] - check_and_set_import_cache: pagesize: 4096, pages: 471032, procpages: 58305 [15/Sep/2015:13:10:04 +051800] - Import allocates 753648KB import cache Hence VERIFIED. [root@dhcp201-167 export]# rpm -qa | grep 389 389-ds-base-1.3.4.0-15.el7.x86_64 389-ds-base-debuginfo-1.3.4.0-1.el7.x86_64 389-ds-base-libs-1.3.4.0-15.el7.x86_64 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/RHBA-2015-2351.html |