Skip to content

Commit bfbbe8c

Browse files
committed
Fix file_open_ipc_handle() and file_put_ipc_handle()
Remove the wrong check - the paths: file_ipc_data->path and file_provider->path should be different. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent e060b6d commit bfbbe8c

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/provider/provider_file_memory.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,6 @@ static umf_result_t file_put_ipc_handle(void *provider, void *providerIpcData) {
639639
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
640640
}
641641

642-
file_ipc_data_t *file_ipc_data = (file_ipc_data_t *)providerIpcData;
643-
644-
if (strncmp(file_ipc_data->path, file_provider->path, PATH_MAX)) {
645-
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
646-
}
647-
648642
return UMF_RESULT_SUCCESS;
649643
}
650644

@@ -665,10 +659,6 @@ static umf_result_t file_open_ipc_handle(void *provider, void *providerIpcData,
665659
umf_result_t ret = UMF_RESULT_SUCCESS;
666660
int fd;
667661

668-
if (strncmp(file_ipc_data->path, file_provider->path, PATH_MAX)) {
669-
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
670-
}
671-
672662
fd = utils_file_open(file_ipc_data->path);
673663
if (fd == -1) {
674664
LOG_PERR("opening the file to be mapped (%s) failed",

0 commit comments

Comments
 (0)