neurodroid / cryptonite

EncFS and TrueCrypt on Android
GNU General Public License v2.0
203 stars 49 forks source link

Truecrypt and SELinux #95

Open dennyh opened 9 years ago

dennyh commented 9 years ago

Hello! I have some problems with Truecrypt on my devices.

Applications without root access can't access mounted tc volumes with SELinux in enforcing mode. Also, when mounting a tc volume in SELinux Permissive mode I sometimes have to mount, dismount and mount it again. The first time mounting it doesn't allow any access to the files in the container from applications without root, kind of like when SELinux is in enforcing mode.

In encFS however, Applications without root can access mounted encFS volumes contents with SELinux in enforcing mode.

Since encFS can mount just fine without messing with SELinux I'm thinking that I should be able to somehow mount a Truecrypt volume the same way.

So, my questions would be:

  1. Is there a way to mount a Truecrypt volume without puting SELinux in permissive mode?
  2. What exactly are the downsides of runing android with SELinux in permissive mode?

To mount a truecrypt volume I use the following lines:

setenforce 0
truecrypt -t -v --fs-options="uid=1000,gid=1000,umask=0002" /extSdCard/container.tc /sdcard/csh.cryptonite/tcmntpoint

Android 5.1.1 CyanogenMod 12.1-201500529-UNOFFICIAL-lionheartk-chagallwifi Device: Galaxy tab s 10.5 (SM-T800)