is the file_contexts entry the one in the ramdisk (/file_contexts) or on userdata (/data/security/file_contexts)...
if in userdata, the mkdir probably occur's prior to the policy reload off of userdata. On Wed, Nov 13, 2013 at 4:01 PM, Jaejyn Shin <[email protected]> wrote: > Dear All. > > I created and mount a directory through init.rc file > And also modified file_contexts file to label this directory > > /dir_1(/.*)? u:object_r:system_data_file:s0 > > But the directory was not labeled, even if apply it. > > $ lg -Z > drwxrwx--x system radio u:object_r:unlabeled:s0 dir_1 > > To solve it, I found two solutions. > > Solution 1) > Inserting restorecon("/dir_1") at the main function of init.c file. > > Solution 2) > insering restorecon dir_1 at the "on boot" of init.rc > > Question) > Why dir_1 can not be labeled without inserting additional restorecon ? > > Thank you > Best regards > > -- Respectfully, William C Roberts
