未验证 提交 9c0abcd8 编写于 作者: O openharmony_ci 提交者: Gitee

!1187 set up session keyring for fscrypt v1 keys

Merge pull request !1187 from linqiheng/fscrypt_fix
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "device.h" #include "device.h"
#include "fd_holder_service.h" #include "fd_holder_service.h"
#include "fs_manager/fs_manager.h" #include "fs_manager/fs_manager.h"
#include "key_control.h"
#include "init_control_fd_service.h" #include "init_control_fd_service.h"
#include "init_log.h" #include "init_log.h"
#include "init_mount.h" #include "init_mount.h"
...@@ -199,6 +200,9 @@ static void StartInitSecondStage(void) ...@@ -199,6 +200,9 @@ static void StartInitSecondStage(void)
// It will panic if close stdio before execv("/bin/sh", NULL) // It will panic if close stdio before execv("/bin/sh", NULL)
CloseStdio(); CloseStdio();
// Set up a session keyring that all processes will have access to.
KeyCtrlGetKeyringId(KEY_SPEC_SESSION_KEYRING, 1);
#ifndef DISABLE_INIT_TWO_STAGES #ifndef DISABLE_INIT_TWO_STAGES
SwitchRoot("/usr"); SwitchRoot("/usr");
// Execute init second stage // Execute init second stage
......
...@@ -453,10 +453,6 @@ static void DoInitMainUser(const struct CmdArgs *ctx) ...@@ -453,10 +453,6 @@ static void DoInitMainUser(const struct CmdArgs *ctx)
INIT_LOGE("DoInitMainUser: para invalid"); INIT_LOGE("DoInitMainUser: para invalid");
return; return;
} }
if (!InitFscryptPolicy()) {
INIT_LOGI("DoInitMainUser:init fscrypt failed,not enable fscrypt");
return;
}
char * const argv[] = { char * const argv[] = {
"/system/bin/sdc", "/system/bin/sdc",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册