summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/cli_lsa.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-17 10:35:51 +0200
committerStefan Metzmacher <metze@samba.org>2007-10-17 10:35:51 +0200
commitba7a979e5374da422b0657161289e344dc23afa1 (patch)
tree3eb895df2ef02fb11dc032512c81b108b6320733 /source3/librpc/gen_ndr/cli_lsa.c
parent2b2168bff6ae50954334fa1e391e022e9986841d (diff)
downloadsamba-ba7a979e5374da422b0657161289e344dc23afa1.tar.gz
samba-ba7a979e5374da422b0657161289e344dc23afa1.tar.bz2
samba-ba7a979e5374da422b0657161289e344dc23afa1.zip
fix crash bug in pidl generated client code, this
could have happend with [in,out,unique] pointers when the clients sends a valid pointer, but the server reponse with a NULL pointer (as samba-3.0.26a do for some calls). I've tested with midl to see how windows handles this situation and also the reverse case where the client sends NULL and the server reposnse with non-NULL. It appears that midl generated code just ignores this and only copies the result if both pointers are non-NULL. metze (This used to be commit cb98869fa189ce2a926a00fa9077a114f31a5d45)
Diffstat (limited to 'source3/librpc/gen_ndr/cli_lsa.c')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 4c923582f9..50186360f6 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -127,7 +127,7 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
}
/* Return variables */
- if ( sdbuf ) {
+ if (sdbuf && r.out.sdbuf) {
*sdbuf = *r.out.sdbuf;
}
@@ -252,7 +252,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem
}
/* Return variables */
- if ( info ) {
+ if (info && r.out.info) {
*info = *r.out.info;
}
@@ -482,7 +482,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx
}
/* Return variables */
- if ( domains ) {
+ if (domains && r.out.domains) {
*domains = *r.out.domains;
}
*sids = *r.out.sids;
@@ -521,7 +521,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
}
/* Return variables */
- if ( domains ) {
+ if (domains && r.out.domains) {
*domains = *r.out.domains;
}
*names = *r.out.names;
@@ -622,7 +622,7 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *me
}
/* Return variables */
- if ( privs ) {
+ if (privs && r.out.privs) {
*privs = *r.out.privs;
}
@@ -868,7 +868,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_C
}
/* Return variables */
- if ( info ) {
+ if (info && r.out.info) {
*info = *r.out.info;
}
@@ -999,16 +999,16 @@ NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx
}
/* Return variables */
- if ( new_val ) {
+ if (new_val && r.out.new_val) {
*new_val = *r.out.new_val;
}
- if ( new_mtime ) {
+ if (new_mtime && r.out.new_mtime) {
*new_mtime = *r.out.new_mtime;
}
- if ( old_val ) {
+ if (old_val && r.out.old_val) {
*old_val = *r.out.old_val;
}
- if ( old_mtime ) {
+ if (old_mtime && r.out.old_mtime) {
*old_mtime = *r.out.old_mtime;
}
@@ -1074,7 +1074,7 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
}
/* Return variables */
- if ( name ) {
+ if (name && r.out.name) {
*name = *r.out.name;
}
@@ -1110,7 +1110,7 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CT
}
/* Return variables */
- if ( disp_name ) {
+ if (disp_name && r.out.disp_name) {
*disp_name = *r.out.disp_name;
}
*language_id = *r.out.language_id;
@@ -1304,7 +1304,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TAL
}
/* Return variables */
- if ( info ) {
+ if (info && r.out.info) {
*info = *r.out.info;
}
@@ -1490,10 +1490,10 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx
}
/* Return variables */
- if ( account_name ) {
+ if (account_name && r.out.account_name) {
*account_name = *r.out.account_name;
}
- if ( authority_name ) {
+ if (authority_name && r.out.authority_name) {
*authority_name = *r.out.authority_name;
}
@@ -1527,7 +1527,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *me
}
/* Return variables */
- if ( info ) {
+ if (info && r.out.info) {
*info = *r.out.info;
}
@@ -1591,7 +1591,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TA
}
/* Return variables */
- if ( info ) {
+ if (info && r.out.info) {
*info = *r.out.info;
}
@@ -1752,7 +1752,7 @@ NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TA
}
/* Return variables */
- if ( info ) {
+ if (info && r.out.info) {
*info = *r.out.info;
}
@@ -1885,7 +1885,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx
}
/* Return variables */
- if ( domains ) {
+ if (domains && r.out.domains) {
*domains = *r.out.domains;
}
*names = *r.out.names;
@@ -1927,7 +1927,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
}
/* Return variables */
- if ( domains ) {
+ if (domains && r.out.domains) {
*domains = *r.out.domains;
}
*sids = *r.out.sids;
@@ -2230,7 +2230,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
}
/* Return variables */
- if ( domains ) {
+ if (domains && r.out.domains) {
*domains = *r.out.domains;
}
*sids = *r.out.sids;
@@ -2473,7 +2473,7 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx
}
/* Return variables */
- if ( domains ) {
+ if (domains && r.out.domains) {
*domains = *r.out.domains;
}
*names = *r.out.names;
@@ -2514,7 +2514,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct
}
/* Return variables */
- if ( domains ) {
+ if (domains && r.out.domains) {
*domains = *r.out.domains;
}
*sids = *r.out.sids;