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 1042855 - nsds5ReplicaProtocolTimeout attribute is not validated when added to replication agreement
Summary: nsds5ReplicaProtocolTimeout attribute is not validated when added to replicat...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: Sankar Ramalingam
URL:
Whiteboard:
Depends On:
Blocks: 918714
TreeView+ depends on / blocked
 
Reported: 2013-12-13 14:26 UTC by Milan Kubík
Modified: 2020-09-13 20:52 UTC (History)
2 users (show)

Fixed In Version: 389-ds-base-1.3.1.6-15.el7
Doc Type: Bug Fix
Doc Text:
Cause: Attempt to remove the configuration attribute Consequence: The operation is rejected. Fix: Allow the removal of the configuration attribute Result: Removing of the configuration attribute is successful.
Clone Of:
Environment:
Last Closed: 2014-06-13 12:26:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 957 0 None None None 2020-09-13 20:52:05 UTC

Description Milan Kubík 2013-12-13 14:26:07 UTC
Description of problem:
The directory server does not verify the value being added to replication agreement.

Version-Release number of selected component (if applicable):
389-ds-base-1.3.1.6-12.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Do all the necessary steps to set up a replica.
2a. Create/modify a replication agreement with negative integer. 
2b. Create/modify a replication agreement with non-integer value.

Actual results:
a) The value is accepted.
b) The server returns error 21 - invalid syntax.

Expected results:
Negative value or non-integer is rejected with error 53, unwilling to perform.

Additional info:
From the results I guess there is no validation in this case and the two scenarios are one issue. Also it is inconsistent with the error code returned by the directory server when this steps are being performed on the replica entry.

Comment 2 mreynolds 2013-12-13 14:56:58 UTC
(In reply to Milan Kubík from comment #0)
> Description of problem:
> The directory server does not verify the value being added to replication
> agreement.
> 
> Version-Release number of selected component (if applicable):
> 389-ds-base-1.3.1.6-12.el7.x86_64
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1. Do all the necessary steps to set up a replica.
> 2a. Create/modify a replication agreement with negative integer. 
> 2b. Create/modify a replication agreement with non-integer value.
> 
> Actual results:
> a) The value is accepted.

But... the value is converted to use the default timeout under since exact scenario.  I will change this to just give an error.

> b) The server returns error 21 - invalid syntax.

This is the correct error/result.  


I will work on correcting (a)

Thanks,
Mark

> 
> Expected results:
> Negative value or non-integer is rejected with error 53, unwilling to
> perform.
> 
> Additional info:
> From the results I guess there is no validation in this case and the two
> scenarios are one issue. Also it is inconsistent with the error code
> returned by the directory server when this steps are being performed on the
> replica entry.

Comment 3 Milan Kubík 2013-12-13 15:04:51 UTC
Ad a) when queried, it returns the negative value. I don't know/haven't tried what timeout would be would actually be used.

Ad b) then the result 53 returned when this is done on replica entry is wrong? Or this inconsistency is not an issue?

Thanks

Comment 4 mreynolds 2013-12-13 15:12:14 UTC
(In reply to Milan Kubík from comment #3)
> Ad a) when queried, it returns the negative value. I don't know/haven't
> tried what timeout would be would actually be used.

It is converted internally in the replication code - it does not modify the config, but I will correct this.  So no worries.

> 
> Ad b) then the result 53 returned when this is done on replica entry is
> wrong? Or this inconsistency is not an issue?

I'm not sure I follow.  As long as the operation is rejected, we have the result we want.  Technically speaking, error 53 is not the standard error message for rejecting an update - it is one of many errors that could be returned.

> 
> Thanks

Comment 5 Milan Kubík 2013-12-13 15:16:54 UTC
At the moment the results for replica and replication agreement respectively are:

ldap_modify: DSA is unwilling to perform
ldap_modify: additional info: attribute nsds5ReplicaProtocolTimeout value (fifteen) is invalid, must be a number greater than zero.

modifying entry cn=replica,cn="o=airius.com",cn=mapping tree,cn=config

ldap_modify: Invalid syntax
ldap_modify: additional info: nsds5ReplicaProtocolTimeout: value #0 invalid per syntax

modifying entry cn=24222_to_24212,cn=replica,cn="o=airius.com",cn=mapping tree,cn=config

The error 53 and the message seem to me like a better response to this update than syntax error. However, if the point is to just to refuse the change, I'll content any value other than 0.

Comment 6 mreynolds 2013-12-13 15:29:43 UTC
(In reply to Milan Kubík from comment #5)
> At the moment the results for replica and replication agreement respectively
> are:
> 
> ldap_modify: DSA is unwilling to perform
> ldap_modify: additional info: attribute nsds5ReplicaProtocolTimeout value
> (fifteen) is invalid, must be a number greater than zero.
> 
> modifying entry cn=replica,cn="o=airius.com",cn=mapping tree,cn=config
> 
> ldap_modify: Invalid syntax
> ldap_modify: additional info: nsds5ReplicaProtocolTimeout: value #0 invalid
> per syntax
> 
> modifying entry cn=24222_to_24212,cn=replica,cn="o=airius.com",cn=mapping
> tree,cn=config
> 
> The error 53 and the message seem to me like a better response to this
> update than syntax error. However, if the point is to just to refuse the
> change, I'll content any value other than 0.

Ok I see.  There is a difference between modifying the replica entry and the agreement.  Ultimately we are getting a correct result, but yes it should be consistent.  I'll look into this as well.

Comment 7 mreynolds 2013-12-13 18:07:22 UTC
Everything is now fixed and working as expected.  Fixed upstream.

Comment 9 Milan Kubík 2014-01-09 11:38:39 UTC
I think we've got a regression here.

$ ldapmodify -x -h localhost -p 24202 -D "cn=directory manager" -w Secret123 <<EOF
> dn: cn=24202_to_24224,cn=replica,cn=o\=airius.com,cn=mapping tree,cn=config
> changetype: modify
> delete: nsds5ReplicaProtocolTimeout
> EOF
modifying entry "cn=24202_to_24224,cn=replica,cn=o\=airius.com,cn=mapping tree,cn=config"
ldap_modify: Server is unwilling to perform (53)
        additional info: attribute nsds5ReplicaProtocolTimeout value () is invalid, must be a number greater than zero.

$ rpm -qa 389-ds-base
389-ds-base-1.3.1.6-14.el7.x86_64

Comment 10 mreynolds 2014-01-17 21:02:45 UTC
Fixed upstream

Comment 11 Milan Kubík 2014-01-23 12:47:51 UTC
----------------- Starting Test replica_timeout_11 -------------------------
Delete the attribute from an replica or replication agreement entry.
                                                                  
Deleting the value from replication agreement on S1.
modifying entry cn=24202_to_24224,cn=replica,cn="o=airius.com",cn=mapping tree,cn=config

Successfully deleted the timeout from replication agreement.
TestCase [replica_timeout_11] result-> [PASS]
Deleting the value from replica on S1.
modifying entry cn=replica,cn="o=airius.com",cn=mapping tree,cn=config

Successfully deleted the timeout from replica.
TestCase [replica_timeout_11] result-> [PASS]

PASS for all related test cases. Bug verified.

Comment 12 Ludek Smid 2014-06-13 12:26:27 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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