/base/powermgr/thermal_manager/services/native/test/unittest/src/ |
D | thermal_utils_test.cpp | 39 std::string dir = ""; variable 41 EXPECT_EQ(true, FileOperation::CreateNodeDir(dir) != ERR_OK); 42 EXPECT_EQ(true, FileOperation::CreateNodeFile(dir) != ERR_OK); 43 dir = "/thermaltest/"; 44 EXPECT_EQ(true, FileOperation::CreateNodeDir(dir) == ERR_OK); 45 dir = "/thermaltest/thermaltest.txt"; 46 EXPECT_EQ(true, FileOperation::CreateNodeFile(dir) == ERR_OK); 48 EXPECT_EQ(true, FileOperation::WriteFile(dir, dir, size) == ERR_OK); 49 dir = ""; 50 EXPECT_EQ(true, FileOperation::ReadFile(dir.c_str(), buf, size) != ERR_OK); [all …]
|
/base/security/selinux/sepolicy/ohos_policy/test_framework/wukong/system/ |
D | sh.te | 16 allow sh accessibility:dir { getattr search }; 18 allow sh accesstoken_service:dir { getattr search }; 20 allow sh accountmgr:dir { getattr search }; 22 allow sh appspawn:dir { getattr search }; 24 allow sh audio_hdi_server_host:dir { getattr search }; 26 allow sh audio_policy:dir { getattr search }; 28 allow sh blue_host:dir { getattr search }; 30 allow sh bluetooth_service:dir { getattr search }; 32 allow sh bootanimation:dir { search }; 34 allow sh camera_host:dir { getattr search }; [all …]
|
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/ |
D | file_util.cpp | 41 bool IsDirectory(const std::string& dir) in IsDirectory() argument 44 return lstat(dir.c_str(), &statBuf) == 0 ? S_ISDIR(statBuf.st_mode) : false; in IsDirectory() 52 bool RemoveDirectory(const std::string& dir) in RemoveDirectory() argument 54 return !IsFileExists(dir) || (rmdir(dir.c_str()) == 0); in RemoveDirectory() 57 bool ForceCreateDirectory(const std::string& dir) in ForceCreateDirectory() argument 62 index = dir.find('/', index + 1); // (index + 1) means the next char traversed in ForceCreateDirectory() 64 subPath = dir; in ForceCreateDirectory() 66 subPath = dir.substr(0, index); in ForceCreateDirectory() 73 return IsFileExists(dir); in ForceCreateDirectory() 76 bool ForceRemoveDirectory(const std::string& dir, bool isDeleteSelf) in ForceRemoveDirectory() argument [all …]
|
/base/security/selinux/sepolicy/base/te/ |
D | sh.te | 14 allow sh accessibility:dir { getattr search }; 16 allow sh accesstoken_service:dir { getattr search }; 19 allow sh accountmgr:dir { getattr search }; 21 allow sh appspawn:dir { getattr search }; 24 allow sh audio_hdi_server_host:dir { getattr search }; 27 allow sh audio_policy:dir { getattr search }; 30 allow sh blue_host:dir { getattr search }; 32 allow sh bluetooth_service:dir { getattr search }; 37 allow sh camera_host:dir { getattr search }; 39 allow sh camera_service:dir { getattr search }; [all …]
|
D | appspawn.te | 21 allow appspawn configfs:dir { mounton }; 30 allow appspawn data_app_el1_file:dir { add_name create mounton search write }; 31 allow appspawn data_app_el2_file:dir { search mounton }; 32 allow appspawn data_app_file:dir { search }; 33 allow appspawn data_file:dir { add_name create mounton search write }; 34 allow appspawn data_service_el2_file:dir { search }; 35 allow appspawn data_service_el2_hmdfs:dir { search }; 36 allow appspawn data_service_file:dir { search }; 37 allow appspawn data_storage:dir { mounton }; 41 allow appspawn dev_file:dir { mounton }; [all …]
|
D | init.te | 24 allow init bootanimation:dir { search }; 33 allow init cgroup:dir { add_name create open read search setattr write }; 38 allow init config_file:dir { mounton }; 39 allow init configfs:dir { add_name create mounton open read search setattr write }; 52 allow init data_appasec:dir { getattr open read relabelto setattr }; 53 allow init data_app_el1_file:dir { add_name create getattr open read relabelto search setattr write… 54 allow init data_app_el2_file:dir { add_name create getattr open read relabelto search setattr write… 55 allow init data_app_el3_file:dir { add_name create getattr open read relabelto search setattr write… 56 allow init data_app_el4_file:dir { add_name create getattr open read relabelto search setattr write… 57 allow init data_appephemeral:dir { getattr open read relabelto setattr }; [all …]
|
D | storage_daemon.te | 26 allow storage_daemon data_app_el1_file:dir { add_name create getattr open read search setattr write… 27 allow storage_daemon data_app_el2_file:dir { add_name create getattr open read search setattr write… 28 allow storage_daemon data_app_file:dir { search }; 29 allow storage_daemon data_chipset_el1_file:dir { add_name create getattr open read search setattr w… 30 allow storage_daemon data_chipset_el2_file:dir { add_name create getattr open read search setattr w… 31 allow storage_daemon data_chipset_file:dir { search }; 32 allow storage_daemon data_file:dir { search }; 33 allow storage_daemon data_service_el1_file:dir { add_name create getattr open read search setattr w… 34 allow storage_daemon data_service_el2_file:dir { add_name create getattr open read relabelfrom sear… 35 allow storage_daemon data_service_el2_hmdfs:dir { add_name create getattr open read read open relab… [all …]
|
D | hdf_devmgr.te | 15 allow hdf_devmgr a2dp_host:dir { search }; 19 allow hdf_devmgr audio_hdi_server_host:dir { search }; 23 allow hdf_devmgr blue_host:dir { search }; 27 allow hdf_devmgr bluetooth_service:dir { search }; 34 allow hdf_devmgr camera_host:dir { search }; 38 allow hdf_devmgr camera_service:dir { search }; 42 allow hdf_devmgr codec_host:dir { search }; 54 allow hdf_devmgr dcamera:dir { search }; 57 allow hdf_devmgr dcamera_host:dir { search }; 65 allow hdf_devmgr dev_unix_socket:dir { search }; [all …]
|
D | nwebspawn.te | 25 allow nwebspawn data_app_el1_file:dir { mounton search }; 27 allow nwebspawn data_app_el2_file:dir { search }; 28 allow nwebspawn data_app_file:dir { search }; 43 allow nwebspawn normal_hap_data_file:dir { mounton }; 50 allow nwebspawn proc_file:dir { mounton }; 51 allow nwebspawn rootfs:dir { mounton }; 54 allow nwebspawn sys_file:dir { mounton }; 56 allow nwebspawn system_bin_file:dir { mounton search }; 58 allow nwebspawn system_etc_file:dir { mounton }; 59 allow nwebspawn system_file:dir { mounton }; [all …]
|
/base/security/selinux/sepolicy/ohos_policy/arkXtest/arkXtest/system/ |
D | sh.te | 15 allow sh accessibility:dir { getattr search }; 17 allow sh accountmgr:dir { getattr search }; 19 allow sh appspawn:dir { getattr search }; 21 allow sh audio_hdi_server_host:dir { getattr search }; 23 allow sh audio_policy:dir { getattr search }; 25 allow sh blue_host:dir { getattr search }; 27 allow sh bluetooth_service:dir { getattr search }; 29 allow sh camera_host:dir { getattr search }; 32 allow sh codec_host:dir { getattr search }; 34 allow sh console:dir { getattr search }; [all …]
|
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/ |
D | hiappevent_clean.cpp | 32 void CreateCleaners(const std::string& dir, std::vector<std::shared_ptr<AppEventCleaner>>& cleaners) in CreateCleaners() argument 34 cleaners.push_back(std::make_shared<AppEventDbCleaner>(dir)); in CreateCleaners() 35 cleaners.push_back(std::make_shared<AppEventLogCleaner>(dir)); in CreateCleaners() 38 uint64_t GetCurStorageSize(const std::string& dir) in GetCurStorageSize() argument 41 CreateCleaners(dir, cleaners); in GetCurStorageSize() 49 bool IsStorageSpaceFull(const std::string& dir, uint64_t maxSize) in IsStorageSpaceFull() argument 51 return GetCurStorageSize(dir) > maxSize; in IsStorageSpaceFull() 54 bool ReleaseSomeStorageSpace(const std::string& dir, uint64_t maxSize) in ReleaseSomeStorageSpace() argument 58 CreateCleaners(dir, cleaners); in ReleaseSomeStorageSpace() 59 auto curSize = GetCurStorageSize(dir); in ReleaseSomeStorageSpace() [all …]
|
/base/security/selinux/sepolicy/base/public/ |
D | appspawn.te | 14 neverallow appspawn data_cache:dir ~{ read_dir_perms }; 17 #(allow appspawn data_app_el1_file (dir (add_name))) 18 #(allow appspawn data_app_el1_file (dir (create))) 19 #(allow appspawn data_app_el1_file (dir (mounton))) 20 #(allow appspawn data_app_el1_file (dir (search))) 21 #(allow appspawn data_app_el1_file (dir (write))) 22 #(allow appspawn data_app_el2_file (dir (search))) 23 #(allow appspawn data_app_file (dir (search))) 24 #(allow appspawn normal_hap_data_file (dir (mounton))) 25 #(allow appspawn system_basic_hap_data_file (dir (mounton))) [all …]
|
/base/security/selinux/sepolicy/ohos_policy/bundlemanager/distributed_bundle_framework/system/ |
D | sh.te | 14 allow sh configfs:dir { add_name create search write }; 16 allow sh d-bms:dir { getattr search }; 18 allow sh data_app_file:dir { search }; 19 allow sh data_file:dir { add_name create setattr write }; 21 allow sh data_service_el1_file:dir { getattr search }; 23 allow sh data_service_file:dir { search }; 24 allow sh dcamera:dir { getattr search }; 26 allow sh dcamera_host:dir { getattr search }; 29 allow sh dhardware:dir { getattr search }; 33 allow sh dscreen:dir { getattr search }; [all …]
|
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/include/ |
D | file_util.h | 27 bool IsDirectory(const std::string& dir); 29 bool RemoveDirectory(const std::string& dir); 30 bool ForceCreateDirectory(const std::string& dir); 31 bool ForceRemoveDirectory(const std::string& dir, bool isDeleteSelf = true); 32 void GetDirFiles(const std::string& dir, std::vector<std::string>& files); 33 uint64_t GetDirSize(const std::string& dir); 36 std::string GetFilePathByDir(const std::string& dir, const std::string& fileName);
|
/base/security/selinux/sepolicy/ohos_policy/ability/ability_runtime/system/ |
D | sh.te | 14 allow sh accessibility:dir { getattr search }; 16 allow sh accountmgr:dir { getattr search }; 21 allow sh bluetooth_service:dir { getattr search }; 26 allow sh data_data_file:dir { add_name create read search setattr write }; 27 allow sh data_file:dir { write }; 30 allow sh deviceauth_service:dir { getattr search }; 33 allow sh edm_sa:dir { getattr search }; 38 allow sh hdf_devmgr:dir { getattr search }; 42 allow sh hilogd:dir { getattr search }; 45 allow sh huks_service:dir { getattr search }; [all …]
|
/base/security/selinux/sepolicy/ohos_policy/hiviewdfx/faultloggerd/system/ |
D | processdump.te | 46 allow processdump domain:dir { getattr open read search }; 61 allow processdump processdump:dir { search }; 70 allow processdump normal_hap:dir { getattr open read search }; 72 allow processdump app_el1_bundle_public:dir search; 73 allow processdump data_app_el1_file:dir search; # remove later 87 allow processdump init:dir { getattr open read search }; 96 allow processdump foundation:dir { getattr open read search }; 100 allow processdump data_init_agent:dir search; 101 allow processdump data_file:dir search; 104 allow processdump dev_file:dir { search }; [all …]
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
D | cm_event_process.c | 138 DIR *dir = opendir(dirPath); in RemoveDir() local 139 if (dir == NULL) { in RemoveDir() 143 struct dirent *dire = readdir(dir); in RemoveDir() 151 dire = readdir(dir); in RemoveDir() 153 (void)closedir(dir); in RemoveDir() 197 DIR *dir = opendir(path); in CmTraversalUidLayerDir() local 198 if (dir == NULL) { in CmTraversalUidLayerDir() 203 struct dirent *dire = readdir(dir); in CmTraversalUidLayerDir() 206 closedir(dir); in CmTraversalUidLayerDir() 213 dire = readdir(dir); in CmTraversalUidLayerDir() [all …]
|
/base/security/huks/utils/file_operator/ |
D | hks_file_operator.c | 263 DIR *dir = (DIR *)dirp; in HksGetDirFile() local 264 struct dirent *dire = readdir(dir); in HksGetDirFile() 268 dire = readdir(dir); in HksGetDirFile() 322 DIR *dir = opendir(dirPath); in HksRemoveDir() local 323 HKS_IF_NULL_LOGE_RETURN(dir, HKS_ERROR_OPEN_FILE_FAIL, "open dir failed") in HksRemoveDir() 325 struct dirent *dire = readdir(dir); in HksRemoveDir() 331 dire = readdir(dir); in HksRemoveDir() 334 closedir(dir); in HksRemoveDir() 342 DIR *dir = opendir(path); in HksDeletDirPartTwo() local 343 HKS_IF_NULL_LOGE_RETURN(dir, HKS_ERROR_OPEN_FILE_FAIL, "open dir failed") in HksDeletDirPartTwo() [all …]
|
/base/security/selinux/sepolicy/ohos_policy/bundlemanager/bundle_framework/system/ |
D | sh.te | 14 allow sh bootanimation:dir { getattr }; 15 allow sh configfs:dir { add_name create search write }; 17 allow sh data_app_file:dir { open read search }; 18 allow sh data_data_file:dir { open remove_name rmdir }; 19 allow sh data_file:dir { add_name create setattr write rmdir}; 21 allow sh data_local_tmp:dir { open read }; 23 allow sh data_service_el1_file:dir { getattr search }; 25 allow sh data_service_file:dir { search }; 33 allow sh normal_hap_data_file:dir { getattr open read }; 38 allow sh selinuxfs:dir { search }; [all …]
|
D | installs.te | 19 allow installs data_app_el1_file:dir { add_name getattr open read remove_name rmdir search write }; 21 allow installs data_app_el2_file:dir { add_name create getattr open read remove_name search setattr… 22 allow installs data_app_file:dir { search }; 24 allow installs data_service_el1_file:dir { remove_name search rmdir }; 26 allow installs data_service_el2_file:dir { add_name create open read search setattr write getattr }; 27 allow installs data_service_el2_hmdfs:dir { getattr }; 28 allow installs data_service_file:dir { search }; 29 allow installs dev_unix_socket:dir { search }; 30 allow installs normal_hap_data_file:dir { getattr open read relabelfrom relabelto remove_name rmdir… 33 allow installs selinuxfs:dir { search }; [all …]
|
/base/security/selinux/sepolicy/ohos_policy/distributeddatamgr/distributeddatamgr/system/ |
D | distributeddata.te | 18 allow distributeddata accountmgr:dir { search }; 21 allow distributeddata data_app_el1_database_file:dir { add_name create open read remove_name rmdir … 23 allow distributeddata data_app_el2_database_file:dir { add_name create open read remove_name rmdir … 25 allow distributeddata data_app_el3_database_file:dir { add_name create open read remove_name rmdir … 27 allow distributeddata data_app_el4_database_file:dir { add_name create open read remove_name rmdir … 29 allow distributeddata data_app_file:dir { search }; 30 allow distributeddata data_file:dir { search }; 31 allow distributeddata data_misc_ce:dir { add_name create getattr open read remove_name rmdir search… 33 allow distributeddata data_misc_de:dir { add_name create getattr open read remove_name rmdir search… 35 allow distributeddata data_service_el0_file:dir { search }; [all …]
|
/base/security/selinux/sepolicy/ohos_policy/resourceschedule/resource_schedule_service/system/ |
D | resource_schedule_service.te | 32 allow resource_schedule_service cgroup:dir { add_name search write }; 37 allow resource_schedule_service chip_prod_file:dir { search }; 39 allow resource_schedule_service vendor_lib_file:dir { search }; 41 allow resource_schedule_service vendor_file:dir { search }; 43 allow resource_schedule_service vendor_etc_file:dir { search }; 46 allow resource_schedule_service system_basic_hap:dir { open read search }; 49 allow resource_schedule_service system_bin_file:dir { search }; 51 allow resource_schedule_service system_core_hap:dir { open read search }; 54 allow resource_schedule_service system_fonts_file:dir { search }; 56 allow resource_schedule_service system_usr_file:dir { search map }; [all …]
|
/base/security/selinux/sepolicy/ohos_policy/developtools/hdc/system/ |
D | hdcd.te | 15 allow hdcd data_local:dir { search getattr read write add_name open create }; 17 allow hdcd data_local_tmp:dir { add_name remove_name write create setattr search getattr read open … 18 allow hdcd data_local_traces:dir { read open getattr }; 21 allow hdcd vendor_lib_file:dir { read getattr search }; 38 allow hdcd vendor_file:dir { getattr }; 39 allow hdcd tmpfs:dir { open read }; 41 allow hdcd data_file:dir { read write open create getattr search rmdir add_name }; 43 allow hdcd system_file:dir { getattr }; 48 allow hdcd system_bin_file:dir { search getattr }; 55 allow hdcd dev_unix_socket:dir { search }; [all …]
|
/base/hiviewdfx/faultloggerd/utils/ |
D | directory_ex.cpp | 84 DIR *dir = opendir(path.c_str()); in GetDirFiles() local 85 if (dir == nullptr) { in GetDirFiles() 90 struct dirent *ptr = readdir(dir); in GetDirFiles() 105 closedir(dir); in GetDirFiles() 134 DIR *dir = opendir(path.c_str()); in ForceRemoveDirectory() local 135 if (dir == nullptr) { in ForceRemoveDirectory() 140 struct dirent *ptr = readdir(dir); in ForceRemoveDirectory() 155 closedir(dir); in ForceRemoveDirectory() 161 closedir(dir); in ForceRemoveDirectory() 223 DIR *dir = opendir(path.c_str()); in ChangeModeDirectory() local [all …]
|
/base/security/selinux/sepolicy/ohos_policy/web/webview/system/ |
D | nwebspawn.te | 14 …fs" ino=40 scontext=u:r:nwebspawn:s0 tcontext=u:object_r:dev_unix_socket:s0 tclass=dir permissive=1 15 allow nwebspawn dev_unix_socket:dir { search }; 17 …mmcblk0p11" ino=2 scontext=u:r:nwebspawn:s0tcontext=u:object_r:data_file:s0 tclass=dir permissive=1 18 allow nwebspawn data_file:dir { search }; 25 … ino=89761 scontext=u:r:nwebspawn:s0 tcontext=u:object_r:data_init_agent:s0 tclass=dir permissive=1 26 allow nwebspawn data_init_agent:dir { search }; 36 …selinuxfs" ino=1 scontext=u:r:nwebspawn:s0 tcontext=u:object_r:selinuxfs:s0 tclass=dir permissive=1 37 allow nwebspawn selinuxfs:dir { search }; 53 …figfs" ino=14342 scontext=u:r:normal_hap:s0 tcontext=u:object_r:configfs:s0 tclass=dir permissive=1 54 allow nwebspawn configfs:dir { mounton }; [all …]
|