[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Wed Mar 16 15:52:01 MDT 2011
The branch, master has been updated
via ab37eae s3: Fix Coverity ID 2231, REVERSE_INULL
via 889e036 s3: Fix Coverity ID 2232, REVERSE_INULL
via 37870e2 s3: Fix Coverity ID 2233, REVERSE_INULL
via dacb392 s3: Fix Coverity ID 2234: REVERSE_INULL
via fb47b7f s3: Fix Coverity ID 2140, DEADCODE
via dd3d6a1 s3: Fix Coverity ID 2144, DEADCODE
via 4f46ad9 s3: Fix Coverity ID 2147, FORWARD_NULL
via c58eb1f s3: Fix Coverity ID 2148, FORWARD_NULL
from 2581cb7 s3: Fix Coverity ID 1402: PASS_BY_VALUE
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ab37eae79c564ee903ca85c2d997093e17b1de98
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:52:20 2011 +0100
s3: Fix Coverity ID 2231, REVERSE_INULL
No point in checking for !ctx after dereferencing it
Autobuild-User: Volker Lendecke <vlendec at samba.org>
Autobuild-Date: Wed Mar 16 22:51:52 CET 2011 on sn-devel-104
commit 889e03617d6153040bbf462b631d9e752220281b
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:50:59 2011 +0100
s3: Fix Coverity ID 2232, REVERSE_INULL
No point checking for !cli after dereferencing it
commit 37870e28ab4ef0ebcec0ed18714a6fef9a5a16d4
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:48:50 2011 +0100
s3: Fix Coverity ID 2233, REVERSE_INULL
We have dereferenced h already in dcerpc_lsa_open_policy2 in line 425
commit dacb392db6b7585bffe00fae11aab4cc6225c072
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:47:10 2011 +0100
s3: Fix Coverity ID 2234: REVERSE_INULL
We have dereferenced "b" already in dcerpc_samr_Connect2 in line 521
commit fb47b7fd67567fd84865e82bca91c1c32f36771f
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:34:44 2011 +0100
s3: Fix Coverity ID 2140, DEADCODE
This routine was never executed after f0dcc90f because "netname" was always
NULL.
Jeremy, please check!
commit dd3d6a160c54edbfbca708c2b17a61c7e39b3801
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:29:02 2011 +0100
s3: Fix Coverity ID 2144, DEADCODE
We could never have assigned the real value in line 481.
Andreas, please check!
commit 4f46ad96f2062bc628becf6dcc0780b69a583798
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:24:58 2011 +0100
s3: Fix Coverity ID 2147, FORWARD_NULL
How could this ever have worked???
commit c58eb1f8c52107a211a8604d955ed27d169d44f1
Author: Volker Lendecke <vl at samba.org>
Date: Wed Mar 16 21:21:17 2011 +0100
s3: Fix Coverity ID 2148, FORWARD_NULL
Further down we unconditionally reference *info
-----------------------------------------------------------------------
Summary of changes:
nsswitch/libwbclient/wbc_pam.c | 5 ++---
source3/lib/netapi/cm.c | 5 +++--
source3/libsmb/conncache.c | 2 +-
source3/rpc_client/cli_pipe.c | 6 ++++--
source3/rpc_server/netlogon/srv_netlog_nt.c | 6 +++---
source3/smbd/lanman.c | 2 +-
source3/winbindd/winbindd_samr.c | 2 +-
7 files changed, 15 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c
index 21f2c5d..585dfcf 100644
--- a/nsswitch/libwbclient/wbc_pam.c
+++ b/nsswitch/libwbclient/wbc_pam.c
@@ -1160,9 +1160,8 @@ wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params,
ZERO_STRUCT(request);
ZERO_STRUCT(response);
- if (info != NULL) {
- *info = NULL;
- }
+ *info = NULL;
+
if (error != NULL) {
*error = NULL;
}
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index 0e08c6d..0b82206 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -62,8 +62,7 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
const char *server_name,
struct client_ipc_connection **pp)
{
- struct libnetapi_private_ctx *priv_ctx =
- (struct libnetapi_private_ctx *)ctx->private_data;
+ struct libnetapi_private_ctx *priv_ctx;
struct user_auth_info *auth_info = NULL;
struct cli_state *cli_ipc = NULL;
struct client_ipc_connection *p;
@@ -72,6 +71,8 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
return WERR_INVALID_PARAM;
}
+ priv_ctx = (struct libnetapi_private_ctx *)ctx->private_data;
+
p = ipc_cm_find(priv_ctx, server_name);
if (p) {
*pp = p;
diff --git a/source3/libsmb/conncache.c b/source3/libsmb/conncache.c
index daac41e..6635318 100644
--- a/source3/libsmb/conncache.c
+++ b/source3/libsmb/conncache.c
@@ -99,7 +99,7 @@ static NTSTATUS negative_conn_cache_valuedecode(const char *value)
{
unsigned int v = NT_STATUS_V(NT_STATUS_INTERNAL_ERROR);
- if (value != NULL) {
+ if (value == NULL) {
return NT_STATUS_INTERNAL_ERROR;
}
if (sscanf(value, "%x", &v) != 1) {
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index ebbe849..0109bda 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -3256,7 +3256,7 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *cli,
DATA_BLOB *session_key)
{
- struct pipe_auth_data *a = cli->auth;
+ struct pipe_auth_data *a;
struct schannel_state *schannel_auth;
struct auth_ntlmssp_state *ntlmssp_ctx;
struct spnego_context *spnego_ctx;
@@ -3268,7 +3268,9 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
return NT_STATUS_INVALID_PARAMETER;
}
- if (!cli->auth) {
+ a = cli->auth;
+
+ if (a == NULL) {
return NT_STATUS_INVALID_PARAMETER;
}
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index 8e76632..e5d6124 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -490,7 +490,7 @@ NTSTATUS _netr_NetrEnumerateTrustedDomains(struct pipes_struct *p,
status = NT_STATUS_OK;
out:
- if (h && is_valid_policy_hnd(&pol)) {
+ if (is_valid_policy_hnd(&pol)) {
dcerpc_lsa_Close(h, p->mem_ctx, &pol, &result);
}
@@ -617,10 +617,10 @@ static NTSTATUS samr_find_machine_account(TALLOC_CTX *mem_ctx,
}
out:
- if (b && is_valid_policy_hnd(&domain_handle)) {
+ if (is_valid_policy_hnd(&domain_handle)) {
dcerpc_samr_Close(b, mem_ctx, &domain_handle, &result);
}
- if (b && is_valid_policy_hnd(&connect_handle)) {
+ if (is_valid_policy_hnd(&connect_handle)) {
dcerpc_samr_Close(b, mem_ctx, &connect_handle, &result);
}
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 02ef033..75ec100 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2005,7 +2005,7 @@ static bool api_RNetShareGetInfo(struct smbd_server_connection *sconn,
int uLevel = get_safe_SVAL(param,tpscnt,p,0,-1);
int snum;
- if (!str1 || !str2 || !netname || !p) {
+ if (!str1 || !str2 || !netname_in || !p) {
return False;
}
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index 40c0bb6..0bcfc30 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -450,7 +450,7 @@ static NTSTATUS sam_lookup_groupmem(struct winbindd_domain *domain,
}
if (pnum_names) {
- pnum_names = 0;
+ *pnum_names = 0;
}
tmp_ctx = talloc_stackframe();
--
Samba Shared Repository
More information about the samba-cvs
mailing list