misc/117966: fdread aborts with EPERM

Norbert Koch nkoch at gmx.de
Sat Nov 10 14:30:01 PST 2007

>Number:         117966
>Category:       misc
>Synopsis:       fdread aborts with EPERM
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 10 22:30:01 UTC 2007
>Originator:     Norbert Koch
>Release:        6.3-PRERELEASE
FreeBSD xp2800.koch 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #0: Sun Nov  4 19:09:23 CET 2007     root at xp2800.koch:/usr/obj/usr/src/sys/XP2800  i386

fdread returns EPERM when trying ioctl(FD_SOPTS).

The fdc device driver restricts
this ioctl to be only allowed when
the device is opened for writing.

When I modify fdread.c to not open(...,RDONLY)
but RDWR, fdread works.

So this may solve the problem. But I am not
sure if this is the ``clean'' solution.

For me it looks like the device driver
should be changed.



More information about the freebsd-bugs mailing list