Skip to content

Commit

Permalink
writer: Add O_DIRECTORY
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Sjölund <[email protected]>
  • Loading branch information
eriksjolund committed Oct 25, 2024
1 parent a82572c commit 2bc890a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcomposefs/lcfs-writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,8 @@ struct lcfs_node_s *lcfs_build(int dirfd, const char *fname, int buildflags,
return node;
}

dfd = openat(dirfd, fname, O_RDONLY | O_NOFOLLOW | O_CLOEXEC, 0);
dfd = openat(dirfd, fname,
O_DIRECTORY | O_RDONLY | O_NOFOLLOW | O_CLOEXEC, 0);
if (dfd < 0) {
errsv = errno;
goto fail;
Expand Down

0 comments on commit 2bc890a

Please sign in to comment.