From: "Aurélien Aptel" <aaptel@suse.com>
To: Steve French <smfrench@gmail.com>,
CIFS <linux-cifs@vger.kernel.org>,
samba-technical <samba-technical@lists.samba.org>
Subject: Re: [PATCH][WIP] query smb3 reparse tags for special files
Date: Thu, 22 Oct 2020 13:37:15 +0200 [thread overview]
Message-ID: <87wnziv6dw.fsf@suse.com> (raw)
In-Reply-To: <CAH2r5mtmPxUKYYK-PbouTFpt9T8AU-41pRZu1CEO=+XLZZ+vSA@mail.gmail.com>
Steve French <smfrench@gmail.com> writes:
> smbfsctl.h:#define IO_REPARSE_TAG_LX_SYMLINK 0xA000001D
> smbfsctl.h:#define IO_REPARSE_TAG_LX_FIFO 0x80000024
> smbfsctl.h:#define IO_REPARSE_TAG_LX_CHR 0x80000025
> smbfsctl.h:#define IO_REPARSE_TAG_LX_BLK 0x80000026
>
> These also make sense for us to use more broadly because it simplifies readdir
>
> but ... my first attempt at querying this using infolevel 33
> FileReparsePointInformation (see MS-FSCC section 2.4.35) failed ...
> with Windows 10 returning STATUS_NOT_SUPPORTED when querying various
> reparse points (created by WSL indirectly) including fifos, symlinks
> and char devices.
>
> I can switch approaches and try to do the smb3 fsctl to query reparse
> info instead but was hoping that query info would work. Any idea if
> there is another info level that would allow me to query the tag?
According to [MS-FSCC] if the file has the REPARSE_TAG attribute, the
EaSize field must be interpreted as a reparse tag for these info levels:
* FileFullDirectoryInfo
* FileBothDirectoryInfo
* FileIdFullDirectoryInfo
* FileIdBothDirectoryInfo
Otherwise we have code for querying the reparse tag in
smb2_query_symlink():
rc = SMB2_ioctl_init(tcon, server,
&rqst[1], fid.persistent_fid,
fid.volatile_fid, FSCTL_GET_REPARSE_POINT,
true /* is_fctl */, NULL, 0,
CIFSMaxBufSize -
MAX_SMB2_CREATE_RESPONSE_SIZE -
MAX_SMB2_CLOSE_RESPONSE_SIZE);
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
next prev parent reply other threads:[~2020-10-22 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 9:20 [PATCH][WIP] query smb3 reparse tags for special files Steve French
2020-10-22 11:37 ` Aurélien Aptel [this message]
2020-10-22 17:14 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnziv6dw.fsf@suse.com \
--to=aaptel@suse.com \
--cc=linux-cifs@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.