diff options
author | Günther Deschner <gd@samba.org> | 2010-04-26 22:06:47 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-04-26 22:52:45 +0200 |
commit | 1ede2a0577fa85100f95526386bc5298b565da8c (patch) | |
tree | 1fdcba37219b1949d5b5cf281d9b2fd3f9455217 /source4 | |
parent | 1055b3c229f9ab8b4d43a73346090bb72b88d607 (diff) | |
download | samba-1ede2a0577fa85100f95526386bc5298b565da8c.tar.gz samba-1ede2a0577fa85100f95526386bc5298b565da8c.tar.bz2 samba-1ede2a0577fa85100f95526386bc5298b565da8c.zip |
s4: rename RAP share_enum_info to share_info.
Guenther
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/rap/rap.h | 20 | ||||
-rw-r--r-- | source4/ntvfs/ipc/ipc_rap.c | 12 | ||||
-rw-r--r-- | source4/ntvfs/ipc/rap_server.c | 10 | ||||
-rw-r--r-- | source4/torture/rap/rap.c | 14 |
4 files changed, 28 insertions, 28 deletions
diff --git a/source4/libcli/rap/rap.h b/source4/libcli/rap/rap.h index 6dcaa9bc83..7099798a80 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 04ea70030e..277e346c4b 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 2bc07c3e7b..fc80b66419 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 579dbbb003..bc06003deb 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); } |