#2616 Unable to disable or enable hbacrule with --setattr [regression]
Closed: Fixed None Opened 12 years ago by mkosek.

https://bugzilla.redhat.com/show_bug.cgi?id=810948 (Red Hat Enterprise Linux 6)

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:

Petr, please check this ticket. The regression was introduced in 241955e.

Metadata Update from @mkosek:
- Issue assigned to pviktori
- Issue set to the milestone: FreeIPA 2.2 Core Effort - 2012/04

7 years ago

Login to comment on this ticket.

Metadata