i.MX6UL permission administration

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX6UL permission administration

跳至解决方案
410 次查看
TammyTsai
Contributor III

Hi NXP team, I develop a project on i.MX6UltraLite custom board.
There are two programs which are IPC_server and IPC_client.
In order to execute these two programs automatically, I add a script in yocto/sources/meta-freescale-distro/recipes-fsl/fsl-rc-local/fsl-rc-local.
The contents of the script are as follows.

if [ -f /home/root/IPC_server_init ]; then
/home/root/IPC_server_init
else
/home/root/IPC_server &
sleep 12s
/home/AP/IPC_client
fi

I create a normal user who is ap.
IPC_server should be a privilege program, both owner and group of the file are root.
IPC_client should be a normal program, both owner and group of the file are ap.

The device automatically login with root after booting.
When IPC_client process is launched, it runs with the same permission as root that ran it.
It would let IPC_client have superuser permission to execute any command.
For example, IPC_client can kill IPC_server process.

I want root to run IPC_client and allow IPC_client with ap permission to execute limited commands and file access.
How to allow IPC_server has root permission and IPC_client has ap permission when root runs both programs at the same time.

Could anyone give me some suggestions to achieve this requirement.

标签 (4)
0 项奖励
回复
1 解答
351 次查看
TammyTsai
Contributor III

I have used fork function and exec function to solve this issue.

在原帖中查看解决方案

0 项奖励
回复
1 回复
352 次查看
TammyTsai
Contributor III

I have used fork function and exec function to solve this issue.

0 项奖励
回复