Bug 810948 - Unable to disable or enable hbacrule with --setattr [regression]
Unable to disable or enable hbacrule with --setattr [regression]
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Rob Crittenden
IDM QE LIST
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-09 13:50 EDT by Jenny Galipeau
Modified: 2012-06-20 09:26 EDT (History)
1 user (show)

See Also:
Fixed In Version: ipa-2.2.0-9.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:26:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jenny Galipeau 2012-04-09 13:50:06 EDT
Description of problem:

# ipa hbacrule-mod --setattr ipaenabledflag=1 test
ipa: ERROR: ipaEnabledFlag: value #0 invalid per syntax: Invalid syntax.

# ipa hbacrule-mod --setattr ipaenabledflag=0 test
ipa: ERROR: ipaEnabledFlag: value #0 invalid per syntax: Invalid syntax.

# ipa hbacrule-mod --setattr ipaenabledflag=FALSE test
ipa: ERROR: ipaEnabledFlag: value #0 invalid per syntax: Invalid syntax.

# ipa hbacrule-mod --setattr ipaenabledflag=TRUE test
ipa: ERROR: ipaEnabledFlag: value #0 invalid per syntax: Invalid syntax.

# ipa hbacrule-mod --setattr ipaenabledflag=False test
ipa: ERROR: ipaEnabledFlag: value #0 invalid per syntax: Invalid syntax.

# ipa hbacrule-mod --setattr ipaenabledflag=True test
ipa: ERROR: ipaEnabledFlag: value #0 invalid per syntax: Invalid syntax.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hbacrule-cli-015: Negative - setattr and addattr on ipaEnabledFlag
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa hbacrule-mod --setattr ipaenabledflag=test test
:: [   LOG    ] :: "ipa hbacrule-mod --setattr ipaenabledflag=test test" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'ipaenabledflag': must be True or False
:: [   PASS   ] :: Verify expected error message for --setattr on ipaEnabledFlag.
:: [   FAIL   ] :: Disable rule using setattr modification. (Expected 0, got 1)
:: [   LOG    ] :: ERROR: Expect test Enabled status to be FALSE. GOT: TRUE
:: [   PASS   ] :: Verify rule is now disabled
:: [   LOG    ] :: Executing: ipa hbacrule-mod --addattr ipaenabledflag=TRUE test
:: [   LOG    ] :: "ipa hbacrule-mod --addattr ipaenabledflag=TRUE test" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: ipaenabledflag: Only one value allowed.
:: [   PASS   ] :: Verify expected error message for --addattr on ipaEnabledFlag.
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 5 good, 1 bad
:: [   FAIL   ] :: RESULT: ipa-hbacrule-cli-015: Negative - setattr and addattr on ipaEnabledFlag


Version-Release number of selected component (if applicable):
ipa-server-2.2.0-8.el6.x86_64

How reproducible:


Steps to Reproduce:
1.ipa hbacrule-add --desc=test test
2.ipa hbacrule-mod --setattr ipaenabledflag=FALSE test
3.
  
Actual results:
ipa: ERROR: ipaEnabledFlag: value #0 invalid per syntax: Invalid syntax.

Expected results:
Rule to be disabled

Additional info:
Comment 2 Martin Kosek 2012-04-10 06:44:49 EDT
This is a regression introduced in this patch:

https://fedorahosted.org/freeipa/changeset/241955e4ce34f491168237f5a06bcb98daf22a5a/

We do not encode parameters present only for LDAPObject and for LDAPCommand properly. I will open an upstream ticket.
Comment 3 Martin Kosek 2012-04-10 06:45:49 EDT
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2616
Comment 4 Rob Crittenden 2012-04-10 18:34:45 EDT
master: 1431c80b3c2a256bb6c10cf042f7671004695a9f

ipa-2-2: 32fa7f7a48b3d956b0ec5dbea9cd22db504a562d
Comment 7 Jenny Galipeau 2012-04-11 10:47:29 EDT
verified :

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-hbacrule-cli-015: Negative - setattr and addattr on ipaEnabledFlag
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa hbacrule-mod --setattr ipaenabledflag=test test
:: [   LOG    ] :: "ipa hbacrule-mod --setattr ipaenabledflag=test test" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'ipaenabledflag': must be True or False
:: [   PASS   ] :: Verify expected error message for --setattr on ipaEnabledFlag.
:: [   PASS   ] :: Disable rule using setattr modification.
:: [   LOG    ] :: test is FALSE as expected.
:: [   PASS   ] :: Verify rule is now disabled
:: [   LOG    ] :: Executing: ipa hbacrule-mod --addattr ipaenabledflag=TRUE test
:: [   LOG    ] :: "ipa hbacrule-mod --addattr ipaenabledflag=TRUE test" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: ipaenabledflag: Only one value allowed.
:: [   PASS   ] :: Verify expected error message for --addattr on ipaEnabledFlag.
:: [   LOG    ] :: Duration: 17s
:: [   LOG    ] :: Assertions: 6 good, 0 bad
:: [   PASS   ] :: RESULT: ipa-hbacrule-cli-015: Negative - setattr and addattr on ipaEnabledFlag

version :
ipa-server-2.2.0-9.el6.x86_64
Comment 9 Martin Kosek 2012-04-25 07:47:14 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.
Comment 11 errata-xmlrpc 2012-06-20 09:26:40 EDT
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.

http://rhn.redhat.com/errata/RHBA-2012-0819.html

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