[HEADS-UP] Using stored immutable file birth time for SMB File-ID

Amir Goldstein amir73il at gmail.com
Thu Jun 27 11:32:23 UTC 2019


On Wed, Jun 26, 2019 at 4:58 PM Ralph Boehme via samba-technical
<samba-technical at lists.samba.org> wrote:
>
> Hi all,
>
> in short:
>
> Samba will adapt a new File-ID generation scheme, based on a file's initial
> creation date instead of using the file's inode number.
>

Hi Ralph,

Just wanted to point out that most Linux filesystems already have a unique (*)
File-ID via name_to_handle_at().

The problem with this File-ID for samba is that it is often larger than 64bit
and it is only unique within the same fs, so your proposed solution is way
more generic.

However, you may want to allow for a configurable option to use those
NFS file handles as File-ID IFF the size of the handles is 8 bytes (e.g. ext4)
and the share is not expected to cross filesystems.
This has the advantage of files created not via samba will also have
a unique File-ID.

Thanks,
Amir.

(*) Disclaimer: ext4 64bit handle is 32bit ino (reusable) and 32bit generation
(globally incremented and may overflow), so with standard workloads
the probability of reusing a File-ID is very low, but with crafted attack it
should be quite easy to generate a new file with the same File-ID of a
deleted file.



More information about the samba-technical mailing list