Red Hat Bugzilla – Bug 984484
make setsebool error message saying boolean do not exist more user friendly
Last modified: 2014-09-30 19:35:12 EDT
Description of problem: When you attempt to enable some SELinux boolean which do not exist (e.g. you mistype its name), user unfriendly message is generated Version-Release number of selected component (if applicable): libselinux-2.0.94-5.3.el6_4.1.x86_64 selinux-policy-3.7.19-195.el6_4.12.noarch How reproducible: always Steps to Reproduce: 1. # setsebool -P spacewalk_nfs_mountpointttt on Actual results: libsemanage.dbase_llist_set: record not found in the database (No such file or directory). libsemanage.dbase_llist_set: could not set record value (No such file or directory). Could not change boolean spacewalk_nfs_mountpointttt Could not change policy booleans Expected results: Some user friendly error message explaining the problem
Probably should be discussed.
I just made a change to Upstream to do the following. setsebool -P dan 1 Failed to change boolean dan: No such file or directory setsebool -VP dan 1 libsemanage.dbase_llist_set: record not found in the database (No such file or directory). libsemanage.dbase_llist_set: could not set record value (No such file or directory). Failed to change boolean dan: No such file or directory
Looks good to me....
Created attachment 774422 [details] Patch to make setsebool less verbose on errors. Miroslav if we are doing a policycoreutils update, this is probably worth back porting. Fix is in RHEL7.
Yes, there will be an update.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
The new -V option should be in man page as well.
We have the -V in man page in RHEL7
I apologize, I did not update the man page to reflect this change.
Fixed in policycoreutils-2.0.83-19.32.el6
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-2013-1608.html