RPM to include SELinux information?

Dmitry Makovey dmitry at athabascau.ca
Mon Nov 7 20:58:40 UTC 2011


Hi,

I'm trying to build RPM that deploys application into SELinux environment, for 
it to work I need to label $application_dir with httpd_sys_content_t so that 
httpd can read it. What is the best approach to this? Adding 

%postinst
chcon -t httpd_sys_content_t $application_dir

seems kind of hacky, are there any macros (like %attr) that could help? So far 
quick look at fedora and RH documents yeilded no results, I may have missed 
something though so please let me know if I did.

-- 
Dmitry Makovey
Web Systems Administrator
Athabasca University
(780) 675-6245
---
Confidence is what you have before you understand the problem
    Woody Allen

When in trouble when in doubt run in circles scream and shout 
     http://www.wordwizard.com/phpbb3/viewtopic.php?f=16&t=19330
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/redhat-sysadmin-list/attachments/20111107/ae6afbe2/attachment.sig>


More information about the redhat-sysadmin-list mailing list