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 <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1236562
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Tao Sun <suntao2@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
This commit is contained in:
xizx 2018-09-03 14:03:25 +08:00 • committed by Zhenxin Xi
commit 560dffb172

View file

@ -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);