From 560dffb1727a9a1c174b2a2048b2eba513225f08 Mon Sep 17 00:00:00 2001 From: xizx Date: Mon, 3 Sep 2018 14:03:25 +0800 Subject: [PATCH] utags:sync same owner permission for group utags needs to be read-write in tcmd daemon whose group id is system,many operation need group write permission l(CR) root user. 1.tcmd needs to add new node by lock and new operation 2.tcmd needs to access node /proc/config/all/new etc Change-Id: I6ba335a9490e5cba8ead04a8144b9bdbca8ebba2 Signed-off-by: xizx Reviewed-on: https://gerrit.mot.com/1236562 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Tao Sun Tested-by: Jira Key Submit-Approved: Jira Key --- drivers/misc/utag/utags.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/utag/utags.c b/drivers/misc/utag/utags.c index e60ef09d35db..9407c6422faa 100644 --- a/drivers/misc/utag/utags.c +++ b/drivers/misc/utag/utags.c @@ -627,23 +627,23 @@ static int proc_utag_util(struct ctrl *ctrl) { struct proc_dir_entry *dir; - dir = proc_mkdir_data("all", 0511, ctrl->root, NULL); + dir = proc_mkdir_data("all", 0551, ctrl->root, NULL); if (!dir) { pr_err("failed to create util\n"); return -EIO; } - if (!proc_create_data("new", 0200, dir, &new_fops, ctrl)) { + if (!proc_create_data("new", 0220, dir, &new_fops, ctrl)) { pr_err("Failed to create utag new entry\n"); return -EIO; } - if (!proc_create_data("lock", 0600, dir, &lock_fops, ctrl)) { + if (!proc_create_data("lock", 0660, dir, &lock_fops, ctrl)) { pr_err("Failed to create lock entry\n"); return -EIO; } - if (!proc_create_data(".delete", 0200, dir, &delete_fops, ctrl)) { + if (!proc_create_data(".delete", 0220, dir, &delete_fops, ctrl)) { pr_err("Failed to create delete entry\n"); return -EIO; } @@ -1895,7 +1895,7 @@ static int utags_probe(struct platform_device *pdev) if (!strncmp(ctrl->dir_name, HW_ROOT, sizeof(HW_ROOT))) ctrl->hwtag = 1; - if (!proc_create_data("reload", 0640, ctrl->root, &reload_fops, ctrl)) { + if (!proc_create_data("reload", 0660, ctrl->root, &reload_fops, ctrl)) { pr_err("Failed to create reload entry\n"); destroy_workqueue(ctrl->load_queue); destroy_workqueue(ctrl->store_queue);