未验证 提交 55d2326c 编写于 作者: O openharmony_ci 提交者: Gitee

!1596 KeyCtrlGetKeyringId move to SystemInit()

Merge pull request !1596 from linqiheng/session_keyring
......@@ -94,6 +94,10 @@ static int FdHolderSockInit(void)
void SystemInit(void)
{
SignalInit();
// Set up a session keyring that all processes will have access to.
KeyCtrlGetKeyringId(KEY_SPEC_SESSION_KEYRING, 1);
// umask call always succeeds and return the previous mask value which is not needed here
(void)umask(DEFAULT_UMASK_INIT);
MakeDirRecursive("/dev/unix/socket", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
......@@ -199,9 +203,6 @@ static void StartInitSecondStage(void)
// It will panic if close stdio before execv("/bin/sh", NULL)
CloseStdio();
// Set up a session keyring that all processes will have access to.
KeyCtrlGetKeyringId(KEY_SPEC_SESSION_KEYRING, 1);
#ifndef DISABLE_INIT_TWO_STAGES
INIT_LOGI("Start init second stage.");
SwitchRoot("/usr");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册