On 06/12/2014 08:03 AM, Pankaj Kushwaha wrote: > Hi, > > I am working on FOTA upgrade from few days, and was trying to change > some labels in file_contexts. It is working fine for almost all, but i > had issue when I changed label for /sys files. > > For example- > I changed label from > /sys/module/lowmemorykiller(/.*)? -- u:object_r:sysfs_lowmemorykiller:s0 to > /sys/module/lowmemorykiller(/.*)? -- u:object_r:backup_data_file:s0 > > After my device was upgraded, label for files in > /sys/module/lowmemorykiller should be backup_data_file, but to my > surprise label was sysfs. > > I don't have to change it though as of now, but if in future if I would > I have to change, then how I will I do by FOTA upgrade ?
That seems very wrong as backup_data_file is a type for /data/backup files and should never be assigned to sysfs files. The policy controls what types can be associated with what filesystems via the filesystem associate permission, and current policy only allows types with the sysfs_type attribute to be associated with the sysfs filesystem. So the attempt to relabel the sysfs nodes to backup_data_file would be correctly denied by SELinux and they would be left in the default type for sysfs. _______________________________________________ Seandroid-list mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
