os.lstat doesn't properly set st_reparse_tag for junction on a remote NetApp share
Đang mở
Chưa có ai nhận issue này.
OS-windows
type-bug
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 36k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Bug report
\\192.168.10.198\vol1\sub is a junction on NetApp share, but in Python 3.10.4 st_reparse_tag is set to 0:
>>> path = "\\\\192.168.10.198\\vol1\\sub"
>>> os.lstat(path).st_reparse_tag
0
>fsutil reparsepoint query \\192.168.10.198\vol1\sub
Reparse Tag Value : 0xa0000003
Tag value: Microsoft
Tag value: Name Surrogate
Tag value: Mount Point
Substitue Name offset: 0
Substitue Name length: 98
Print Name offset: 100
Print Name Length: 98
Substitute Name: \??\Volume{804BBB02-0000-0000-6270-052200000040}\
Print Name: \??\Volume{804BBB02-0000-0000-6270-052200000040}\
I checked in the Python code that:
os.lstatusesGetFileInformationByHandleExcall withFileAttributeTagInfoto get the value of the reparse tagDeviceIoControlwithFSCTL_GET_REPARSE_POINT, which is also used in Python source code, works fine- the problem doesn't affect regular remote Windows shares (NTFS filesystem)
Your environment
- CPython versions tested on: 3.10.4
- Operating system and architecture: Windows 2019, NetApp share
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra triển khai Windows phía sau os.lstat, đặc biệt là lệnh gọi GetFileInformationByHandleEx với FileAttributeTagInfo. Tái hiện trường hợp này với junction của NetApp và so sánh với DeviceIoControl bằng cách sử dụng FSCTL_GET_REPARSE_POINT. Được coi là hoàn tất khi st_reparse_tag báo cáo reparse tag của junction từ xa mà vẫn giữ nguyên hành vi đối với các Windows share thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- operating-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100