Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2000 23:20:05 +0100 (CET)
From:      drwilco@drwilco.nl
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/22756: ntfs filesystems can be listed, but no files can be read
Message-ID:  <200011102220.eAAMK5J04953@venus.drwilco.net>

next in thread | raw e-mail | index | archive | help

>Number:         22756
>Category:       kern
>Synopsis:       ntfs filesystems can be listed, but no files can be read
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 10 14:30:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Rogier R. Mulhuijzen
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD venus.drwilco.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Nov 9 12:00:08 CET 2000 root@venus.drwilco.net:/usr/src/sys/compile/VENUS i386

>Description:
Since somewhere in October (on 5.0-CURRENT) files on a NTFS filesystem cannot be read, although directory listings can be made. The error returned is "Inappropriate ioctl for device"
>How-To-Repeat:
Mount a NTFS partition, try to cat(1) a file.
>Fix:

ntfs_bypass() always returns ENOTTY (Inappropriate ioctl for device), and is only used for vop_default_desc. Looking at other fs's I came to the conclusion that they almost all use vop_defaultop() for vop_default_desc, or code that is exactly the same. Hence the following patch, which works fine for me.

--- ntfs/ntfs_vnops.c.old	Wed Nov  1 18:57:24 2000
+++ ntfs/ntfs_vnops.c	Fri Nov 10 22:56:32 2000
@@ -847,7 +847,7 @@
 #if defined(__FreeBSD__)
 static
 struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = {
-	{ &vop_default_desc, (vop_t *)ntfs_bypass },
+	{ &vop_default_desc, (vop_t *)vop_defaultop },
 
 	{ &vop_getattr_desc, (vop_t *)ntfs_getattr },
 	{ &vop_inactive_desc, (vop_t *)ntfs_inactive },
@@ -887,7 +887,7 @@
 #else /* !FreeBSD */
 
 struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = {
-	{ &vop_default_desc, (vop_t *) ntfs_bypass },
+	{ &vop_default_desc, (vop_t *) vop_defaultop },
 	{ &vop_lookup_desc, (vop_t *) ntfs_lookup },	/* lookup */
 	{ &vop_create_desc, genfs_eopnotsupp },		/* create */
 	{ &vop_mknod_desc, genfs_eopnotsupp },		/* mknod */

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011102220.eAAMK5J04953>