mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-10 15:56:25 -04:00
Merge pull request #195 from giuseppe/no-read-fd
main: stop ino lookup without an open fd
This commit is contained in:
commit
4b97cf9ee6
8
main.c
8
main.c
@ -1259,7 +1259,8 @@ make_ovl_node (struct ovl_data *lo, const char *path, struct ovl_layer *layer, c
|
||||
}
|
||||
ret->last_layer = it;
|
||||
}
|
||||
goto no_fd;
|
||||
has_origin = false;
|
||||
goto no_fd;
|
||||
}
|
||||
|
||||
/* It is an open FD, stat the file and read the origin xattrs. */
|
||||
@ -1276,7 +1277,10 @@ make_ovl_node (struct ovl_data *lo, const char *path, struct ovl_layer *layer, c
|
||||
}
|
||||
|
||||
if (stat_only)
|
||||
goto no_fd;
|
||||
{
|
||||
has_origin = false;
|
||||
goto no_fd;
|
||||
}
|
||||
|
||||
s = safe_read_xattr (&val, fd, PRIVILEGED_ORIGIN_XATTR, PATH_MAX);
|
||||
if (s > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user