From: Ralph Boehme <slow@samba.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: CIFS <linux-cifs@vger.kernel.org>,
Steven French <Steven.French@microsoft.com>,
Paulo Alcantara <pc@manguebit.com>,
paalcant@redhat.com
Subject: Re: Using file type information from POSIX mode
Date: Fri, 15 Nov 2024 17:29:49 +0100 [thread overview]
Message-ID: <8663f904-36b0-4f7a-baf8-576c85b7cbd2@samba.org> (raw)
In-Reply-To: <20241115144631.qkteeweaz44knr4c@pali>
[-- Attachment #1.1: Type: text/plain, Size: 1143 bytes --]
Hi Pali,
On 11/15/24 3:46 PM, Pali Rohár wrote:
> I would like to point out about one comment which I already discussed
> with Ralph privately.
>
> Mode as defined in that spec in section "2.1.1 posix mode" is _not_
> compatible/same as the UNIX mode used by the Linux, BSD and other UNIX
> systems.
>
> The reason is that S_IFREG / S_IFDIR / S_IFLNK / S_IFCHR / S_IFBLK /
> S_IFIFO / S_IFSOCK constants does not match with the values defined in
> that SMB extension "2.1.1 posix mode".
it is not binary compatible and I still don't see a reason why we would
wanna have that given the ugly smelling kitchen sink it is. We can't
rely on that historic cruft, we MUST implement a sanitized version of
this on the wire and then parse it into the format used by the OS we're
running on.
When implementing the protocol you'll have to implement a fair bit of
wire parsing anyway, so having something like these function which
implement the parsing Samba doesn't seem to be a burden:
<https://git.samba.org/?p=samba.git;a=blob;f=libcli/smb/util.c;h=473b479a2abf60cb28ee4374b5d90cb6dda82213;hb=HEAD#l198>
-slow
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2024-11-15 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7ef51654-5fa7-4333-8922-40bae24b18bc@samba.org>
2024-11-12 9:30 ` Fwd: Using file type information from POSIX mode Ralph Boehme
2024-11-15 14:46 ` Pali Rohár
2024-11-15 16:29 ` Ralph Boehme [this message]
2024-11-15 16:40 ` Pali Rohár
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=8663f904-36b0-4f7a-baf8-576c85b7cbd2@samba.org \
--to=slow@samba.org \
--cc=Steven.French@microsoft.com \
--cc=linux-cifs@vger.kernel.org \
--cc=paalcant@redhat.com \
--cc=pali@kernel.org \
--cc=pc@manguebit.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox