LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   SELinux and HAL (https://www.linuxquestions.org/questions/linux-general-1/selinux-and-hal-381510/)

Iban 11-09-2005 12:40 PM

SELinux and HAL
 
Hello all, I'm here again.

I finally get HAL set the correct charset and codepage for my usb HD, but now another problem araises.

I'm working with octave in my external HD and I have created a C function with an interface to interact with octave. The function compiles without problem, but when I try to use the function with octave it returns the folowing error:

cannot restore segment prot after reloc: Permission denied

Searching the net I found that this is caused because the type of security that HAL sets for this file (removable_t) is incorrect. If I change by hand the fstab file and set type to "texrel_shlib_t" it works, but then I can compile the file again, I suppose because the type is again incorrect for this operation. I tried to dissable SELinux for hotplug daemon to avoid it and if I switch the laptop on with the HD connected, HAL don't put any fscontext to the HD, but if I plug the HD in while linux is running HAL put the fscontext again. In this situation I have three questions:

1.- What is the type of security that allows both, shared library access (texrel_shlib_t) and file modifications (removable_t)?
2.- Is there any way to change the default fscontext for HAL? I've tried the solution that works for me with my codepage problem http://www.linuxquestions.org/questi...hreadid=381047 adding the line:
<merge key="volume.policy.mount_option.fscontext=system_u:object_r:texrel_shlib_t" type="bool">true</merge>
but it doesn't works.
3.- Why if I dissable SELinux for hotplug HAL works OK if my HD is connected at boot time and fails if I connect it after boot.

Thanks to everybody in avance.

Iban.


All times are GMT -5. The time now is 11:40 PM.