已合并
feat: Remove hiprofiler whitelist check in hidumper #803
hanson_027创建于 8月31日
feat: Remove hiprofiler whitelist check in hidumper #803
已合并
共 1 个文件变更+1-2
| @@ -48,7 +48,6 @@ namespace { | |||
| 48 | const std::string DUMPMGR_SERVICE_NAME = "HiDumperManagerService"; | 48 | const std::string DUMPMGR_SERVICE_NAME = "HiDumperManagerService"; |
| 49 | auto dumpManagerService = DumpDelayedSpSingleton<DumpManagerService>::GetInstance(); | 49 | auto dumpManagerService = DumpDelayedSpSingleton<DumpManagerService>::GetInstance(); |
| 50 | const bool G_REGISTER_RESULT = SystemAbility::MakeAndRegisterAbility(dumpManagerService.GetRefPtr()); | 50 | const bool G_REGISTER_RESULT = SystemAbility::MakeAndRegisterAbility(dumpManagerService.GetRefPtr()); |
| 51 | -static const int32_t HIPORFILER_UID = 3063; | ||
| 52 | static const int32_t STOP_WAIT = 3; | 51 | static const int32_t STOP_WAIT = 3; |
| 53 | static const int32_t REQUEST_MAX = 5; | 52 | static const int32_t REQUEST_MAX = 5; |
| 54 | static const uint32_t REQUESTID_MAX = 100000; | 53 | static const uint32_t REQUESTID_MAX = 100000; |
| @@ -176,7 +175,7 @@ int32_t DumpManagerService::Request(std::vector<std::u16string> &args, int outfd | |||
| 176 | return DumpStatus::DUMP_FAIL; | 175 | return DumpStatus::DUMP_FAIL; |
| 177 | } | 176 | } |
| 178 | int32_t uid = IPCSkeleton::GetCallingUid(); | 177 | int32_t uid = IPCSkeleton::GetCallingUid(); |
D | |||
| 179 | - if (!HasDumpPermission() && uid != HIPORFILER_UID) { | 178 | + if (!HasDumpPermission()) { |
| 180 | DUMPER_HILOGE(MODULE_SERVICE, "No dump permission, please check!, uid:%{public}d.", uid); | 179 | DUMPER_HILOGE(MODULE_SERVICE, "No dump permission, please check!, uid:%{public}d.", uid); |
| 181 | HandleRequestError(args, outfd, static_cast<int32_t>(DumpStatus::DUMP_FAIL), "no dump permission"); | 180 | HandleRequestError(args, outfd, static_cast<int32_t>(DumpStatus::DUMP_FAIL), "no dump permission"); |
| 182 | return DumpStatus::DUMP_FAIL; | 181 | return DumpStatus::DUMP_FAIL; |
查一下这个Uid是不是只有hiporfiler用,只有hiporfiler用可以删除