[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Mon Apr 26 14:53:18 MDT 2010


The branch, master has been updated
       via  1ede2a0... s4: rename RAP share_enum_info to share_info.
      from  1055b3c... When walking the SMB2 requests queue, ensure the request is still "in flight" before examining the details.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1ede2a0577fa85100f95526386bc5298b565da8c
Author: Günther Deschner <gd at samba.org>
Date:   Mon Apr 26 22:06:47 2010 +0200

    s4: rename RAP share_enum_info to share_info.
    
    Guenther

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

Summary of changes:
 source4/libcli/rap/rap.h       |   20 ++++++++++----------
 source4/ntvfs/ipc/ipc_rap.c    |   12 ++++++------
 source4/ntvfs/ipc/rap_server.c |   10 +++++-----
 source4/torture/rap/rap.c      |   14 +++++++-------
 4 files changed, 28 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/rap/rap.h b/source4/libcli/rap/rap.h
index 6dcaa9b..7099798 100644
--- a/source4/libcli/rap/rap.h
+++ b/source4/libcli/rap/rap.h
@@ -278,20 +278,20 @@
 #define RAP_WDASDSetInfo2			318
 #define MAX_API					318
 
-struct rap_shareenum_info_0 {
-	char name[13];
+struct rap_share_info_0 {
+	char share_name[13];
 };
 
-struct rap_shareenum_info_1 {
-	char name[13];
-	char pad;
-	uint16_t type;
+struct rap_share_info_1 {
+	char share_name[13];
+	char reserved1;
+	uint16_t share_type;
 	char *comment;
 };
 
-union rap_shareenum_info {
-	struct rap_shareenum_info_0 info0;
-	struct rap_shareenum_info_1 info1;
+union rap_share_info {
+	struct rap_share_info_0 info0;
+	struct rap_share_info_1 info1;
 };
 
 struct rap_NetShareEnum {
@@ -305,7 +305,7 @@ struct rap_NetShareEnum {
 		uint16_t convert;
 		uint16_t count;
 		uint16_t available;
-		union rap_shareenum_info *info;
+		union rap_share_info *info;
 	} out;
 };
 
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c
index 04ea700..277e346 100644
--- a/source4/ntvfs/ipc/ipc_rap.c
+++ b/source4/ntvfs/ipc/ipc_rap.c
@@ -291,17 +291,17 @@ static NTSTATUS _rap_netshareenum(struct rap_call *call)
 		switch(r.in.level) {
 		case 0:
 			NDR_GOTO(ndr_push_bytes(call->ndr_push_data,
-					      (const uint8_t *)r.out.info[i].info0.name,
-					      sizeof(r.out.info[i].info0.name)));
+					      (const uint8_t *)r.out.info[i].info0.share_name,
+					      sizeof(r.out.info[i].info0.share_name)));
 			break;
 		case 1:
 			NDR_GOTO(ndr_push_bytes(call->ndr_push_data,
-					      (const uint8_t *)r.out.info[i].info1.name,
-					      sizeof(r.out.info[i].info1.name)));
+					      (const uint8_t *)r.out.info[i].info1.share_name,
+					      sizeof(r.out.info[i].info1.share_name)));
 			NDR_GOTO(ndr_push_uint8(call->ndr_push_data,
-					      NDR_SCALARS, r.out.info[i].info1.pad));
+					      NDR_SCALARS, r.out.info[i].info1.reserved1));
 			NDR_GOTO(ndr_push_uint16(call->ndr_push_data,
-					       NDR_SCALARS, r.out.info[i].info1.type));
+					       NDR_SCALARS, r.out.info[i].info1.share_type));
 
 			RAP_GOTO(rap_push_string(call->ndr_push_data,
 					       call->heap,
diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c
index 2bc07c3..fc80b66 100644
--- a/source4/ntvfs/ipc/rap_server.c
+++ b/source4/ntvfs/ipc/rap_server.c
@@ -58,18 +58,18 @@ NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
 
 	r->out.available = count;
 	r->out.info = talloc_array(mem_ctx,
-				   union rap_shareenum_info, r->out.available);
+				   union rap_share_info, r->out.available);
 
 	for (i = 0, j = 0; i < r->out.available; i++) {
 		if (!NT_STATUS_IS_OK(share_get_config(mem_ctx, sctx, snames[i], &scfg))) {
 			DEBUG(3, ("WARNING: Service [%s] disappeared after enumeration!\n", snames[i]));
 			continue;
 		}
-		strncpy(r->out.info[j].info1.name,
+		strncpy(r->out.info[j].info1.share_name,
 			snames[i],
-			sizeof(r->out.info[0].info1.name));
-		r->out.info[i].info1.pad = 0;
-		r->out.info[i].info1.type = dcesrv_common_get_share_type(mem_ctx, NULL, scfg);
+			sizeof(r->out.info[0].info1.share_name));
+		r->out.info[i].info1.reserved1 = 0;
+		r->out.info[i].info1.share_type = dcesrv_common_get_share_type(mem_ctx, NULL, scfg);
 		r->out.info[i].info1.comment = talloc_strdup(mem_ctx, share_string_option(scfg, SHARE_COMMENT, ""));
 		talloc_free(scfg);
 		j++;
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 579dbbb..bc06003 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -280,7 +280,7 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_tree *tree,
 	NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.count));
 	NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.available));
 
-	r->out.info = talloc_array(mem_ctx, union rap_shareenum_info, r->out.count);
+	r->out.info = talloc_array(mem_ctx, union rap_share_info, r->out.count);
 
 	if (r->out.info == NULL) {
 		result = NT_STATUS_NO_MEMORY;
@@ -291,15 +291,15 @@ static NTSTATUS smbcli_rap_netshareenum(struct smbcli_tree *tree,
 		switch(r->in.level) {
 		case 0:
 			NDR_GOTO(ndr_pull_bytes(call->ndr_pull_data,
-					      (uint8_t *)r->out.info[i].info0.name, 13));
+					      (uint8_t *)r->out.info[i].info0.share_name, 13));
 			break;
 		case 1:
 			NDR_GOTO(ndr_pull_bytes(call->ndr_pull_data,
-					      (uint8_t *)r->out.info[i].info1.name, 13));
+					      (uint8_t *)r->out.info[i].info1.share_name, 13));
 			NDR_GOTO(ndr_pull_bytes(call->ndr_pull_data,
-					      (uint8_t *)&r->out.info[i].info1.pad, 1));
+					      (uint8_t *)&r->out.info[i].info1.reserved1, 1));
 			NDR_GOTO(ndr_pull_uint16(call->ndr_pull_data,
-					       NDR_SCALARS, &r->out.info[i].info1.type));
+					       NDR_SCALARS, &r->out.info[i].info1.share_type));
 			RAP_GOTO(rap_pull_string(mem_ctx, call->ndr_pull_data,
 					       r->out.convert,
 					       &r->out.info[i].info1.comment));
@@ -327,8 +327,8 @@ static bool test_netshareenum(struct torture_context *tctx,
 		smbcli_rap_netshareenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r), "");
 
 	for (i=0; i<r.out.count; i++) {
-		printf("%s %d %s\n", r.out.info[i].info1.name,
-		       r.out.info[i].info1.type,
+		printf("%s %d %s\n", r.out.info[i].info1.share_name,
+		       r.out.info[i].info1.share_type,
 		       r.out.info[i].info1.comment);
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list