Hi All,

Type of the context is defined in file.te and I can see the policy getting 
built and compiled into binary. Verified the same on policy.conf and the type 
does exist. Also the partition is mounted only once during the bootup.

 

Thanks,

Biswajit

 

From: William Roberts [mailto:[email protected]] 
Sent: Tuesday, August 19, 2014 7:48 AM
To: rpcraig
Cc: [email protected]; Biswajit Paul
Subject: Re: Need help in labelling vfat filesystem

 

You should see an error in dmsg iirc if the type doesn't exist during mount.

On Aug 19, 2014 4:32 AM, "Robert Craig" <[email protected] 
<mailto:[email protected]> > wrote:

As long as you're including the file.te you mention with the compiled policy 
then your approach seems correct. I would assume that if you had a missing 
xyz_type definition in your policy (missing file.te entry) but included the 
context= option then the mount would outright fail (dmesg would probably show 
SELinux: security_context_to_sid(u:object_r:xyz_type:s0) failed for...). The 
context= mount option should work as the string just gets passed through to the 
kernel and the kernel passes it to SELinux to interpret. It's probably a long 
shot, but is it possible that your partition is being mounted elsewhere first? 



On 08/18/2014 10:53 PM, Biswajit Paul wrote:

Dear Experts,

I am trying to set the context for a vfat mounted partition. My current context 
shows as “vfat” which is the default one.

 

I tried defining a new context while mounting using 
context=”u:object_r:xyz_type:s0” option in my fstab.<board> files and  I am 
defining xyz_type as below in file.te

 

type  xyz_type, fs_type, contextmount_type;

 

I still see the old context. Any input on how to set the new context for VFAT 
is highly appreciated.

 

Regards,

Biswajit

 

_______________________________________________
Seandroid-list mailing list
[email protected] <mailto:[email protected]> 
To unsubscribe, send email to [email protected] 
<mailto:[email protected]> .
To get help, send an email containing "help" to 
[email protected] 
<mailto:[email protected]> .

 


_______________________________________________
Seandroid-list mailing list
[email protected] <mailto:[email protected]> 
To unsubscribe, send email to [email protected] 
<mailto:[email protected]> .
To get help, send an email containing "help" to 
[email protected] 
<mailto:[email protected]> .

_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to 
[email protected].

Reply via email to