danwalsh


Dan Walsh's Blog

Got SELinux?


Previous Entry Share Next Entry
bash completion for setsebool/getsebool added for Fedora 17
danwalsh
policycoreutils-python-2.1.10-26.fc17.x86_64 now has bash completion scripts for semanage and setsebool/getsebool

/etc/bash_completion.d/semanage-bash-completion.sh
/etc/bash_completion.d/setsebool-bash-completion.sh


# getsebool -<tab>
# getsebool -a

# getsebool samba_<tab>
samba_create_home_dirs   samba_export_all_ro      samba_share_fusefs
samba_domain_controller  samba_export_all_rw      samba_share_nfs
samba_enable_home_dirs   samba_run_unconfined   

# setsebool -<tab>
# setsebool -P<tab>

# setsebool -P samba_<tab>
samba_create_home_dirs   samba_export_all_ro      samba_share_fusefs
samba_domain_controller  samba_export_all_rw      samba_share_nfs
samba_enable_home_dirs   samba_run_unconfined


semanage completion is a little more complicated.

# semanage <tab>
boolean     fcontext    login       node        port       
dontaudit   interface   module      permissive  user

# semanage fcontext -<tab>
-a           -d           --deleteall  -f           --help       --modify
--add        -D           -e           --ftype      --locallist  -t
-C           --delete     --equal      -h           -m           --type

# semanage fcontext -a -t samba<tab>
samba_etc_t                     samba_secrets_t
sambagui_exec_t                 samba_share_t
samba_initrc_exec_t             samba_unconfined_script_exec_t
samba_log_t                     samba_unit_file_t
samba_net_exec_t

...


Try it out.  If you find problems, patches accepted... :^)

No HTML allowed in subject

  
 
   
 

(will be screened)

You are viewing danwalsh