From a8a4fe0605e6149efb5f9051181d794572edbf27 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 May 2010 11:36:47 -0700 Subject: Fix bug #7410 - samba sends "raw" inode number as uniqueid with unix extensions. Move to a consistent get_FileIndex() function for all inode returns, that checks if st_dev on the file is identical to the top directory dev_t of the exported share, and if so uses the raw 64-bit inode number. If it isn't (we've traversed a mount point) - return what we used to do for Windows which is the concatination of the bottom 32-bits of the inode with the 32-bit device number. We can get more creative with this over time (hashing?) if we want as now all inode returns go through this single function. Jeremy. --- source3/include/smb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/include/smb.h') diff --git a/source3/include/smb.h b/source3/include/smb.h index e1ec21f22c..e2721700e5 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -588,6 +588,9 @@ typedef struct connection_struct { /* Semantics provided by the underlying filesystem. */ int fs_capabilities; + /* Device number of the directory of the share mount. + Used to ensure unique FileIndex returns. */ + SMB_DEV_T base_share_dev; name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */ name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */ -- cgit