Bug 615200

Summary: sesearch section of 5.12. Information Gathering Tools contains an error
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: doc-SELinux_User_GuideAssignee: Scott Radvan <sradvan>
Status: CLOSED NEXTRELEASE QA Contact: ecs-bugs
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: rlandman
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-19 04:02:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 547585    

Description Milos Malik 2010-07-16 06:51:23 UTC
Description of problem:
The 1. sesearch command contains a string "\ " before /etc/selinux/targeted/policy/policy.24, which leads to an error message, because sesearch tries to find " /etc/selinux/targeted/policy/policy.24" file (which does not exist) instead of "/etc/selinux/targeted/policy/policy.24" file (which does exist). The solution is to delete the string "\ ".

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
run the 1. command showed in sesearch section of 5.12. Information Gathering Tools
  
Actual results:
# sesearch --role_allow -t httpd_sys_content_t \ /etc/selinux/targeted/policy/policy.24 
ERROR: Unable to open policy  /etc/selinux/targeted/policy/policy.24.
ERROR: No such file or directory

Expected results:
# sesearch --role_allow -t httpd_sys_content_t /etc/selinux/targeted/policy/policy.24 
Found 20 role allow rules:
   allow system_r sysadm_r;
   allow sysadm_r system_r;
   allow sysadm_r staff_r;
   allow sysadm_r user_r;
   allow system_r git_shell_r;
   allow system_r guest_r;
   allow logadm_r system_r;
   allow system_r logadm_r;
   allow system_r nx_server_r;
   allow system_r staff_r;
   allow staff_r logadm_r;
   allow staff_r sysadm_r;
   allow staff_r unconfined_r;
   allow staff_r webadm_r;
   allow unconfined_r system_r;
   allow system_r unconfined_r;
   allow system_r user_r;
   allow webadm_r system_r;
   allow system_r webadm_r;
   allow system_r xguest_r;

Comment 3 Scott Radvan 2010-07-19 04:02:35 UTC
the \ character shows that the command continues on the second line; however, there was an extra space in there that caused your error, which I could reproduce. I've removed this space now, and copying/pasting directly from the guide now runs the command as expected. this change will appear on the next publish. thanks!