Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 May 2021 17:54:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255625] fdescfs open with O_DIRECTORY fails with ENOTDIR
Message-ID:  <bug-255625-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255625

            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: bugs@FreeBSD.org
          Reporter: walker.aj325@gmail.com

>> 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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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