From 5de08e4450b4e67ddbe62c0901480c060858d536 Mon Sep 17 00:00:00 2001 From: maojingjing Date: Fri, 31 Dec 2021 11:36:13 +0800 Subject: [PATCH] 1.Sensitive default false 2. del d2d code Signed-off-by: maojingjing --- .../src/network/kernel_talker.cpp | 24 +++---------------- utils/system/include/utils_mount_argument.h | 5 ++-- utils/system/src/utils_mount_argument.cpp | 8 +++---- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/services/distributedfiledaemon/src/network/kernel_talker.cpp b/services/distributedfiledaemon/src/network/kernel_talker.cpp index 9666c01b3..69b46a005 100644 --- a/services/distributedfiledaemon/src/network/kernel_talker.cpp +++ b/services/distributedfiledaemon/src/network/kernel_talker.cpp @@ -33,13 +33,8 @@ struct UpdateSocketParam { int32_t cmd; int32_t newfd; uint8_t status; - uint8_t protocol; - uint16_t udpPort; - uint8_t deviceType; uint8_t masterKey[KEY_MAX_LEN]; char cid[CID_MAX_LEN]; - int32_t linkType; - int32_t binderFd; } __attribute__((packed)); struct OfflineParam { @@ -51,7 +46,6 @@ enum { CMD_UPDATE_SOCKET = 0, CMD_OFF_LINE, CMD_OFF_LINE_ALL, - CMD_DELETE_CONNECTION, CMD_CNT, }; @@ -60,15 +54,9 @@ enum { SOCKET_STAT_OPEN, }; -enum { - TCP_TRANSPORT_PROTO = 0, - UDP_TRANSPORT_PROTO, -}; - enum Notify { - NOTIFY_HS_DONE = 0, + NOTIFY_GET_SESSION = 0, NOTIFY_OFFLINE, - NOTIFY_GET_SESSION, NOTIFY_NONE, NOTIFY_CNT, }; @@ -87,9 +75,6 @@ void KernelTalker::SinkSessionTokernel(shared_ptr session) .cmd = CMD_UPDATE_SOCKET, .newfd = socketFd, .status = status, - .protocol = TCP_TRANSPORT_PROTO, - .linkType = 0, - .binderFd = -1, }; if (memcpy_s(cmd.masterKey, KEY_MAX_LEN, masterkey.data(), KEY_MAX_LEN) != EOK) { return; @@ -208,16 +193,13 @@ void KernelTalker::NotifyHandler(NotifyParam ¶m) int cmd = param.notify; string cidStr(param.remoteCid, CID_MAX_LEN); switch (cmd) { - case NOTIFY_HS_DONE: - LOGI("NOTIFY_HS_DONE, remote cid %{public}s", cidStr.c_str()); + case NOTIFY_GET_SESSION: + GetSessionCallback_(param); break; case NOTIFY_OFFLINE: LOGI("NOTIFY_OFFLINE, remote cid %{public}s", cidStr.c_str()); CloseSessionCallback_(cidStr); break; - case NOTIFY_GET_SESSION: - GetSessionCallback_(param); - break; default: LOGI("cmd %{public}d not support now", cmd); break; diff --git a/utils/system/include/utils_mount_argument.h b/utils/system/include/utils_mount_argument.h index f68fbc18d..8a1229229 100644 --- a/utils/system/include/utils_mount_argument.h +++ b/utils/system/include/utils_mount_argument.h @@ -28,7 +28,7 @@ struct MountArgument final { std::string groupId_; bool needInitDir_{false}; bool useCache_{false}; - bool caseSensitive_{true}; + bool caseSensitive_{false}; bool enableMergeView_{false}; bool enableFixupOwnerShip_{false}; bool enableOfflineStash_{true}; @@ -53,4 +53,5 @@ public: } // namespace DistributedFile } // namespace Storage } // namespace OHOS -#endif // UTILS_MOUNT_ARGUMENT_H \ No newline at end of file +#endif // UTILS_MOUNT_ARGUMENT_H + diff --git a/utils/system/src/utils_mount_argument.cpp b/utils/system/src/utils_mount_argument.cpp index 01a4f8ab0..4580239a2 100644 --- a/utils/system/src/utils_mount_argument.cpp +++ b/utils/system/src/utils_mount_argument.cpp @@ -110,7 +110,7 @@ string MountArgument::OptionsToString() const unsigned long MountArgument::GetFlags() const { - return 0; + return MS_NODEV; } MountArgument MountArgumentDescriptors::Alpha(int userId) @@ -120,7 +120,7 @@ MountArgument MountArgumentDescriptors::Alpha(int userId) .needInitDir_ = true, .useCache_ = true, .enableMergeView_ = true, - .enableFixupOwnerShip_ = true, + .enableFixupOwnerShip_ = false, .enableOfflineStash_ = true, .externalFS_ = false, }; @@ -138,7 +138,7 @@ MountArgument MountArgumentDescriptors::SetAuthGroupMountArgument(const std::str .needInitDir_ = true, .useCache_ = true, .enableMergeView_ = true, - .enableFixupOwnerShip_ = true, + .enableFixupOwnerShip_ = false, .enableOfflineStash_ = true, .externalFS_ = false, .packageName_ = packageName, @@ -148,4 +148,4 @@ MountArgument MountArgumentDescriptors::SetAuthGroupMountArgument(const std::str } // namespace Utils } // namespace DistributedFile } // namespace Storage -} // namespace OHOS \ No newline at end of file +} // namespace OHOS -- Gitee