diff options
author | James Peach <jpeach@samba.org> | 2007-12-22 14:01:25 -0800 |
---|---|---|
committer | James Peach <jpeach@samba.org> | 2007-12-22 14:01:25 -0800 |
commit | 1176e04c76e28d9ee9ab355c5e9edcd1b627ac03 (patch) | |
tree | b0f7c53699b543a49232990996e3af795dece9fc /source3/smbd | |
parent | df133758c2496a5c99441635eca6b77c9019cb8c (diff) | |
download | samba-1176e04c76e28d9ee9ab355c5e9edcd1b627ac03.tar.gz samba-1176e04c76e28d9ee9ab355c5e9edcd1b627ac03.tar.bz2 samba-1176e04c76e28d9ee9ab355c5e9edcd1b627ac03.zip |
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 de3c5b808a941ac8e9ebe7169536d8290067eef5)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/service.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index ed43528c76..8e69a3b381 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -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 |