From 061ad1cf7e653d9f6ccd8ea28b646b2c650876e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A8=8A=E6=99=AF=E4=B9=90?= Date: Wed, 16 Jul 2025 14:56:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=B8=A2=E7=8B=97?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 樊景乐 --- nwebspawn.cfg | 2 +- standard/appspawn_kickdog.c | 2 +- util/include/appspawn_utils.h | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nwebspawn.cfg b/nwebspawn.cfg index f29e3c89..a0cbe42d 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 a471c7d1..0300f216 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 3317f1ba..2d196555 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, ...) \ -- Gitee