Posts

Are both mitigations required when audit2allow suggests both restorecon and one type enforcement rule?

Image
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite SELinux is permissive mode to help avoid operational issues during a transition to a new RHEL7 server deployment. Whilst some SELinux issues are fairly easy to review and resolve with a modicum of confidence, I find the following somewhat perplexing. The AVC is as follows: type=AVC msg=audit(1533595368.668:140747): avc: denied connectto for pid=87400 comm="postdrop" path="/var/spool/postfix/public/pickup" scontext=system_u:system_r:postfix_postdrop_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket audit2why says: type=AVC msg=audit(1533595368.668:140747): avc: denied connectto for pid=87400 comm="postdrop" path="/var/spool/postfix/public/pickup" scontext=system_u:system_r:postfix_postdrop_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket Was caused by: Missing type enforcement (TE) allo...

Move “if” conditions to variables

Image
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite I am writting git hook file. I have following condition: current_branch_name=$(echo $(git branch | grep "*" | sed "s;* ;;")) merged_branch_name=$(echo $(git reflog -1) | cut -d" " -f 4 | sed "s;:;;") release_branch_name="release" develop_branch_name="develop" master_branch_name="master" hotfix_branch_name="hotfix/*" if [[ ($current_branch_name == $release_branch_name && $merged_branch_name == $develop_branch_name) || ($current_branch_name == $master_branch_name && $merged_branch_name == $hotfix_branch_name) ]] ; then #do something fi I would like to move conditions from if statement into a variable. I've done: current_branch_name=$(echo $(git branch | grep "*" | sed "s;* ;;")) merged_branch_name=$(echo $(git reflog -1) | cut -d" " -f 4 | sed "s;:;;") release_branch_name=...