Secured against use of external fuse not patched for UTIME_NOW

PERMISSION_HANDLING_BRANCH
jpandre 2010-01-16 09:35:24 +00:00
parent 3eada57e45
commit 31abc47c7c
2 changed files with 7 additions and 4 deletions

View File

@ -68,8 +68,6 @@ typedef int (*fuse_fill_dir_t) (void *buf, const char *name,
* Previously, paths were limited to a length of PATH_MAX.
*/
#define HAS_UTIME_OMIT_OK 1
struct fuse_operations {
/** Get file attributes.
*

View File

@ -3459,8 +3459,13 @@ static void ntfs_fuse_destroy2(void *unused __attribute__((unused)))
}
static struct fuse_operations ntfs_3g_ops = {
#if defined(HAVE_UTIMENSAT) && defined(HAS_UTIME_OMIT_OK)
.flag_utime_omit_ok = 1, /* accept UTIME_NOW and UTIME_OMIT in utimens */
#if defined(HAVE_UTIMENSAT) && (defined(FUSE_INTERNAL) || (FUSE_VERSION > 28))
/*
* Accept UTIME_NOW and UTIME_OMIT in utimens, when
* using internal fuse or a fuse version since 2.9
* (this field is not present in older versions)
*/
.flag_utime_omit_ok = 1,
#endif
.getattr = ntfs_fuse_getattr,
.readlink = ntfs_fuse_readlink,