From 0b6774d77f04da9aff36fbb842328c0f12205ed6 Mon Sep 17 00:00:00 2001 From: Lihong Kou Date: Tue, 4 Apr 2023 01:02:54 +0000 Subject: [PATCH] dfs: change the cloud daemon to a single process Signed-off-by: Lihong Kou Change-Id: I433534007583cfeca8ef15c01462d49ba59d4d7a --- services/5205.xml | 4 ++-- services/cloudfiledaemon/src/ipc/cloud_daemon.cpp | 1 - services/distributedfile.cfg | 12 ++++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/services/5205.xml b/services/5205.xml index 5506608b2..885af335f 100644 --- a/services/5205.xml +++ b/services/5205.xml @@ -14,12 +14,12 @@ * limitations under the License. --> - distributedfiledaemon + cloudfiledaemon 5205 libcloudfiledaemon.z.so 60000 - false + true false 1 diff --git a/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp b/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp index 689fd0c4f..e67f83c2d 100644 --- a/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp +++ b/services/cloudfiledaemon/src/ipc/cloud_daemon.cpp @@ -55,7 +55,6 @@ void CloudDaemon::OnStart() try { PublishSA(); - AddSystemAbilityListener(COMMON_EVENT_SERVICE_ID); } catch (const exception &e) { LOGE("%{public}s", e.what()); } diff --git a/services/distributedfile.cfg b/services/distributedfile.cfg index 591bda611..af1eaf94c 100644 --- a/services/distributedfile.cfg +++ b/services/distributedfile.cfg @@ -14,5 +14,17 @@ "ohos.permission.MANAGE_LOCAL_ACCOUNTS", "ohos.permission.ACCESS_SERVICE_DM" ] + }, { + "name": "cloudfiledaemon", + "path": ["/system/bin/sa_main", "/system/profile/cloudfiledaemon.xml"], + "uid": "1009", + "gid": ["system", "dfs"], + "secon": "u:r:distributedfiledaemon:s0", + "apl": "system_basic", + "permission" : [ + "ohos.permission.DISTRIBUTED_DATASYNC", + "ohos.permission.MANAGE_LOCAL_ACCOUNTS", + "ohos.permission.ACCESS_SERVICE_DM" + ] }] } -- Gitee