os.lstat doesn't properly set st_reparse_tag for junction on a remote NetApp share
オープン
まだ誰も着手していません。
OS-windows
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、os.lstat の背後にある Windows 実装、特に FileAttributeTagInfo を指定した GetFileInformationByHandleEx の呼び出しを調べます。NetApp junction に対してこのケースを再現し、FSCTL_GET_REPARSE_POINT を使用する DeviceIoControl と比較します。st_reparse_tag がリモート junction の reparse tag を報告し、通常の Windows 共有に対する動作を維持できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100