{"action":"created","issue":{"url":"https://api.github.com/repos/dmex/lxssattr/issues/3","repository_url":"https://api.github.com/repos/dmex/lxssattr","labels_url":"https://api.github.com/repos/dmex/lxssattr/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/dmex/lxssattr/issues/3/comments","events_url":"https://api.github.com/repos/dmex/lxssattr/issues/3/events","html_url":"https://github.com/dmex/lxssattr/issues/3","id":293778705,"number":3,"title":"Is there any relation between struct in main.c and stat.h in Linux?","user":{"login":"Biswa96","id":31443074,"avatar_url":"https://avatars1.githubusercontent.com/u/31443074?v=4","gravatar_id":"","url":"https://api.github.com/users/Biswa96","html_url":"https://github.com/Biswa96","followers_url":"https://api.github.com/users/Biswa96/followers","following_url":"https://api.github.com/users/Biswa96/following{/other_user}","gists_url":"https://api.github.com/users/Biswa96/gists{/gist_id}","starred_url":"https://api.github.com/users/Biswa96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Biswa96/subscriptions","organizations_url":"https://api.github.com/users/Biswa96/orgs","repos_url":"https://api.github.com/users/Biswa96/repos","events_url":"https://api.github.com/users/Biswa96/events{/privacy}","received_events_url":"https://api.github.com/users/Biswa96/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-02T05:37:36Z","updated_at":"2018-03-08T20:52:15Z","closed_at":"2018-02-13T07:19:49Z","author_association":"NONE","body":"I've gone through your project and I've some questions. Where did you get that lxss extended attributes struct? I find some similarities between that and stat.h header file in Linux. Can I add the inode details in that struct (like in stat command)?\r\nCan I add your idea in my repo?"},"comment":{"url":"https://api.github.com/repos/dmex/lxssattr/issues/comments/371620410","html_url":"https://github.com/dmex/lxssattr/issues/3#issuecomment-371620410","issue_url":"https://api.github.com/repos/dmex/lxssattr/issues/3","id":371620410,"user":{"login":"dmex","id":1306177,"avatar_url":"https://avatars3.githubusercontent.com/u/1306177?v=4","gravatar_id":"","url":"https://api.github.com/users/dmex","html_url":"https://github.com/dmex","followers_url":"https://api.github.com/users/dmex/followers","following_url":"https://api.github.com/users/dmex/following{/other_user}","gists_url":"https://api.github.com/users/dmex/gists{/gist_id}","starred_url":"https://api.github.com/users/dmex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmex/subscriptions","organizations_url":"https://api.github.com/users/dmex/orgs","repos_url":"https://api.github.com/users/dmex/repos","events_url":"https://api.github.com/users/dmex/events{/privacy}","received_events_url":"https://api.github.com/users/dmex/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T20:52:15Z","updated_at":"2018-03-08T20:52:15Z","author_association":"OWNER","body":"> When I use _stat() in Windows\r\n\r\nThat doesn't produce the same result because the WSL environment doesn't use NTFS file attributes. \r\n\r\nWhen you call _stat() from Windows; The data is read from the NTFS file attributes.\r\nWhen you call _stat() from within the WSL environment; The data is read from the LXATTRB extended attribute. \r\n\r\nYou can see the source for _stat() by locating the common_stat_handle_file_opened function inside this file: \"C:\\Program Files (x86)\\Windows Kits\\10\\Source\\<ANY_VERSION>\\ucrt\\filesystem\\stat.cpp\"\r\n\r\n> Is there any way to know that a Linux file is a symlink/hardlink from Win32 console apps?\r\n\r\nYes. You need to use the st_mode field from the LXSS_FILE_EXTENDED_ATTRIBUTES_V1 structure. The st_mode will include the L permission which indicates the file is a link.\r\n\r\nSee also: \r\nhttps://github.com/dmex/lxssattr/blob/master/lxssattr/posix.c#L44\r\n\r\n\r\n"}}
{"actor":{"display_login":"dmex"}}