Red Hat Bugzilla – Bug 837375
IPA error message for targetattr is not formatted.
Last modified: 2012-10-10 08:44:31 EDT
This bug is created as a clone of upstream ticket:
# ipa permission-mod APermission --rename=ABCPermission --attrs --permissions=write --type=user
ipa: ERROR: targetattr "--permissions=write" does not exist in schema. Please add attributeTypes "--permissions=write" to schema if necessary. ACL Syntax Error(-5):(targetattr = \22--permissions=write\22)(target = \22ldap:///uid=\2a,cn=users,cn=accounts,dc=testrelm,dc=com\22)(version 3.0;acl \22permission:APermission\22;allow (write) groupdn = \22ldap:///cn=apermission,cn=permissions,cn=pbac,dc=testrelm,dc=com\22;): Invalid syntax.
<shanks> mkosek, see "\22" in the output
<mkosek> shanks: hello, you mean the fact that \22 is in the output not the that the command does not work?
<mkosek> shanks: because the options are indeed wrong, --attrs takes value
<shanks> mkosek, yes, this was part of negative testing
<mkosek> shanks: well, there is a indeed some glitch in the error message, you can file a bug if you want to - though this is a very low priority one :)
<shanks> mkosek, ok, thanks
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
I investigated this issue and I found that the error message is actually OK and expected, backslash hex escapes are intended. This exact error message would also be returned if somebody adds such ACL breaking the DS syntax (unknown attribute) in other client tools, like ldapsearch. It can be also found in this format in Directory Server error log:
[25/Sep/2012:06:12:03 -0400] NSACLPlugin - ACL Syntax Error(-5):(targetattr = \22foo\22)(target = \22ldap:///uid=\2a,cn=users,cn=accounts,dc=idm,dc=lab,dc=bos,dc=redhat,dc=com\22)(version 3.0;acl \22permission:foo2\22;allow (write) groupdn = \22ldap:///cn=foo2,cn=permissions,cn=pbac,dc=idm,dc=lab, dc=bos,dc=redhat,dc=com\22;)
Thus, since this is not a bug in IPA and the error message format is expected, I would like to close this bug as NOTABUG.