/base/security/huks/utils/compatibility_bin/ |
H A D | compatibility_small_bin.c | 50 char curPath[DEFAULT_PATH_LEN] = { 0 }; in ChangeDirAndFilesPerm() local 52 ret = strcpy_s(curPath, DEFAULT_PATH_LEN, path); in ChangeDirAndFilesPerm() 56 ret = strcat_s(curPath, DEFAULT_PATH_LEN, "/"); in ChangeDirAndFilesPerm() 60 ret = strcat_s(curPath, DEFAULT_PATH_LEN, ptr->d_name); in ChangeDirAndFilesPerm() 65 ret = chown(curPath, HUKS_SERVICE_UID, HUKS_SERVICE_UID); in ChangeDirAndFilesPerm() 70 if (chmod(curPath, S_IRUSR | S_IWUSR) < 0) { in ChangeDirAndFilesPerm() 74 if (chmod(curPath, S_IRWXU) < 0) { in ChangeDirAndFilesPerm() 77 ChangeDirAndFilesPerm(curPath); in ChangeDirAndFilesPerm() 115 static int ConstructSrcAndTargetPath(char *curPath, char *desPath, struct dirent *ptr, in ConstructSrcAndTargetPath() argument 118 int ret = strcpy_s(curPath, DEFAULT_PATH_LE in ConstructSrcAndTargetPath() 163 char curPath[DEFAULT_PATH_LEN] = { 0 }; MoveOldFolderToNew() local [all...] |
H A D | compatibility_standard_bin.c | 62 char curPath[DEFAULT_PATH_LEN] = { 0 }; in ChangeDirAndFilesPerm() local 64 ret = strcpy_s(curPath, DEFAULT_PATH_LEN, path); in ChangeDirAndFilesPerm() 68 ret = strcat_s(curPath, DEFAULT_PATH_LEN, "/"); in ChangeDirAndFilesPerm() 72 ret = strcat_s(curPath, DEFAULT_PATH_LEN, ptr->d_name); in ChangeDirAndFilesPerm() 77 ret = chown(curPath, HUKS_SERVICE_UID, HUKS_SERVICE_UID); in ChangeDirAndFilesPerm() 82 if (chmod(curPath, S_IRUSR | S_IWUSR) < 0) { in ChangeDirAndFilesPerm() 86 if (chmod(curPath, S_IRWXU) < 0) { in ChangeDirAndFilesPerm() 89 ChangeDirAndFilesPerm(curPath); in ChangeDirAndFilesPerm()
|
/base/security/huks/test/unittest/modify_old_version_key_test_util/ |
H A D | hks_test_modify_old_key.c | 111 char curPath[DEFAULT_PATH_LEN] = { 0 }; in ChangeDirAndFiles() local 113 ret = strcpy_s(curPath, DEFAULT_PATH_LEN, path); in ChangeDirAndFiles() 117 ret = strcat_s(curPath, DEFAULT_PATH_LEN, "/"); in ChangeDirAndFiles() 121 ret = strcat_s(curPath, DEFAULT_PATH_LEN, ptr->d_name); in ChangeDirAndFiles() 126 ret = chown(curPath, uid, uid); in ChangeDirAndFiles() 131 ChangeDirAndFiles(curPath, uid); in ChangeDirAndFiles()
|
/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/ |
H A D | hks_storage_utils.c | 438 char *curPath = (char *)HksMalloc(pathLen + 1); in HksMakeFullDir() local 439 if (curPath == NULL) { in HksMakeFullDir() 447 (void)memcpy_s(curPath, pathLen, path, i); in HksMakeFullDir() 448 curPath[i] = '\0'; in HksMakeFullDir() 449 if (HksIsDirExist(curPath) == HKS_SUCCESS) { in HksMakeFullDir() 452 ret = HksMakeDir(curPath); in HksMakeFullDir() 454 HKS_LOG_E("mkdir %" LOG_PUBLIC "s failed.", curPath); in HksMakeFullDir() 469 HKS_FREE(curPath); in HksMakeFullDir()
|
/base/update/sys_installer/services/module_update/src/ |
H A D | module_file_repository.cpp | 157 string curPath = moduleFile.GetPath(); in CheckFilePath() local 159 curPath.substr(prefix.length(), curPath.length()); in CheckFilePath()
|
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/sa/ |
H A D | hks_sa.cpp | 329 char curPath[DEFAULT_PATH_LEN] = { 0 };
in MoveMineOldFile() local 330 if (strcpy_s(curPath, DEFAULT_PATH_LEN, oldDir) != EOK) {
in MoveMineOldFile() 333 if (strcat_s(curPath, DEFAULT_PATH_LEN, "/") != EOK) {
in MoveMineOldFile() 336 if (strcat_s(curPath, DEFAULT_PATH_LEN, ptr->d_name) != EOK) {
in MoveMineOldFile() 354 std::filesystem::copy(curPath, newPath,
in MoveMineOldFile() 357 HKS_LOG_E("copy curPath to newPath failed %" LOG_PUBLIC "s", errCode.message().c_str());
in MoveMineOldFile() 360 std::filesystem::remove_all(curPath, errCode);
in MoveMineOldFile() 362 HKS_LOG_E("remove_all curPath failed %" LOG_PUBLIC "s", errCode.message().c_str());
in MoveMineOldFile()
|
/base/security/huks/utils/file_iterative_reader/src/ |
H A D | hks_iterative_reader.c | 117 static int ConstructSubPath(const struct dirent *ptr, const char *curPath, char *subPath) in ConstructSubPath() argument 119 int ret = strcpy_s(subPath, DEFAULT_PATH_LEN, curPath); in ConstructSubPath()
|