utags:change the proc utag dir node permission

dac avc error on "echo 1 > proc/hw/reload" in the init.oem.hw.sh
audit: type=1400 audit(3738101.426:12): avc:  denied  { dac_override } for  pid=495 comm="init.oem.hw.sh" uid=0 capability=1  scontext=u:r:init_hw:s0 tcontext=u:r:init_hw:s0 tclass=capability permissive=0

dac avc error on "echo 1 > proc/config/.reboot/ascii" in the init.oem.hw.sh
[   13.771240] init.oem.hw.sh: reset reboot counter
[   13.775002] type=1400 audit(1536562770.017:341): avc: denied { dac_override } for pid=1140 comm="init.oem.hw.sh" uid=0 capability=1 scontext=u:r:init_hw:s0 tcontext=u:r:init_hw:s0 tclass=capability permissive=0

Change-Id: I9392366183b32b260f0792ab3e7293ca55f9bcc1
Signed-off-by: xizx <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1239642
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
xizx 2018-09-10 10:15:03 +08:00 • committed by Zhenxin Xi
commit 08fe691b6a

View file

@ -627,7 +627,7 @@ static int proc_utag_util(struct ctrl *ctrl)
{
struct proc_dir_entry *dir;
dir = proc_mkdir_data("all", 0551, ctrl->root, NULL);
dir = proc_mkdir_data("all", 0771, ctrl->root, NULL);
if (!dir) {
pr_err("failed to create util\n");
return -EIO;
@ -670,7 +670,7 @@ static struct proc_dir_entry *proc_utag_dir(struct ctrl *ctrl,
return dnode->dir;
}
dir = proc_mkdir_data(tname, 0511, parent, NULL);
dir = proc_mkdir_data(tname, 0771, parent, NULL);
if (!dir) {
pr_err("failed to create dir %s\n", tname);
return ERR_PTR(-ENOMEM);
@ -1884,7 +1884,7 @@ static int utags_probe(struct platform_device *pdev)
return -ENOMEM;
}
ctrl->root = proc_mkdir_data(ctrl->dir_name, 0511, NULL, NULL);
ctrl->root = proc_mkdir_data(ctrl->dir_name, 0771, NULL, NULL);
if (!ctrl->root) {
destroy_workqueue(ctrl->load_queue);
destroy_workqueue(ctrl->store_queue);