Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1672574

Summary: nsIndexIDListScanLimit accepts any value .
Product: Red Hat Enterprise Linux 8 Reporter: Anuj Borah <aborah>
Component: 389-ds-baseAssignee: Simon Pichugin <spichugi>
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 8.0CC: mreynolds, nkinder, pasik, spichugi, tbordaz, tmihinto, vashirov
Target Milestone: rcFlags: vashirov: mirror+
Target Release: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 389-ds-base-1.4.3.8-4.module+el8.3.0+7193+dfd1e8ad Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:07:13 UTC Type: Bug
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: 1683259    
Bug Blocks:    

Description Anuj Borah 2019-02-05 11:10:26 UTC
Description of problem:

nsIndexIDListScanLimit accepts any value .  

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

Any

How reproducible:
Always 

Steps to Reproduce:

GIVEN_NAME = 'cn=givenname,cn=index,cn=userRoot,cn=ldbmdatabase,cn=plugins,cn=config'

##Try change nsIndexIDListScanLimit

    for i in ['4000', 'limit=0 flags=bogus', 'limit=0 limit=1', 'limit=0 type=eq type=eq', 'limit=0 type=sub type=eq','limit=0 flags=AND flags=AND', 'limit=0 type=eq values=foo values=foo', 'limit=0 type=eq values=foo,foo','limit=0 type=sub', 'limit=0 type=eq values=notvalid', 'limit', 'limit=0 type=eq values=notavaliddn','limit=0 type=pres values=bogus', 'limit=0 type=eq,sub values=bogus', 'limit=', 'limit=1 type=','limit=1 flags=', 'limit=1 type=eq values=', 'limit=-2', 'type=eq', 'limit=0 type=bogus']:
       UserAccount(topo.standalone,GIVEN_NAME).replace('nsIndexIDListScanLimit', i)


Actual results:

It accepts all the value .

Expected results:

It should not accept all the value .

Additional info:

Comment 4 Anuj Borah 2020-05-26 13:19:34 UTC
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

/export/tests /mnt/tests/rhds/tests/upstream
:: [ 09:16:37 ] :: [  BEGIN   ] :: Running py.test :: actually running 'py.test -v --continue-on-collection-errors --junitxml=/mnt/tests/rhds/tests/upstream/report.xml --html=/mnt/tests/rhds/tests/upstream/report.html --self-contained-html  suites/filter/filterscanlimit_test.py'
re-exec with libfaketime dependencies
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.6.8, pytest-5.4.2, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-201.el8.x86_64-x86_64-with-redhat-8.3-Ootpa', 'Packages': {'pytest': '5.4.2', 'py': '1.8.1', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.9.0', 'html': '2.1.1', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.8-2.module+el8.3.0+6591+ebfc9766
nss: 3.44.0-15.el8
nspr: 4.21.0-2.el8_0
openldap: 2.4.46-11.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: 0

rootdir: /export/tests
plugins: metadata-1.9.0, html-2.1.1, libfaketime-0.1.2
collected 2 items                                                                                                                                                                                                 

suites/filter/filterscanlimit_test.py::test_invalid_configuration XFAIL                                                                                                                                     [ 50%]
suites/filter/filterscanlimit_test.py::test_idlistscanlimit PASSED                                                                                                                                          [100%]

================================================================================================ warnings summary =================================================================================================

Comment 5 Anuj Borah 2020-05-26 13:28:13 UTC
Tests are still failing:

[root@ci-vm-10-0-138-160 upstream]# rpm -qa | grep 389
389-ds-base-libs-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-snmp-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-debugsource-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-legacy-tools-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-debuginfo-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
python3-lib389-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.noarch

    


def test_invalid_configuration(topo):
        """"
        Error handling for invalid configuration
        Starting...test cases for bug1011539
        Index config error handling does not exist - you can add any old thing
        :id: 377950f6-9f06-11e8-831b-8c16451d917b
        :setup: Standalone instance
        :steps:
            1. Try change nsIndexIDListScanLimit
        :expected results:
            1. This should pass
        """
        for i in ['4000',
                  'limit=0 flags=bogus',
                  'limit=0 limit=1',
                  'limit=0 type=eq type=eq',
                  'limit=0 type=sub type=eq',
                  'limit=0 flags=AND flags=AND',
                  'limit=0 type=eq values=foo values=foo',
                  'limit=0 type=eq values=foo,foo',
                  'limit',
                  'limit=0 type=pres values=bogus',
                  'limit=0 type=eq,sub values=bogus',
                  'limit=',
                  'limit=1 type=',
                  'limit=1 flags=',
                  'limit=1 type=eq values=',
                  'limit=-2',
                  'type=eq',
                  'limit=0 type=bogus']:
            with pytest.raises(ldap.UNWILLING_TO_PERFORM):
>               Index(topo.standalone, GIVEN_NAME).replace('nsIndexIDListScanLimit', i)
E               Failed: DID NOT RAISE <class 'ldap.UNWILLING_TO_PERFORM'>

Comment 6 Viktor Ashirov 2020-07-03 11:40:09 UTC
============================================================================ test session starts ============================================================================
platform linux -- Python 3.6.8, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
389-ds-base: 1.4.3.8-4.module+el8.3.0+7193+dfd1e8ad
nss: 3.44.0-15.el8
nspr: 4.21.0-2.el8_0
openldap: 2.4.46-11.el8_1
cyrus-sasl: not installed
FIPS: disabled
rootdir: /workspace/ds/dirsrvtests, inifile: pytest.ini
collected 2 items                                                                                                                                                           

dirsrvtests/tests/suites/filter/filterscanlimit_test.py::test_invalid_configuration XPASS                                                                             [ 50%]
dirsrvtests/tests/suites/filter/filterscanlimit_test.py::test_idlistscanlimit PASSED                                                                                  [100%]

================================================================ 1 passed, 1 xpassed, 62 warnings in 26.33s =================================================================

Marking as VERIFIED.

Comment 9 errata-xmlrpc 2020-11-04 03:07:13 UTC
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 (389-ds:1.4 bug fix and enhancement update), 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://access.redhat.com/errata/RHEA-2020:4695