mirror of
https://github.com/samba-team/samba.git
synced 2025-07-31 20:22:15 +03:00
Cache the underlying filesystem capabilities at connection time.
This change alters the Samba connection code to cache the filesystem
capabilities when a new client connects. This can be used to enable
filesystem specific optimisations is a general manner.
(This used to be commit de3c5b808a
)
This commit is contained in:
@ -1165,6 +1165,21 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Figure out the characteristics of the underlying filesystem. This
|
||||
* assumes that all the filesystem mounted withing a share path have
|
||||
* the same characteristics, which is likely but not guaranteed.
|
||||
*/
|
||||
{
|
||||
vfs_statvfs_struct svfs;
|
||||
|
||||
conn->fs_capabilities =
|
||||
FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
|
||||
|
||||
if (SMB_VFS_STATVFS(conn, conn->connectpath, &svfs) == 0) {
|
||||
conn->fs_capabilities = svfs.FsCapabilities;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out the 'connected as' stuff here as we need
|
||||
* to know the effective uid and gid we will be using
|
||||
|
Reference in New Issue
Block a user