[SCM] Samba Shared Repository - branch v3-6-test updated

Günther Deschner gd at samba.org
Fri May 13 05:07:21 MDT 2011


The branch, v3-6-test has been updated
       via  d137081 s3-libnetjoin: fix uninitialized variable.
       via  f6f728f s3-libnetapi/libnetjoin: fix uninitialized variables after the libsmbconf changes.
       via  dde4d22 s3-includes: move enum flush_reason_enum to smb.h
      from  7e68a8a s3-lib/smbconf: fix uninitialized error code in smbconf_reg_init().

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


- Log -----------------------------------------------------------------
commit d137081144c61d1b85ac0bb1f7c89fd4d73a4579
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 13 00:19:13 2011 +0200

    s3-libnetjoin: fix uninitialized variable.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Fri May 13 01:22:18 CEST 2011 on sn-devel-104
    (cherry picked from commit 62862e27bbf94aa52623f64f17fbda8a2db38095)

commit f6f728fa8070a37b90d05e8c7ffbfc6bbfca9fb2
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 13 00:15:41 2011 +0200

    s3-libnetapi/libnetjoin: fix uninitialized variables after the libsmbconf changes.
    
    Guenther
    (cherry picked from commit 04c101e873bd758fae6b7131551f6069ab2fcce3)

commit dde4d22b803177460e87ff3cb925c4831721f70f
Author: Günther Deschner <gd at samba.org>
Date:   Tue May 3 16:25:20 2011 +0200

    s3-includes: move enum flush_reason_enum to smb.h
    
    Guenther
    (cherry picked from commit 89e60556065c6e3dc7a8447cdba5a8fed1d19ea4)

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

Summary of changes:
 source3/include/includes.h      |   16 ----------------
 source3/include/smb.h           |   16 ++++++++++++++++
 source3/lib/netapi/serverinfo.c |    2 +-
 source3/libnet/libnet_join.c    |    6 +++---
 4 files changed, 20 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 3edab21..04850f0 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -538,22 +538,6 @@ typedef char fstring[FSTRING_LEN];
 #include "../lib/util/smb_threads.h"
 #include "../lib/util/smb_threads_internal.h"
 
-/*
- * Reasons for cache flush.
- */
-
-enum flush_reason_enum {
-    SEEK_FLUSH,
-    READ_FLUSH,
-    WRITE_FLUSH,
-    READRAW_FLUSH,
-    OPLOCK_RELEASE_FLUSH,
-    CLOSE_FLUSH,
-    SYNC_FLUSH,
-    SIZECHANGE_FLUSH,
-    /* NUM_FLUSH_REASONS must remain the last value in the enumeration. */
-    NUM_FLUSH_REASONS};
-
 /***** prototypes *****/
 #ifndef NO_PROTO_H
 #include "proto.h"
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 281ce19..3e68a99 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1742,4 +1742,20 @@ struct deferred_open_record;
 /* Used inside aio code. */
 struct aio_extra;
 
+/*
+ * Reasons for cache flush.
+ */
+
+enum flush_reason_enum {
+    SEEK_FLUSH,
+    READ_FLUSH,
+    WRITE_FLUSH,
+    READRAW_FLUSH,
+    OPLOCK_RELEASE_FLUSH,
+    CLOSE_FLUSH,
+    SYNC_FLUSH,
+    SIZECHANGE_FLUSH,
+    /* NUM_FLUSH_REASONS must remain the last value in the enumeration. */
+    NUM_FLUSH_REASONS};
+
 #endif /* _SMB_H */
diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c
index f321648..8f76b4a 100644
--- a/source3/lib/netapi/serverinfo.c
+++ b/source3/lib/netapi/serverinfo.c
@@ -540,7 +540,7 @@ WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
 static WERROR NetServerSetInfo_l_1005(struct libnetapi_ctx *ctx,
 				      struct NetServerSetInfo *r)
 {
-	WERROR werr;
+	WERROR werr = WERR_OK;
 	sbcErr err;
 	struct smbconf_ctx *conf_ctx;
 	struct srvsvc_NetSrvInfo1005 *info1005;
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 0c5e1f0..969452a 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1291,7 +1291,7 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
 	struct samr_Ids user_rids;
 	struct samr_Ids name_types;
 	union samr_UserInfo *info = NULL;
-	struct dcerpc_binding_handle *b;
+	struct dcerpc_binding_handle *b = NULL;
 
 	ZERO_STRUCT(sam_pol);
 	ZERO_STRUCT(domain_pol);
@@ -1432,7 +1432,7 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
 	dcerpc_samr_Close(b, mem_ctx, &user_pol, &result);
 
 done:
-	if (pipe_hnd) {
+	if (pipe_hnd && b) {
 		if (is_valid_policy_hnd(&domain_pol)) {
 			dcerpc_samr_Close(b, mem_ctx, &domain_pol, &result);
 		}
@@ -1454,7 +1454,7 @@ done:
 
 static WERROR do_join_modify_vals_config(struct libnet_JoinCtx *r)
 {
-	WERROR werr;
+	WERROR werr = WERR_OK;
 	sbcErr err;
 	struct smbconf_ctx *ctx;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list