diff --git a/services/storage_daemon/user/src/mount_manager.cpp b/services/storage_daemon/user/src/mount_manager.cpp index 429a1e91b4180d91ecfefd926c1dc4f6b3a0d968..645f0650263f73f3a52d02d8e0e0fdcb9b99f977 100644 --- a/services/storage_daemon/user/src/mount_manager.cpp +++ b/services/storage_daemon/user/src/mount_manager.cpp @@ -28,6 +28,7 @@ #include #include "hisysevent.h" #include "crypto/key_manager.h" +#include "utils/disk_utils.h" #include "utils/storage_radar.h" #include "ipc/istorage_daemon.h" #include "parameter.h" @@ -1217,7 +1218,7 @@ int32_t MountManager::MountDfsDocs(int32_t userId, const std::string &relativePa int32_t ret = Mount(srcPath, dstPath, nullptr, MS_BIND, nullptr); if (ret != 0 && errno != EEXIST && errno != EBUSY) { LOGE("MountDfsDocs mount bind failed, srcPath is %{public}s dstPath is %{public}s errno is %{public}d", - srcPath.c_str(), dstPath.c_str(), errno); + GetAnonyString(srcPath).c_str(), dstPath.c_str(), errno); return E_MOUNT; } return E_OK; @@ -1234,7 +1235,7 @@ int32_t MountManager::UMountDfsDocs(int32_t userId, const std::string &relativeP return E_UMOUNT; } - std::string dstPath = StringPrintf("/mnt/data/%d/hmdfs/%s", userId, deviceId.c_str()); + std::string dstPath = StringPrintf("/mnt/data/%d/hmdfs/%s", userId, GetAnonyString(deviceId).c_str()); sync(); int32_t ret = UMount2(dstPath, MNT_FORCE); if (ret != E_OK) { diff --git a/test/fuzztest/storagedaemon_fuzzer/BUILD.gn b/test/fuzztest/storagedaemon_fuzzer/BUILD.gn index f581770483c240c9b59c62a0ce0db9e27fcfcc89..481de2b941fce08ed4e1749d42c5a2e2b79a242a 100644 --- a/test/fuzztest/storagedaemon_fuzzer/BUILD.gn +++ b/test/fuzztest/storagedaemon_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("StorageDaemonFuzzTest") { ] deps = [ "${bundlemanager_framework_path}/services/bundlemgr:libbms", + "${storage_daemon_path}:storage_common_utils", "${storage_daemon_path}/libfscrypt:libfscryptutils", ] diff --git a/test/fuzztest/storagedaemoncreatesharefile_fuzzer/BUILD.gn b/test/fuzztest/storagedaemoncreatesharefile_fuzzer/BUILD.gn index 923a56977dc48d0266a3f5983c23db1bfef328bb..96a91b39b53f95244ecdeb4b4680586ea30f0fff 100644 --- a/test/fuzztest/storagedaemoncreatesharefile_fuzzer/BUILD.gn +++ b/test/fuzztest/storagedaemoncreatesharefile_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("StorageDaemonCreateShareFileFuzzTest") { ] deps = [ "${bundlemanager_framework_path}/services/bundlemgr:libbms", + "${storage_daemon_path}:storage_common_utils", "${storage_daemon_path}/libfscrypt:libfscryptutils", ] diff --git a/test/fuzztest/storagedaemondeletesharefile_fuzzer/BUILD.gn b/test/fuzztest/storagedaemondeletesharefile_fuzzer/BUILD.gn index bab136b6867faf44f9e67d1edbd605ebad99b8d6..2b4d4857af5d52c2908fa814db439a234c90a477 100644 --- a/test/fuzztest/storagedaemondeletesharefile_fuzzer/BUILD.gn +++ b/test/fuzztest/storagedaemondeletesharefile_fuzzer/BUILD.gn @@ -57,6 +57,7 @@ ohos_fuzztest("StorageDaemonDeleteShareFileFuzzTest") { ] deps = [ "${bundlemanager_framework_path}/services/bundlemgr:libbms", + "${storage_daemon_path}:storage_common_utils", "${storage_daemon_path}/libfscrypt:libfscryptutils", ]