[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Tue Oct 25 20:18:03 MDT 2011
The branch, master has been updated
via 2fac12b s3-util: dbwrap_tool: fix fetch_string function
via f881d43 s3:net registry check: fix a case where automatic and read only mode take the wrong action
via 4fe5e09 s3:net registry check: do not silently replace separators
via 91a9992 s4:torture:smb2: fix broken indentation/formatting in torture_smb2_connection()
via 6560bca talloc: fix a comment typo
from 0f746fc Second attempt to fix bug #8384 - Windows XP clients seem to crash smbd process every once in a while.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 2fac12b2767dbab9a406370e258ce9b6f2322bd6
Author: Björn Baumbach <bb at sernet.de>
Date: Wed Oct 19 10:54:53 2011 +0200
s3-util: dbwrap_tool: fix fetch_string function
We do not want truncated strings.
Signed-off-by: Michael Adam <obnox at samba.org>
Autobuild-User: Michael Adam <obnox at samba.org>
Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104
commit f881d43837e77e5ed2d96aecb976720a5d2c237b
Author: Gregor Beck <gbeck at sernet.de>
Date: Thu Oct 20 17:38:06 2011 +0200
s3:net registry check: fix a case where automatic and read only mode take the wrong action
Signed-off-by: Michael Adam <obnox at samba.org>
commit 4fe5e091e13a450b67759725f41f3b748e235890
Author: Gregor Beck <gbeck at sernet.de>
Date: Thu Oct 20 17:36:10 2011 +0200
s3:net registry check: do not silently replace separators
Signed-off-by: Michael Adam <obnox at samba.org>
commit 91a999270e349b08b848075f07488c6d0962e6e0
Author: Michael Adam <obnox at samba.org>
Date: Sun Oct 23 22:17:03 2011 +0200
s4:torture:smb2: fix broken indentation/formatting in torture_smb2_connection()
this was not readable well
commit 6560bca57ef43ed6430d46d49a82bbfba2e825b8
Author: Michael Adam <obnox at samba.org>
Date: Sun Oct 23 16:57:07 2011 +0200
talloc: fix a comment typo
-----------------------------------------------------------------------
Summary of changes:
lib/talloc/talloc.c | 2 +-
source3/utils/dbwrap_tool.c | 2 +-
source3/utils/net_registry_check.c | 13 ++++++++-----
source4/torture/smb2/util.c | 19 +++++++++++--------
4 files changed, 21 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 5ea0791..2098a32 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -1039,7 +1039,7 @@ static inline int talloc_unreference(const void *context, const void *ptr)
/*
remove a specific parent context from a pointer. This is a more
- controlled varient of talloc_free()
+ controlled variant of talloc_free()
*/
_PUBLIC_ int talloc_unlink(const void *context, void *ptr)
{
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 84ff3a1..fe4e6eb 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -79,7 +79,7 @@ static int dbwrap_tool_fetch_string(struct db_context *db,
status = dbwrap_fetch_bystring(db, tmp_ctx, keyname, &tdbdata);
if (NT_STATUS_IS_OK(status)) {
- d_printf("%*.*s\n", (int)tdbdata.dsize-1, (int)tdbdata.dsize-1,
+ d_printf("%-*.*s\n", (int)tdbdata.dsize, (int)tdbdata.dsize,
tdbdata.dptr);
ret = 0;
} else {
diff --git a/source3/utils/net_registry_check.c b/source3/utils/net_registry_check.c
index 2511f53..870a0ed 100644
--- a/source3/utils/net_registry_check.c
+++ b/source3/utils/net_registry_check.c
@@ -336,7 +336,7 @@ static struct check_ctx* check_ctx_create(TALLOC_CTX *mem_ctx, const char *db,
}
}
- ctx->default_action = opt->automatic ? 'd' : 'r';
+ ctx->default_action = 'r';
return ctx;
fail:
talloc_free(ctx);
@@ -709,13 +709,14 @@ static bool normalize_path_internal(char* path, char sep) {
static bool normalize_path(char* path, char sep) {
static const char* SEPS = "\\/";
char* firstsep = strpbrk(path, SEPS);
+ bool wrong_sep = (firstsep && (*firstsep != sep));
assert (strchr(SEPS, sep));
- if (firstsep && (*firstsep != sep)) {
+ if (wrong_sep) {
string_replace(path, *firstsep, sep);
}
- return normalize_path_internal(path, sep);
+ return normalize_path_internal(path, sep) || wrong_sep;
}
static int check_tdb_action(struct db_record *rec, void *check_ctx)
@@ -727,6 +728,7 @@ static int check_tdb_action(struct db_record *rec, void *check_ctx)
char *key;
bool invalid_path = false;
bool once_more;
+ bool first_iter = true;
if (!tdb_data_is_cstr(rec_key)) {
printf("Key is not zero terminated: \"%.*s\"\ntry to go on.\n",
@@ -790,9 +792,9 @@ static int check_tdb_action(struct db_record *rec, void *check_ctx)
if (invalid_path) {
int action;
if (ctx->opt.output == NULL) {
- action = 's';
+ action = first_iter ? 'r' : 's';
} else if (ctx->opt.automatic) {
- action = (ctx->default_action == 'r') ? 'd' : 'r';
+ action = first_iter ? 'r' : 'd';
} else if (ctx->auto_action != '\0') {
action = ctx->auto_action;
} else {
@@ -827,6 +829,7 @@ static int check_tdb_action(struct db_record *rec, void *check_ctx)
break;
}
}
+ first_iter = false;
} while (once_more);
if (invalid_path) {
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index a94b0d7..caa7fd4 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -273,15 +273,18 @@ bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tr
lpcfg_smbcli_options(tctx->lp_ctx, &options);
- status = smb2_connect(tctx, host,
- lpcfg_smb_ports(tctx->lp_ctx),
- share,
+ status = smb2_connect(tctx,
+ host,
+ lpcfg_smb_ports(tctx->lp_ctx),
+ share,
lpcfg_resolve_context(tctx->lp_ctx),
- credentials, tree,
- tctx->ev, &options,
- lpcfg_socket_options(tctx->lp_ctx),
- lpcfg_gensec_settings(tctx, tctx->lp_ctx)
- );
+ credentials,
+ tree,
+ tctx->ev,
+ &options,
+ lpcfg_socket_options(tctx->lp_ctx),
+ lpcfg_gensec_settings(tctx, tctx->lp_ctx)
+ );
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect to SMB2 share \\\\%s\\%s - %s\n",
host, share, nt_errstr(status));
--
Samba Shared Repository
More information about the samba-cvs
mailing list