[SCM] Samba Shared Repository - branch master updated
Matthias Dieter Wallnöfer
mdw at samba.org
Wed Jan 12 12:39:02 MST 2011
The branch, master has been updated
via 3b78fcf s4:torture/nbench/nbench.c - initialise "n"
via aa759de s4:dns_server/dlz_bind9.c - initialise "ret" variables
via d35d2bf s4:extended_dn_out LDB module - initialise "have_reveal_control"
via 0932c91 s4:librpc/rpc/dcerpc_connect.c - fix uninitialised variable
via dd5367e ldb:ltdb_sequence_number - initialise "tmp_ctx" to prevent uninitialisation warning
via ee4fd13 ldb:ldbsearch.c - fix possible uninitialised variable
via a26a489 torture:drs/rpc/msds_intid.c - proof for the correct "intId"
via 90db6a7 s4:winbind/idmap.c - we cannot use "failed" until we are in a transaction
via 25964e7 ldb:ltdb_sequence_number - check for an OOM exception
via b804c53 ldb:ldb_dn_explode - remove/unify some duplicate initialisations
via 47adb9d s4:dynconfig/dynconfig.h - fix ending newline warning
from c39e800 drsuapi.idl: add some more DRSUAPI_ATTID_* values
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3b78fcff5a608de8eb1b0ddd92adc8e0aaeb689d
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sun Jan 9 11:41:51 2011 +0100
s4:torture/nbench/nbench.c - initialise "n"
Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
Autobuild-Date: Wed Jan 12 20:38:02 CET 2011 on sn-devel-104
commit aa759de6b3ee7766925c0e713253bf01f30967e5
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 22:32:12 2011 +0100
s4:dns_server/dlz_bind9.c - initialise "ret" variables
commit d35d2bf392f819c8579f0d024a7c398732bdeb09
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 22:21:13 2011 +0100
s4:extended_dn_out LDB module - initialise "have_reveal_control"
commit 0932c91186dc4aae2caf51828e6edd786927a44c
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 22:14:48 2011 +0100
s4:librpc/rpc/dcerpc_connect.c - fix uninitialised variable
commit dd5367ebe95434a6e01bd9be7487ed7768d3c139
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 22:04:32 2011 +0100
ldb:ltdb_sequence_number - initialise "tmp_ctx" to prevent uninitialisation warning
commit ee4fd13ea368e7d235e709959e5fda38ee27d0e6
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 22:08:40 2011 +0100
ldb:ldbsearch.c - fix possible uninitialised variable
And add a comparison for the "ret" result - this is more standard-oriented
commit a26a48934df146bbd1fe48dabdad1656cca8713a
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sun Jan 9 11:38:53 2011 +0100
torture:drs/rpc/msds_intid.c - proof for the correct "intId"
"drs_attr" is uninitialised in this loop
commit 90db6a793ad368690b178e5c170c05be79aaa884
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sun Jan 9 11:27:01 2011 +0100
s4:winbind/idmap.c - we cannot use "failed" until we are in a transaction
We've to wait until "trans" is initialised.
commit 25964e775ac9e2700025e1beadc09ead31e25d0b
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 22:07:30 2011 +0100
ldb:ltdb_sequence_number - check for an OOM exception
commit b804c5396cb5c14612f8336c9b71afdbc3f81b0e
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 21:59:37 2011 +0100
ldb:ldb_dn_explode - remove/unify some duplicate initialisations
commit 47adb9df10c7bed56fe92513e2602ac01e9590b2
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date: Sat Jan 8 22:10:17 2011 +0100
s4:dynconfig/dynconfig.h - fix ending newline warning
-----------------------------------------------------------------------
Summary of changes:
source4/dns_server/dlz_bind9.c | 4 ++--
source4/dsdb/samdb/ldb_modules/extended_dn_out.c | 2 +-
source4/dynconfig/dynconfig.h | 2 +-
source4/lib/ldb/common/ldb_dn.c | 8 ++------
source4/lib/ldb/ldb_tdb/ldb_tdb.c | 7 ++++++-
source4/lib/ldb/tools/ldbsearch.c | 4 ++--
source4/librpc/rpc/dcerpc_connect.c | 1 +
source4/torture/drs/rpc/msds_intid.c | 2 +-
source4/torture/nbench/nbench.c | 2 +-
source4/winbind/idmap.c | 22 ++++++++++++++--------
10 files changed, 31 insertions(+), 23 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 7f5125d..d2fa81a 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -680,7 +680,7 @@ static isc_result_t dlz_lookup_types(struct dlz_bind9_data *state,
{
TALLOC_CTX *tmp_ctx = talloc_new(state);
const char *attrs[] = { "dnsRecord", NULL };
- int ret, i;
+ int ret = LDB_SUCCESS, i;
struct ldb_result *res;
struct ldb_message_element *el;
struct ldb_dn *dn;
@@ -767,7 +767,7 @@ _PUBLIC_ isc_result_t dlz_allnodes(const char *zone, void *dbdata,
{
struct dlz_bind9_data *state = talloc_get_type_abort(dbdata, struct dlz_bind9_data);
const char *attrs[] = { "dnsRecord", NULL };
- int ret, i, j;
+ int ret = LDB_SUCCESS, i, j;
struct ldb_dn *dn;
struct ldb_result *res;
TALLOC_CTX *tmp_ctx = talloc_new(state);
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index 052563f..e59bd84 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -362,7 +362,7 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares,
struct ldb_message *msg;
struct extended_dn_out_private *p;
struct ldb_context *ldb;
- bool have_reveal_control, checked_reveal_control=false;
+ bool have_reveal_control=false, checked_reveal_control=false;
ac = talloc_get_type(req->context, struct extended_search_context);
p = talloc_get_type(ldb_module_get_private(ac->module), struct extended_dn_out_private);
diff --git a/source4/dynconfig/dynconfig.h b/source4/dynconfig/dynconfig.h
index d353efe..c759081 100644
--- a/source4/dynconfig/dynconfig.h
+++ b/source4/dynconfig/dynconfig.h
@@ -56,4 +56,4 @@ DEFINE_DYN_CONFIG_PROTO(WINBINDD_SOCKET_DIR)
DEFINE_DYN_CONFIG_PROTO(WINBINDD_PRIVILEGED_SOCKET_DIR)
DEFINE_DYN_CONFIG_PROTO(NTP_SIGND_SOCKET_DIR)
DEFINE_DYN_CONFIG_PROTO(PYTHONDIR)
-DEFINE_DYN_CONFIG_PROTO(SCRIPTSBINDIR)
\ No newline at end of file
+DEFINE_DYN_CONFIG_PROTO(SCRIPTSBINDIR)
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 1b714c9..180ff41 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -288,8 +288,8 @@ char *ldb_dn_escape_value(TALLOC_CTX *mem_ctx, struct ldb_val value)
static bool ldb_dn_explode(struct ldb_dn *dn)
{
char *p, *ex_name, *ex_value, *data, *d, *dt, *t;
- bool trim = false;
- bool in_extended = false;
+ bool trim = true;
+ bool in_extended = true;
bool in_ex_name = false;
bool in_ex_value = false;
bool in_attr = false;
@@ -352,10 +352,6 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
}
p = parse_dn;
- in_extended = true;
- in_ex_name = false;
- in_ex_value = false;
- trim = true;
t = NULL;
d = dt = data;
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 066d408..b0f9bf9 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -1071,7 +1071,7 @@ static int ltdb_sequence_number(struct ltdb_context *ctx,
struct ldb_context *ldb;
struct ldb_module *module = ctx->module;
struct ldb_request *req = ctx->req;
- TALLOC_CTX *tmp_ctx;
+ TALLOC_CTX *tmp_ctx = NULL;
struct ldb_seqnum_request *seq;
struct ldb_seqnum_result *res;
struct ldb_message *msg = NULL;
@@ -1098,6 +1098,7 @@ static int ltdb_sequence_number(struct ltdb_context *ctx,
ret = LDB_ERR_OPERATIONS_ERROR;
goto done;
}
+
tmp_ctx = talloc_new(req);
if (tmp_ctx == NULL) {
ret = LDB_ERR_OPERATIONS_ERROR;
@@ -1105,6 +1106,10 @@ static int ltdb_sequence_number(struct ltdb_context *ctx,
}
dn = ldb_dn_new(tmp_ctx, ldb, LTDB_BASEINFO);
+ if (dn == NULL) {
+ ret = LDB_ERR_OPERATIONS_ERROR;
+ goto done;
+ }
msg = ldb_msg_new(tmp_ctx);
if (msg == NULL) {
diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c
index 6059ac6..28ec743 100644
--- a/source4/lib/ldb/tools/ldbsearch.c
+++ b/source4/lib/ldb/tools/ldbsearch.c
@@ -133,7 +133,7 @@ static int display_referral(char *referral, struct search_context *sctx)
static int search_callback(struct ldb_request *req, struct ldb_reply *ares)
{
struct search_context *sctx;
- int ret;
+ int ret = LDB_SUCCESS;
sctx = talloc_get_type(req->context, struct search_context);
@@ -174,7 +174,7 @@ static int search_callback(struct ldb_request *req, struct ldb_reply *ares)
}
talloc_free(ares);
- if (ret) {
+ if (ret != LDB_SUCCESS) {
return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c
index a1b3dee..842ef43 100644
--- a/source4/librpc/rpc/dcerpc_connect.c
+++ b/source4/librpc/rpc/dcerpc_connect.c
@@ -539,6 +539,7 @@ static void continue_connect(struct composite_context *c, struct pipe_connect_st
/* dcerpc pipe connect input parameters */
pc.pipe = s->pipe;
pc.binding = s->binding;
+ pc.pipe_name = NULL;
pc.interface = s->table;
pc.creds = s->credentials;
pc.resolve_ctx = lpcfg_resolve_context(s->lp_ctx);
diff --git a/source4/torture/drs/rpc/msds_intid.c b/source4/torture/drs/rpc/msds_intid.c
index 9fc141f..53f4992 100644
--- a/source4/torture/drs/rpc/msds_intid.c
+++ b/source4/torture/drs/rpc/msds_intid.c
@@ -546,7 +546,7 @@ static bool test_dsintid_schema(struct torture_context *tctx, struct DsIntIdTest
la->identifier))
if (dsdb_attr->msDS_IntId) {
torture_assert(tctx,
- drs_attr->attid != dsdb_attr->msDS_IntId,
+ la->attid != dsdb_attr->msDS_IntId,
_make_error_message(ctx, la->attid,
dsdb_attr,
la->identifier))
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index b0e3364..71a319f 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -63,7 +63,7 @@ static bool run_netbench(struct torture_context *tctx, struct smbcli_state *cli,
FILE *f;
bool correct = true;
double target_rate = torture_setting_double(tctx, "targetrate", 0);
- int n;
+ int n = 0;
if (target_rate != 0 && client == 0) {
printf("Targetting %.4f MByte/sec\n", target_rate);
diff --git a/source4/winbind/idmap.c b/source4/winbind/idmap.c
index be679db..8326331 100644
--- a/source4/winbind/idmap.c
+++ b/source4/winbind/idmap.c
@@ -311,7 +311,10 @@ static NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx,
uint32_t rid;
DEBUG(6, ("This is a local unix uid, just calculate that.\n"));
status = dom_sid_split_rid(tmp_ctx, sid, NULL, &rid);
- if (!NT_STATUS_IS_OK(status)) goto failed;
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(tmp_ctx);
+ return status;
+ }
unixid->id = rid;
unixid->type = ID_TYPE_UID;
@@ -324,7 +327,10 @@ static NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx,
uint32_t rid;
DEBUG(6, ("This is a local unix gid, just calculate that.\n"));
status = dom_sid_split_rid(tmp_ctx, sid, NULL, &rid);
- if (!NT_STATUS_IS_OK(status)) goto failed;
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(tmp_ctx);
+ return status;
+ }
unixid->id = rid;
unixid->type = ID_TYPE_GID;
@@ -338,8 +344,8 @@ static NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx,
ldap_encode_ndr_dom_sid(tmp_ctx, sid));
if (ret != LDB_SUCCESS) {
DEBUG(1, ("Search failed: %s\n", ldb_errstring(ldb)));
- status = NT_STATUS_NONE_MAPPED;
- goto failed;
+ talloc_free(tmp_ctx);
+ return NT_STATUS_NONE_MAPPED;
}
if (res->count == 1) {
@@ -349,14 +355,14 @@ static NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx,
-1);
if (new_xid == (uint32_t) -1) {
DEBUG(1, ("Invalid xid mapping.\n"));
- status = NT_STATUS_NONE_MAPPED;
- goto failed;
+ talloc_free(tmp_ctx);
+ return NT_STATUS_NONE_MAPPED;
}
if (type == NULL) {
DEBUG(1, ("Invalid type for mapping entry.\n"));
- status = NT_STATUS_NONE_MAPPED;
- goto failed;
+ talloc_free(tmp_ctx);
+ return NT_STATUS_NONE_MAPPED;
}
unixid->id = new_xid;
--
Samba Shared Repository
More information about the samba-cvs
mailing list