mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-13 09:17:42 -04:00
main: fix fd validity check
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
45b8bb85d4
commit
4e32e8907d
2
main.c
2
main.c
@ -2858,7 +2858,7 @@ create_file (struct ovl_data *lo, int dirfd, const char *path, uid_t uid, gid_t
|
||||
if (uid == lo->uid && gid == lo->gid)
|
||||
{
|
||||
ret = TEMP_FAILURE_RETRY (openat (get_upper_layer (lo)->fd, path, flags, mode));
|
||||
if (ret == 0)
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
/* if it fails (e.g. there is a whiteout) then fallback to create it in
|
||||
the working dir + rename. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user