i.MX6UL permission administration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX6UL permission administration

ソリューションへジャンプ
382件の閲覧回数
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 解決策
323件の閲覧回数
TammyTsai
Contributor III

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

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
324件の閲覧回数
TammyTsai
Contributor III

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

0 件の賞賛
返信