[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-847-g22ac34a
James Peach
jpeach at samba.org
Sat Dec 22 22:11:14 GMT 2007
The branch, v3-2-test has been updated
via 22ac34a329c9be9cf7d1e6749ebcfb50215378e4 (commit)
via 30cb2d215f1a4a440d5ecaab3f898daa714eee2b (commit)
via de3c5b808a941ac8e9ebe7169536d8290067eef5 (commit)
from cebaa483e62910ac3f87cd135b2aff18dc880416 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 22ac34a329c9be9cf7d1e6749ebcfb50215378e4
Author: James Peach <jpeach at samba.org>
Date: Sat Dec 22 14:10:06 2007 -0800
Fix "may be used uninitialized" compiler warnings.
commit 30cb2d215f1a4a440d5ecaab3f898daa714eee2b
Merge: de3c5b808a941ac8e9ebe7169536d8290067eef5 cebaa483e62910ac3f87cd135b2aff18dc880416
Author: James Peach <jpeach at samba.org>
Date: Sat Dec 22 14:01:44 2007 -0800
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
commit de3c5b808a941ac8e9ebe7169536d8290067eef5
Author: James Peach <jpeach at samba.org>
Date: Sat Dec 22 14:01:25 2007 -0800
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.
-----------------------------------------------------------------------
Summary of changes:
source/auth/auth_util.c | 6 +++---
source/include/smb.h | 4 ++++
source/smbd/service.c | 15 +++++++++++++++
3 files changed, 22 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 373a2a3..3f65e6b 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -1423,7 +1423,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
static const char zeros[16] = { 0, };
NTSTATUS nt_status = NT_STATUS_OK;
- char *found_username;
+ char *found_username = NULL;
const char *nt_domain;
const char *nt_username;
struct samu *sam_account = NULL;
@@ -1431,8 +1431,8 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
DOM_SID group_sid;
bool username_was_mapped;
- uid_t uid;
- gid_t gid;
+ uid_t uid = (uid_t)-1;
+ gid_t gid = (gid_t)-1;
auth_serversupplied_info *result;
diff --git a/source/include/smb.h b/source/include/smb.h
index 1222c9a..63ae51e 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -658,10 +658,14 @@ typedef struct connection_struct {
int num_files_open;
unsigned int num_smb_operations; /* Count of smb operations on this tree. */
+ /* Semantics requested by the client or forced by the server config. */
bool case_sensitive;
bool case_preserve;
bool short_case_preserve;
+ /* Semantics provided by the underlying filesystem. */
+ int fs_capabilities;
+
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). */
name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */
diff --git a/source/smbd/service.c b/source/smbd/service.c
index ed43528..8e69a3b 100644
--- a/source/smbd/service.c
+++ b/source/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
--
Samba Shared Repository
More information about the samba-cvs
mailing list