diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-11-19 18:57:52 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:56 -0500 |
commit | 01367cdfd03d2412904c57807e1ff3c62696d05f (patch) | |
tree | b887c607396a74e52fe65477b92982407729c995 /source3/utils | |
parent | 3372adce58070febd728ee0f941e48d69acc40b4 (diff) | |
download | samba-01367cdfd03d2412904c57807e1ff3c62696d05f.tar.gz samba-01367cdfd03d2412904c57807e1ff3c62696d05f.tar.bz2 samba-01367cdfd03d2412904c57807e1ff3c62696d05f.zip |
r19797: Convert the remaining pipes to the "new" unique out ptr handling
(This used to be commit bc4e0a388a2859d2ddcfb8f07920f3b121a37894)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc.c | 32 | ||||
-rw-r--r-- | source3/utils/smbtree.c | 3 |
2 files changed, 20 insertions, 15 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 67400ca3c6..366f63dc5b 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -3020,8 +3020,8 @@ static NTSTATUS rpc_share_add_internals(const DOM_SID *domain_sid, uint32 type = STYPE_DISKTREE; /* only allow disk shares to be added */ uint32 num_users=0, perms=0; char *password=NULL; /* don't allow a share password */ - uint32 level = 2; - uint32 parm_error; + uint32 level = 2; + uint32 *pparm_error = NULL; union srvsvc_NetShareInfo info; struct srvsvc_NetShareInfo2 info2; @@ -3046,7 +3046,7 @@ static NTSTATUS rpc_share_add_internals(const DOM_SID *domain_sid, info2.name = sharename; result = rpccli_srvsvc_NetShareAdd(pipe_hnd, mem_ctx, NULL, level, - info, &parm_error); + info, &pparm_error); return result; } @@ -3158,9 +3158,11 @@ static NTSTATUS get_share_info(struct rpc_pipe_client *pipe_hnd, /* no specific share requested, enumerate all */ if (argc == 0) { uint32 hnd = 0; + uint32 *phnd = &hnd; - return rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL, &level, ctr, - 0xffffffff, numentries, &hnd); + return rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL, + &level, ctr, 0xffffffff, + numentries, &phnd); } /* request just one share */ @@ -3328,7 +3330,7 @@ static NTSTATUS rpc_share_migrate_shares_internals(const DOM_SID *domain_sid, for (i = 0; i < numentries; i++) { - uint32 parm_error; + uint32 *pparm_error = NULL; union srvsvc_NetShareInfo info; /* reset error-code */ @@ -3349,7 +3351,7 @@ static NTSTATUS rpc_share_migrate_shares_internals(const DOM_SID *domain_sid, info.info502 = &ctr_src.ctr502->array[i]; result = rpccli_srvsvc_NetShareAdd(srvsvc_pipe, mem_ctx, NULL, - 502, info, &parm_error); + 502, info, &pparm_error); if (NT_STATUS_EQUAL(result, NT_STATUS_OBJECT_NAME_COLLISION)) { printf(" [%s] does already exist\n", ctr_src.ctr502->array[i].name); @@ -3724,7 +3726,7 @@ static NTSTATUS rpc_share_migrate_security_internals(const DOM_SID *domain_sid, struct cli_state *cli_dst = NULL; uint32 level = 502; /* includes secdesc */ uint32 numentries; - uint32 parm_error; + uint32 *parm_error = NULL; result = get_share_info(pipe_hnd, mem_ctx, level, argc, argv, &ctr_src, &numentries); @@ -3757,9 +3759,9 @@ static NTSTATUS rpc_share_migrate_security_internals(const DOM_SID *domain_sid, ZERO_STRUCT(info); /* finally modify the share on the dst server */ - result = rpccli_srvsvc_NetShareSetInfo(srvsvc_pipe, mem_ctx, NULL, - argv[0], level, info, - &parm_error); + result = rpccli_srvsvc_NetShareSetInfo( + srvsvc_pipe, mem_ctx, NULL, argv[0], level, info, + &parm_error); if (!NT_STATUS_IS_OK(result)) { printf("cannot set share-acl: %s\n", nt_errstr(result)); @@ -4691,7 +4693,7 @@ static NTSTATUS rpc_sh_share_add(TALLOC_CTX *mem_ctx, union srvsvc_NetShareInfo info; struct srvsvc_NetShareInfo2 info2; NTSTATUS result; - uint32 parm_error; + uint32 *parm_error = NULL; if ((argc < 2) || (argc > 3)) { d_fprintf(stderr, "usage: %s <share> <path> [comment]\n", @@ -4873,6 +4875,7 @@ static NTSTATUS rpc_file_list_internals(const DOM_SID *domain_sid, union srvsvc_NetFileCtr ctr; NTSTATUS result; uint32 hnd; + uint32 *phnd = &hnd; uint32 preferred_len = 0xffffffff, i; const char *username=NULL; uint32 level = 3; @@ -4884,8 +4887,9 @@ static NTSTATUS rpc_file_list_internals(const DOM_SID *domain_sid, if (argc > 0) username = smb_xstrdup(argv[0]); - result = rpccli_srvsvc_NetFileEnum(pipe_hnd, - mem_ctx, NULL, NULL, username, &level, &ctr, preferred_len, &numentries, &hnd); + result = rpccli_srvsvc_NetFileEnum(pipe_hnd, mem_ctx, NULL, NULL, + username, &level, &ctr, + preferred_len, &numentries, &phnd); if (!NT_STATUS_IS_OK(result)) goto done; diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index 31ed763565..e993e5dc41 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -135,6 +135,7 @@ static BOOL get_rpc_shares(struct cli_state *cli, struct rpc_pipe_client *pipe_hnd; TALLOC_CTX *mem_ctx; uint32 enum_hnd; + uint32 *penum_hnd = &enum_hnd; struct srvsvc_NetShareCtr1 ctr1; union srvsvc_NetShareCtr ctr; uint32 numentries; @@ -164,7 +165,7 @@ static BOOL get_rpc_shares(struct cli_state *cli, status = rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL, &info_level, &ctr, 0xffffffff, &numentries, - &enum_hnd); + &penum_hnd); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(mem_ctx); |