diff --git a/nwebspawn.cfg b/nwebspawn.cfg index f29e3c899b67e8ca195e09f52382d62b02503c44..a0cbe42d51bc005adaea472939a99e5ec9bcbcd4 100644 --- a/nwebspawn.cfg +++ b/nwebspawn.cfg @@ -7,7 +7,7 @@ "--sandbox-switch on --bundle-name com.ohos.nwebspawn.startup --app-operate-type operate ", "--render-command command --app-launch-type singleton --app-visible true"], "uid" : "nwebspawn", - "gid" : ["nwebspawn"], + "gid" : ["nwebspawn", "system"], "setuid" : true, "caps" : ["CAP_SYS_ADMIN", "CAP_SETGID", "CAP_SETUID", "CAP_KILL"], "socket" : [{ diff --git a/standard/appspawn_kickdog.c b/standard/appspawn_kickdog.c index a471c7d12a26a4273964f53f20cb4548ae1b6f4c..0300f216cd1e22d0221bf8fdd86b5b8aa924a79d 100644 --- a/standard/appspawn_kickdog.c +++ b/standard/appspawn_kickdog.c @@ -73,7 +73,7 @@ static void DealSpawnWatchdog(AppSpawnContent *content, bool isOpen) if (isOpen) { content->wdgOpened = (result != -1); } - APPSPAWN_DUMP_LOGI("%{public}s %{public}s %{public}d", + APPSPAWN_KLOGI("%{public}s %{public}s %{public}d", (content->mode == MODE_FOR_NWEB_SPAWN) ? "Nweb" : "Apps", isOpen ? "enable" : "kick", result); } diff --git a/util/include/appspawn_utils.h b/util/include/appspawn_utils.h index 3317f1bacd41632b38669a4e89b39c7510a795ba..2d1965551fcb024e4240559918ec6a63c4f1d2ce 100644 --- a/util/include/appspawn_utils.h +++ b/util/include/appspawn_utils.h @@ -188,7 +188,9 @@ int EnableNewNetNamespace(void); HILOG_INFO(LOG_CORE, fmt, ##__VA_ARGS__); \ AppSpawnDump(fmt "\n", ##__VA_ARGS__); \ } while (0) - +#define APPSPAWN_KLOGI(fmt, ...) \ + ((void)HiLogPrint(LOG_KMSG, LOG_INFO, LOG_DOMAIN, LOG_TAG, \ + "[%{public}s:%{public}d]" fmt, (APP_FILE_NAME), (__LINE__), ##__VA_ARGS__)) #else #define APPSPAWN_LOGI(fmt, ...) \ @@ -201,6 +203,8 @@ int EnableNewNetNamespace(void); HILOG_FATAL(HILOG_MODULE_HIVIEW, "[%{public}s:%{public}d]" fmt, (APP_FILE_NAME), (__LINE__), ##__VA_ARGS__) #define APPSPAWN_DUMP_LOGI(fmt, ...) \ HILOG_INFO(HILOG_MODULE_HIVIEW, fmt, ##__VA_ARGS__) +#define APPSPAWN_KLOGI(fmt, ...) \ + HILOG_INFO(HILOG_MODULE_HIVIEW, "[%{public}s:%{public}d]" fmt, (APP_FILE_NAME), (__LINE__), ##__VA_ARGS__) #endif #define APPSPAWN_CHECK(retCode, exper, fmt, ...) \