[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-549-g0ec1350

Günther Deschner gd at samba.org
Fri Mar 20 10:26:27 GMT 2009


The branch, v3-4-test has been updated
       via  0ec1350d3d9272a6070950ba1d460523f53a628d (commit)
       via  8a6f09cededf4167aea5f08e573bab51afcc0074 (commit)
       via  e858d192e1d7d6ab45ec247fbb776f5825e7fca5 (commit)
       via  1a591aadb66d589171d236fc2f8bf2eb6d9ce499 (commit)
       via  81a6aee736f805d1bf8d7d2a1ff19851cd11d763 (commit)
       via  874caf9a1fb45f36ec8c506d29264735d1647dae (commit)
      from  59811de7a80d5ecdf090c116087c7a03ae288887 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit 0ec1350d3d9272a6070950ba1d460523f53a628d
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:21:36 2009 +0100

    s3-netapi: Fix Coverity #774 (REVERSE_INULL).
    
    Guenther
    (cherry picked from commit 3a6133d70202ef80ead4203740c000be5e93b288)

commit 8a6f09cededf4167aea5f08e573bab51afcc0074
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:19:59 2009 +0100

    s3-netapi: Fix Coverity #775 (REVERSE_INULL).
    
    Guenther
    (cherry picked from commit f2243e8197aa064adea3da2a4d1c08250668943f)

commit e858d192e1d7d6ab45ec247fbb776f5825e7fca5
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:17:50 2009 +0100

    s3-netapi: Fix Coverity #776 (REVERSE_INULL).
    
    Guenther
    (cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba)

commit 1a591aadb66d589171d236fc2f8bf2eb6d9ce499
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:11:04 2009 +0100

    s3-krb5: Fix Coverity #762 (REVERSE_INULL).
    
    Guenther
    (cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)

commit 81a6aee736f805d1bf8d7d2a1ff19851cd11d763
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:07:21 2009 +0100

    s3-net: Fix Coverity #861 (UNINIT).
    
    Guenther
    (cherry picked from commit 73030b107d5722a2c42cd18240d45bcb256335ac)

commit 874caf9a1fb45f36ec8c506d29264735d1647dae
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 20 11:04:59 2009 +0100

    s3-net: Fix Coverity #898 (UNINIT).
    
    Guenther
    (cherry picked from commit d2fb6d348248cdca7e55360c77aa31b91250f885)

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/netapi/group.c |   10 +++-------
 source3/lib/netapi/user.c  |   18 ++++++------------
 source3/libads/kerberos.c  |   12 ++++++------
 source3/utils/net_rpc.c    |    4 ++--
 4 files changed, 17 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 189902a..c09632a 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -1276,6 +1276,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 
 	*r->out.buffer = NULL;
 	*r->out.entries_read = 0;
+	*r->out.total_entries = 0;
 
 	switch (r->in.level) {
 		case 0:
@@ -1364,13 +1365,8 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 		}
 	}
 
-	if (r->out.entries_read) {
-		*r->out.entries_read = entries_read;
-	}
-
-	if (r->out.total_entries) {
-		*r->out.total_entries = entries_read;
-	}
+	*r->out.entries_read = entries_read;
+	*r->out.total_entries = entries_read;
 
 	werr = WERR_OK;
 
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 8cc65a6..e760a8b 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -2806,6 +2806,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
 
 	*r->out.buffer = NULL;
 	*r->out.entries_read = 0;
+	*r->out.total_entries = 0;
 
 	switch (r->in.level) {
 		case 0:
@@ -2899,12 +2900,8 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
 		}
 	}
 
-	if (r->out.entries_read) {
-		*r->out.entries_read = entries_read;
-	}
-	if (r->out.total_entries) {
-		*r->out.total_entries = entries_read;
-	}
+	*r->out.entries_read = entries_read;
+	*r->out.total_entries = entries_read;
 
  done:
 	if (ctx->disable_policy_handle_cache) {
@@ -3242,6 +3239,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 
 	*r->out.buffer = NULL;
 	*r->out.entries_read = 0;
+	*r->out.total_entries = 0;
 
 	switch (r->in.level) {
 		case 0:
@@ -3402,12 +3400,8 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
 		}
 	}
 
-	if (r->out.entries_read) {
-		*r->out.entries_read = entries_read;
-	}
-	if (r->out.total_entries) {
-		*r->out.total_entries = entries_read;
-	}
+	*r->out.entries_read = entries_read;
+	*r->out.total_entries = entries_read;
 
  done:
 	if (ctx->disable_policy_handle_cache) {
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 56d7b06..52cb975 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -511,13 +511,13 @@ char *kerberos_get_default_realm_from_ccache( void )
 
   out:
 
-	if (princ) {
-		krb5_free_principal(ctx, princ);
-	}
-	if (cc) {
-		krb5_cc_close(ctx, cc);
-	}
 	if (ctx) {
+		if (princ) {
+			krb5_free_principal(ctx, princ);
+		}
+		if (cc) {
+			krb5_cc_close(ctx, cc);
+		}
 		krb5_free_context(ctx);
 	}
 
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index d83fb44..21881ba 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -54,7 +54,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
 				   DOM_SID **domain_sid,
 				   const char **domain_name)
 {
-	struct rpc_pipe_client *lsa_pipe;
+	struct rpc_pipe_client *lsa_pipe = NULL;
 	struct policy_handle pol;
 	NTSTATUS result = NT_STATUS_OK;
 	union lsa_PolicyInformation *info = NULL;
@@ -1657,7 +1657,7 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli,
 {
 	DOM_SID *sids = NULL;
 	enum lsa_SidType *types = NULL;
-	struct rpc_pipe_client *pipe_hnd;
+	struct rpc_pipe_client *pipe_hnd = NULL;
 	struct policy_handle lsa_pol;
 	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list