i got it to work with selinux - if someone wants the policy:

Support and queries relating to all previous versions of ZoneMinder
Locked
roidayan
Posts: 12
Joined: Fri Apr 11, 2008 11:10 am

i got it to work with selinux - if someone wants the policy:

Post by roidayan »

save as: local_zoneminder.te :

Code: Select all

module local_zoneminder 1.0; 

require { 
               type httpd_t;
               type initrc_var_run_t;
               type initrc_t;
               type v4l_device_t;
               type file_t;
              class unix_stream_socket { read connectto };
              class file { read lock };
              class shm { unix_read unix_write associate read write getattr };
              class chr_file getattr;
}

#============= httpd_t ============== 
allow httpd_t initrc_t:unix_stream_socket connectto;
allow httpd_t initrc_t:shm { unix_read unix_write associate read write getattr };
allow httpd_t initrc_var_run_t:file { read lock };
allow httpd_t v4l_device_t:chr_file getattr;
commands to execute:
# checkmodule -M -m -o local_zoneminder.mod local_zoneminder.te
# semodule_package -o local_zoneminder.pp -m local_zoneminder.mod
# semodule -i local_zoneminder.pp[/code]
Last edited by roidayan on Fri Apr 18, 2008 7:55 am, edited 2 times in total.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Useful
Thanks
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Would you mind posting this to the Wiki as I'm sure it would be useful to a lot of people.
Phil
roidayan
Posts: 12
Joined: Fri Apr 11, 2008 11:10 am

Post by roidayan »

sure, i updated it on the wiki under installation.
I think I also updated it a little at home but I am not at home to check the new settings.
When i'll be home in a few hours i'll update the rest of the settings.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Users should be made aware that this policy does not constain it to just ZM.
Doing so relaxes SELInux's policy in general but is still better than not having SELinux at all.
roidayan
Posts: 12
Joined: Fri Apr 11, 2008 11:10 am

Post by roidayan »

yea you right i still prefer to allow httpd users to do those actions, still not a risk to the system. disabling httpd security in general is worst.
roidayan
Posts: 12
Joined: Fri Apr 11, 2008 11:10 am

Post by roidayan »

added this note to the wiki
also updated the module here if someone took the lines from here and not the wiki
Locked