<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/util/system/fstat.cpp, branch CLI_2.23.0</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=CLI_2.23.0</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=CLI_2.23.0'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2024-11-20T10:14:09Z</updated>
<entry>
<title>Part of PR. Style</title>
<updated>2024-11-20T10:14:09Z</updated>
<author>
<name>nae202</name>
<email>nae202@yandex-team.com</email>
</author>
<published>2024-11-20T09:52:01Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=0b9d91e900b52bccd6eabd033acbb57c4ee173fc'/>
<id>urn:sha1:0b9d91e900b52bccd6eabd033acbb57c4ee173fc</id>
<content type='text'>
Часть большого ПР REVIEW:7264088
commit_hash:0f5b03fbbed0ac30f734943309e3ef5cd4d7a30e
</content>
</entry>
<entry>
<title>Add mtime/atime/ctime with nanoseconds to TFileStat.</title>
<updated>2024-05-13T10:02:13Z</updated>
<author>
<name>sath</name>
<email>sath@yandex-team.com</email>
</author>
<published>2024-05-13T09:52:23Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=7b31bb09a816431b42dc0a7d01398445ca700477'/>
<id>urn:sha1:7b31bb09a816431b42dc0a7d01398445ca700477</id>
<content type='text'>
3523ab3f5aade2bdf4c0efd5dd2defbe19f124ff
</content>
</entry>
<entry>
<title>Add construction of TFileStat from struct stat</title>
<updated>2023-11-15T05:42:52Z</updated>
<author>
<name>spreis</name>
<email>spreis@yandex-team.com</email>
</author>
<published>2023-11-15T05:17:16Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=1738956637b0691f2a1a9f9c25f8ad4657e89ebb'/>
<id>urn:sha1:1738956637b0691f2a1a9f9c25f8ad4657e89ebb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[util] fix fstat for archive directories on windows</title>
<updated>2022-02-17T19:22:02Z</updated>
<author>
<name>kikht</name>
<email>kikht@yandex-team.ru</email>
</author>
<published>2022-02-17T19:22:02Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=a4e5577781d9f1162779286558a90252430f6200'/>
<id>urn:sha1:a4e5577781d9f1162779286558a90252430f6200</id>
<content type='text'>
Currently TFileStat has a bunch of problems on Windows:
1. Mode computation ORs different types, but file attributes it checks are not mutually exclusive. E.g. it is possible for directory to have both `FILE_ATTRIBUTE_DIRECTORY` and `FILE_ATTRIBUTE_ARCHIVE`, but it will currently lead to invalid `_S_IFDIR | _S_IFREG` mode.
2. Any file with `FILE_ATTRIBUTE_REPARSE_POINT` flag is considered to be symlink. But there are many other types of reparse points even user-defined ones. For more info see https://docs.microsoft.com/en-us/windows/win32/fileio/reparse-point-tags

To fix all this we do the following:
1. Add `ReparseTag` field to `TSystemFStat` and fill it for reparse points in `GetStatByHandle`.
2. Refactor `GetWinFileType` out of `GetFileMode` to ensure that we always select only single `S_IFMT` value.
3. Pass reparse tag value into `GetWinFileType` and select `S_IFLNK` only for `IO_REPARSE_TAG_SYMLINK` and `IO_REPARSE_TAG_MOUNT_POINT` tags. The latter one is a bit strange, but this behaviour is aligned with current implementation of `WinReadLink`.
4. Factor `ReadReparsePoint` out of `WinReadLink`. This function uses `DeviceIoControl` to read reparse point data into structures copied from WDK.
5. Add `WinReadReparseTag` that uses `ReadReparsePoint` to extract reparse point tag. We use this approach instead of MSDN-recommended `FindFirstFile` because latter requires file path, but we have file handle at this point. AFAIK golang and python use similar approach for this.
6. Add test for archived directory case.
7. Make symlink nofollow tests run only when symlink creation is possible for current user.

Discovered in https://st.yandex-team.ru/ARC-3931

ref:4f6735817b9f85f3351a1021a56dd7eb4606bd65
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;muzykantov@yandex-team.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:51:51Z</updated>
<author>
<name>muzykantov</name>
<email>muzykantov@yandex-team.ru</email>
</author>
<published>2022-02-10T13:51:51Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=fffc5498228bac1ad41ed40b9b7f5cb453796ba8'/>
<id>urn:sha1:fffc5498228bac1ad41ed40b9b7f5cb453796ba8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;muzykantov@yandex-team.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:51:51Z</updated>
<author>
<name>muzykantov</name>
<email>muzykantov@yandex-team.ru</email>
</author>
<published>2022-02-10T13:51:51Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=8057fea3b8c36263516f0a7e1a01fdf7380764a4'/>
<id>urn:sha1:8057fea3b8c36263516f0a7e1a01fdf7380764a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;easergeev@yandex-team.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:51:45Z</updated>
<author>
<name>easergeev</name>
<email>easergeev@yandex-team.ru</email>
</author>
<published>2022-02-10T13:51:45Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=4596484b94e7bba39c8241e41e9c7f7b5665fdc5'/>
<id>urn:sha1:4596484b94e7bba39c8241e41e9c7f7b5665fdc5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;easergeev@yandex-team.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:51:45Z</updated>
<author>
<name>easergeev</name>
<email>easergeev@yandex-team.ru</email>
</author>
<published>2022-02-10T13:51:45Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=2db97242fffe2a2e7fcfb321249fbb3ade943210'/>
<id>urn:sha1:2db97242fffe2a2e7fcfb321249fbb3ade943210</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for Vasily Gerasimov &lt;UgnineSirdis@gmail.com&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:49:10Z</updated>
<author>
<name>Vasily Gerasimov</name>
<email>UgnineSirdis@gmail.com</email>
</author>
<published>2022-02-10T13:49:10Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=1eb755fbca92172a6aec2f57371b2b3a19dfab43'/>
<id>urn:sha1:1eb755fbca92172a6aec2f57371b2b3a19dfab43</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for Vasily Gerasimov &lt;UgnineSirdis@gmail.com&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:49:09Z</updated>
<author>
<name>Vasily Gerasimov</name>
<email>UgnineSirdis@gmail.com</email>
</author>
<published>2022-02-10T13:49:09Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=6cdc8f140213c595e4ad38bc3d97fcef1146b8c3'/>
<id>urn:sha1:6cdc8f140213c595e4ad38bc3d97fcef1146b8c3</id>
<content type='text'>
</content>
</entry>
</feed>
