[SCM] Samba Shared Repository - branch v4-1-test updated
Karolin Seeger
kseeger at samba.org
Thu Dec 26 13:22:06 MST 2013
The branch, v4-1-test has been updated
via 9c78cc3 vfs_glusterfs: Enable per client log file
via 5438b48 ldb: bad if test in ldb_comparison_fold()
from 80c09fc s3-lib: Fix %G substitution for domain users in smbd
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-1-test
- Log -----------------------------------------------------------------
commit 9c78cc37444ad4dda5c34c44861006a451e32e19
Author: Poornima Gurusiddaiah <pgurusid at redhat.com>
Date: Fri Nov 22 05:04:11 2013 +0000
vfs_glusterfs: Enable per client log file
In Samba configuration file, one of the options of gluster type is
log file, the value of this option was not allowed to contain any
variables, as a result all the clients would have a single log file,
which complicated debugging.
In this patch, variable substitution is performed for gluster log file.
Hence allowing user to customise the gluster log file name.
Signed-off-by: Poornima Gurusiddaiah <pgurusid at redhat.com>
Reviewed-by: Ira Cooper <ira at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Dec 17 23:44:16 CET 2013 on sn-devel-104
Fix bug #10337 - vfs_glusterfs: Enable per client log file.
Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-1-test): Thu Dec 26 21:21:07 CET 2013 on sn-devel-104
commit 5438b4840dc60b9c026388f405c0795051ed4b67
Author: Jeremy Allison <jra at samba.org>
Date: Fri Dec 6 15:58:02 2013 -0800
ldb: bad if test in ldb_comparison_fold()
Found by David Binderman <dcb314 at hotmail.com>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10305
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Sat Dec 7 11:10:47 CET 2013 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/common/attrib_handlers.c | 2 +-
source3/modules/vfs_glusterfs.c | 49 ++++++++++++++++++++++---------------
2 files changed, 30 insertions(+), 21 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ldb/common/attrib_handlers.c b/lib/ldb/common/attrib_handlers.c
index daeb422..4b94d39 100644
--- a/lib/ldb/common/attrib_handlers.c
+++ b/lib/ldb/common/attrib_handlers.c
@@ -254,7 +254,7 @@ int ldb_comparison_fold(struct ldb_context *ldb, void *mem_ctx,
if (n2 == 0 && n1 != 0) {
return (int)toupper(*s1);
}
- if (n2 == 0 && n2 == 0) {
+ if (n1 == 0 && n2 == 0) {
return 0;
}
return (int)toupper(*s1) - (int)toupper(*s2);
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index ca7d790..3262f11 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -209,12 +209,18 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
{
const char *volfile_server;
const char *volume;
- const char *logfile;
+ char *logfile;
int loglevel;
- glfs_t *fs;
- int ret;
+ glfs_t *fs = NULL;
+ TALLOC_CTX *tmp_ctx;
+ int ret = 0;
- logfile = lp_parm_const_string(SNUM(handle->conn), "glusterfs",
+ tmp_ctx = talloc_new(NULL);
+ if (tmp_ctx == NULL) {
+ ret = -1;
+ goto done;
+ }
+ logfile = lp_parm_talloc_string(tmp_ctx, SNUM(handle->conn), "glusterfs",
"logfile", NULL);
loglevel = lp_parm_int(SNUM(handle->conn), "glusterfs", "loglevel", -1);
@@ -233,57 +239,60 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle,
fs = glfs_find_preopened(volume);
if (fs) {
- goto found;
+ goto done;
}
fs = glfs_new(volume);
if (fs == NULL) {
- return -1;
+ ret = -1;
+ goto done;
}
ret = glfs_set_volfile_server(fs, "tcp", volfile_server, 0);
if (ret < 0) {
DEBUG(0, ("Failed to set volfile_server %s\n", volfile_server));
- glfs_fini(fs);
- return -1;
+ goto done;
}
ret = glfs_set_xlator_option(fs, "*-md-cache", "cache-posix-acl",
"true");
if (ret < 0) {
DEBUG(0, ("%s: Failed to set xlator options\n", volume));
- glfs_fini(fs);
- return -1;
+ goto done;
}
ret = glfs_set_logging(fs, logfile, loglevel);
if (ret < 0) {
DEBUG(0, ("%s: Failed to set logfile %s loglevel %d\n",
volume, logfile, loglevel));
- glfs_fini(fs);
- return -1;
+ goto done;
}
ret = glfs_init(fs);
if (ret < 0) {
DEBUG(0, ("%s: Failed to initialize volume (%s)\n",
volume, strerror(errno)));
- glfs_fini(fs);
- return -1;
+ goto done;
}
ret = glfs_set_preopened(volume, fs);
if (ret < 0) {
DEBUG(0, ("%s: Failed to register volume (%s)\n",
volume, strerror(errno)));
- glfs_fini(fs);
+ goto done;
+ }
+done:
+ talloc_free(tmp_ctx);
+ if (ret < 0) {
+ if (fs)
+ glfs_fini(fs);
return -1;
+ } else {
+ DEBUG(0, ("%s: Initialized volume from server %s\n",
+ volume, volfile_server));
+ handle->data = fs;
+ return 0;
}
-found:
- DEBUG(0, ("%s: Initialized volume from server %s\n",
- volume, volfile_server));
- handle->data = fs;
- return 0;
}
static void vfs_gluster_disconnect(struct vfs_handle_struct *handle)
--
Samba Shared Repository
More information about the samba-cvs
mailing list