https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255625

            Bug ID: 255625
           Summary: fdescfs open with O_DIRECTORY fails with ENOTDIR
           Product: Base System
           Version: 13.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: [email protected]
          Reporter: [email protected]

>> os.open("/mnt/dozer", os.O_DIRECTORY)
3
>>> os.open("/dev/fd/3", os.O_DIRECTORY)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NotADirectoryError: [Errno 20] Not a directory: '/dev/fd/3'
Manpage states:
     Flags to the open(2) call other than O_RDONLY, O_WRONLY and O_RDWR are
     ignored.
Ideally, it would be nice to have O_DIRECTORY support.

The reason for this preference is that there are various places where Samba
needs to be able to convert descriptors opened with O_PATH to regular opens,
and it perform these opens with O_DIRECTORY if it is expected to be a
directory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to