diff --git a/interfaces/innerkits/sandbox/include/sandbox.h b/interfaces/innerkits/sandbox/include/sandbox.h index 4fa96f2b9afe143fed4f358f527a465f15cd159e..b1267b276c0599be47dcc820b71527b58d11ec35 100644 --- a/interfaces/innerkits/sandbox/include/sandbox.h +++ b/interfaces/innerkits/sandbox/include/sandbox.h @@ -56,7 +56,6 @@ bool InitSandboxWithName(const char *name); int PrepareSandbox(const char *name); int EnterSandbox(const char *name); void DestroySandbox(const char *name); -int CheckSupportSandbox(void); void DumpSandboxByName(const char *name); #ifdef __cplusplus } diff --git a/interfaces/innerkits/sandbox/include/sandbox_namespace.h b/interfaces/innerkits/sandbox/include/sandbox_namespace.h index 4e398a5979fd81a9de447dddc57d5746634fe44c..8137d73e691fe124434efca6f37e215050a356a3 100644 --- a/interfaces/innerkits/sandbox/include/sandbox_namespace.h +++ b/interfaces/innerkits/sandbox/include/sandbox_namespace.h @@ -23,7 +23,7 @@ extern "C" { int GetNamespaceFd(const char *nsPath); int UnshareNamespace(int nsType); -int SetNamespce(int nsFd, int nsType); +int SetNamespace(int nsFd, int nsType); void InitDefaultNamespace(void); int EnterDefaultNamespace(void); void CloseDefaultNamespace(void); @@ -33,4 +33,5 @@ void CloseDefaultNamespace(void); } #endif #endif -#endif \ No newline at end of file +#endif + diff --git a/interfaces/innerkits/sandbox/sandbox.c b/interfaces/innerkits/sandbox/sandbox.c old mode 100755 new mode 100644 index 9eff48c95a4fb9192092a9118de7dfcb6e45d316..76c85a31fce22aea178e3bd7f0ea8dff597326f2 --- a/interfaces/innerkits/sandbox/sandbox.c +++ b/interfaces/innerkits/sandbox/sandbox.c @@ -602,7 +602,7 @@ int EnterSandbox(const char *name) return -1; } if (sandbox->ns > 0) { - if (SetNamespce(sandbox->ns, CLONE_NEWNS) < 0) { + if (SetNamespace(sandbox->ns, CLONE_NEWNS) < 0) { BEGET_LOGE("Failed to enter mount namespace for sandbox \' %s \', err=%d.", name, errno); return -1; } diff --git a/interfaces/innerkits/sandbox/sandbox_namespace.c b/interfaces/innerkits/sandbox/sandbox_namespace.c index 071f129811565f6be6ba54976c4473fd9e7d76b5..3fef1a33eec43de35773fd6652ec31bab0ab066c 100644 --- a/interfaces/innerkits/sandbox/sandbox_namespace.c +++ b/interfaces/innerkits/sandbox/sandbox_namespace.c @@ -51,7 +51,7 @@ int UnshareNamespace(int nsType) } } -int SetNamespce(int nsFd, int nsType) +int SetNamespace(int nsFd, int nsType) { if (nsFd < 0) { BEGET_LOGE("Failed get namespace fd"); @@ -78,7 +78,7 @@ int EnterDefaultNamespace(void) if (g_defaultNs < 0) { return -1; } - return SetNamespce(g_defaultNs, CLONE_NEWNS); + return SetNamespace(g_defaultNs, CLONE_NEWNS); } void CloseDefaultNamespace(void)