mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-23 07:00:17 +00:00
fix: 修改SetAppSandboxProperty函数
Signed-off-by: 樊景乐 <fanjingle@h-partners.com>
This commit is contained in:
parent
2b24574f32
commit
6eb07aa48c
@ -198,7 +198,7 @@ static int InitSandboxContext(SandboxContext *context,
|
||||
context->message = property->message;
|
||||
|
||||
context->sandboxNsFlags = CLONE_NEWNS;
|
||||
if (CheckSpawningMsgFlagSet(context, APP_FLAGS_ISOLATED_SANDBOX) ||
|
||||
if ((CheckSpawningMsgFlagSet(context, APP_FLAGS_ISOLATED_SANDBOX) && !IsDeveloperModeOpen()) ||
|
||||
CheckSpawningMsgFlagSet(context, APP_FLAGS_ISOLATED_NETWORK)) {
|
||||
context->sandboxNsFlags |= sandbox->sandboxNsFlags & CLONE_NEWNET ? CLONE_NEWNET : 0;
|
||||
}
|
||||
|
@ -1756,7 +1756,7 @@ int32_t SetAppSandboxProperty(AppSpawnMgr *content, AppSpawningCtx *property)
|
||||
}
|
||||
}
|
||||
uint32_t sandboxNsFlags = CLONE_NEWNS;
|
||||
if (CheckAppMsgFlagsSet(property, APP_FLAGS_ISOLATED_SANDBOX) ||
|
||||
if ((CheckAppMsgFlagsSet(property, APP_FLAGS_ISOLATED_SANDBOX) && !IsDeveloperModeOpen()) ||
|
||||
CheckAppMsgFlagsSet(property, APP_FLAGS_ISOLATED_NETWORK)) {
|
||||
sandboxNsFlags |= content->content.sandboxNsFlags & CLONE_NEWNET ? CLONE_NEWNET : 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user