mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2025-02-17 05:20:39 +00:00
commit
8afec72b2f
@ -285,6 +285,7 @@ static int ReadKeyFile(const char *path, char *buf, size_t len)
|
||||
}
|
||||
|
||||
int fd = open(realPath, O_RDONLY);
|
||||
free(realPath);
|
||||
if (fd < 0) {
|
||||
FSCRYPT_LOGE("key file read open failed");
|
||||
return -EFAULT;
|
||||
|
@ -141,6 +141,7 @@ static uint8_t CheckKernelFscrypt(const char *mnt)
|
||||
}
|
||||
|
||||
int fd = open(realPath, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
|
||||
free(realPath);
|
||||
if (fd < 0) {
|
||||
FSCRYPT_LOGE("open policy file failed, errno: %d", errno);
|
||||
return FSCRYPT_INVALID;
|
||||
|
@ -230,6 +230,7 @@ int32_t QuotaManager::SetQuotaPrjId(const std::string &path, int32_t prjId, bool
|
||||
}
|
||||
|
||||
int fd = open(realPath, O_RDONLY | O_CLOEXEC);
|
||||
free(realPath);
|
||||
if (fd < 0) {
|
||||
LOGE("Failed to open %{public}s, errno: %{public}d", path.c_str(), errno);
|
||||
return E_SYS_CALL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user