diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-01-16 17:48:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:11 -0500 |
commit | e2e7ad91a9aa3b8a1270e1148550fee9e3fedc79 (patch) | |
tree | 0c77df2e47a690b2e555c379fd387934128f68f7 /source3/librpc/gen_ndr | |
parent | def7b0bca194502832192270322c6232622ee48e (diff) | |
download | samba-e2e7ad91a9aa3b8a1270e1148550fee9e3fedc79.tar.gz samba-e2e7ad91a9aa3b8a1270e1148550fee9e3fedc79.tar.bz2 samba-e2e7ad91a9aa3b8a1270e1148550fee9e3fedc79.zip |
r20837: Use real type name, to fix compilation with -WC++-compat
(This used to be commit 840485686d2b3765bd01fbe442f712803d1f4c0f)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r-- | source3/librpc/gen_ndr/srv_dfs.c | 4 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_echo.c | 10 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_eventlog.c | 10 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_lsa.c | 66 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_netlogon.c | 70 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_srvsvc.c | 42 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_svcctl.c | 96 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_unixinfo.c | 10 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_winreg.c | 40 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_wkssvc.c | 8 |
10 files changed, 178 insertions, 178 deletions
diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c index fe34b6e323..c75c979093 100644 --- a/source3/librpc/gen_ndr/srv_dfs.c +++ b/source3/librpc/gen_ndr/srv_dfs.c @@ -37,7 +37,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r); ZERO_STRUCT(r.out); - r.out.exist_flag = talloc_zero_size(mem_ctx, sizeof(*r.out.exist_flag)); + r.out.exist_flag = talloc_zero(mem_ctx, uint32_t); if (r.out.exist_flag == NULL) { talloc_free(mem_ctx); return False; @@ -300,7 +300,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union dfs_Info); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_echo.c b/source3/librpc/gen_ndr/srv_echo.c index e72d1eafe2..eb4cf894b8 100644 --- a/source3/librpc/gen_ndr/srv_echo.c +++ b/source3/librpc/gen_ndr/srv_echo.c @@ -37,7 +37,7 @@ static BOOL api_echo_AddOne(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_AddOne, &r); ZERO_STRUCT(r.out); - r.out.out_data = talloc_zero_size(mem_ctx, sizeof(*r.out.out_data)); + r.out.out_data = talloc_zero(mem_ctx, uint32_t); if (r.out.out_data == NULL) { talloc_free(mem_ctx); return False; @@ -108,7 +108,7 @@ static BOOL api_echo_EchoData(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_EchoData, &r); ZERO_STRUCT(r.out); - r.out.out_data = talloc_zero_size(mem_ctx, sizeof(*r.out.out_data) * r.in.len); + r.out.out_data = talloc_zero_array(mem_ctx, uint8_t, r.in.len); if (r.out.out_data == NULL) { talloc_free(mem_ctx); return False; @@ -243,7 +243,7 @@ static BOOL api_echo_SourceData(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_SourceData, &r); ZERO_STRUCT(r.out); - r.out.data = talloc_zero_size(mem_ctx, sizeof(*r.out.data) * r.in.len); + r.out.data = talloc_zero_array(mem_ctx, uint8_t, r.in.len); if (r.out.data == NULL) { talloc_free(mem_ctx); return False; @@ -314,7 +314,7 @@ static BOOL api_echo_TestCall(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_TestCall, &r); ZERO_STRUCT(r.out); - r.out.s2 = talloc_zero_size(mem_ctx, sizeof(*r.out.s2)); + r.out.s2 = talloc_zero(mem_ctx, const char *); if (r.out.s2 == NULL) { talloc_free(mem_ctx); return False; @@ -385,7 +385,7 @@ static BOOL api_echo_TestCall2(pipes_struct *p) NDR_PRINT_IN_DEBUG(echo_TestCall2, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union echo_Info); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_eventlog.c b/source3/librpc/gen_ndr/srv_eventlog.c index 466d523262..f4746ef66e 100644 --- a/source3/librpc/gen_ndr/srv_eventlog.c +++ b/source3/librpc/gen_ndr/srv_eventlog.c @@ -295,7 +295,7 @@ static BOOL api_eventlog_GetNumRecords(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords, &r); ZERO_STRUCT(r.out); - r.out.number = talloc_zero_size(mem_ctx, sizeof(*r.out.number)); + r.out.number = talloc_zero(mem_ctx, uint32_t); if (r.out.number == NULL) { talloc_free(mem_ctx); return False; @@ -494,7 +494,7 @@ static BOOL api_eventlog_OpenEventLogW(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -693,19 +693,19 @@ static BOOL api_eventlog_ReadEventLogW(pipes_struct *p) NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW, &r); ZERO_STRUCT(r.out); - r.out.data = talloc_zero_size(mem_ctx, sizeof(*r.out.data) * r.in.number_of_bytes); + r.out.data = talloc_zero_array(mem_ctx, uint8_t, r.in.number_of_bytes); if (r.out.data == NULL) { talloc_free(mem_ctx); return False; } - r.out.sent_size = talloc_zero_size(mem_ctx, sizeof(*r.out.sent_size)); + r.out.sent_size = talloc_zero(mem_ctx, uint32_t); if (r.out.sent_size == NULL) { talloc_free(mem_ctx); return False; } - r.out.real_size = talloc_zero_size(mem_ctx, sizeof(*r.out.real_size)); + r.out.real_size = talloc_zero(mem_ctx, uint32_t); if (r.out.real_size == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c index 7caa149dd6..6a4f991b99 100644 --- a/source3/librpc/gen_ndr/srv_lsa.c +++ b/source3/librpc/gen_ndr/srv_lsa.c @@ -168,7 +168,7 @@ static BOOL api_lsa_EnumPrivs(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.privs = talloc_zero_size(mem_ctx, sizeof(*r.out.privs)); + r.out.privs = talloc_zero(mem_ctx, struct lsa_PrivArray); if (r.out.privs == NULL) { talloc_free(mem_ctx); return False; @@ -239,7 +239,7 @@ static BOOL api_lsa_QuerySecurity(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QuerySecurity, &r); ZERO_STRUCT(r.out); - r.out.sdbuf = talloc_zero_size(mem_ctx, sizeof(*r.out.sdbuf)); + r.out.sdbuf = talloc_zero(mem_ctx, struct sec_desc_buf); if (r.out.sdbuf == NULL) { talloc_free(mem_ctx); return False; @@ -438,7 +438,7 @@ static BOOL api_lsa_OpenPolicy(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenPolicy, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -509,7 +509,7 @@ static BOOL api_lsa_QueryInfoPolicy(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union lsa_PolicyInformation); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -708,7 +708,7 @@ static BOOL api_lsa_CreateAccount(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateAccount, &r); ZERO_STRUCT(r.out); - r.out.acct_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.acct_handle)); + r.out.acct_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.acct_handle == NULL) { talloc_free(mem_ctx); return False; @@ -780,7 +780,7 @@ static BOOL api_lsa_EnumAccounts(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.sids = talloc_zero_size(mem_ctx, sizeof(*r.out.sids)); + r.out.sids = talloc_zero(mem_ctx, struct lsa_SidArray); if (r.out.sids == NULL) { talloc_free(mem_ctx); return False; @@ -851,7 +851,7 @@ static BOOL api_lsa_CreateTrustedDomain(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain, &r); ZERO_STRUCT(r.out); - r.out.trustdom_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.trustdom_handle)); + r.out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.trustdom_handle == NULL) { talloc_free(mem_ctx); return False; @@ -923,7 +923,7 @@ static BOOL api_lsa_EnumTrustDom(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_DomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -994,7 +994,7 @@ static BOOL api_lsa_LookupNames(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -1067,7 +1067,7 @@ static BOOL api_lsa_LookupSids(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupSids, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -1140,7 +1140,7 @@ static BOOL api_lsa_CreateSecret(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_CreateSecret, &r); ZERO_STRUCT(r.out); - r.out.sec_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.sec_handle)); + r.out.sec_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.sec_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1211,7 +1211,7 @@ static BOOL api_lsa_OpenAccount(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenAccount, &r); ZERO_STRUCT(r.out); - r.out.acct_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.acct_handle)); + r.out.acct_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.acct_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1282,7 +1282,7 @@ static BOOL api_lsa_EnumPrivsAccount(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount, &r); ZERO_STRUCT(r.out); - r.out.privs = talloc_zero_size(mem_ctx, sizeof(*r.out.privs)); + r.out.privs = talloc_zero(mem_ctx, struct lsa_PrivilegeSet); if (r.out.privs == NULL) { talloc_free(mem_ctx); return False; @@ -1737,7 +1737,7 @@ static BOOL api_lsa_OpenTrustedDomain(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain, &r); ZERO_STRUCT(r.out); - r.out.trustdom_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.trustdom_handle)); + r.out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.trustdom_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1808,7 +1808,7 @@ static BOOL api_lsa_QueryTrustedDomainInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1943,7 +1943,7 @@ static BOOL api_lsa_OpenSecret(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenSecret, &r); ZERO_STRUCT(r.out); - r.out.sec_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.sec_handle)); + r.out.sec_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.sec_handle == NULL) { talloc_free(mem_ctx); return False; @@ -2147,7 +2147,7 @@ static BOOL api_lsa_LookupPrivValue(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue, &r); ZERO_STRUCT(r.out); - r.out.luid = talloc_zero_size(mem_ctx, sizeof(*r.out.luid)); + r.out.luid = talloc_zero(mem_ctx, struct lsa_LUID); if (r.out.luid == NULL) { talloc_free(mem_ctx); return False; @@ -2218,7 +2218,7 @@ static BOOL api_lsa_LookupPrivName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupPrivName, &r); ZERO_STRUCT(r.out); - r.out.name = talloc_zero_size(mem_ctx, sizeof(*r.out.name)); + r.out.name = talloc_zero(mem_ctx, struct lsa_StringLarge); if (r.out.name == NULL) { talloc_free(mem_ctx); return False; @@ -2289,7 +2289,7 @@ static BOOL api_lsa_LookupPrivDisplayName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, &r); ZERO_STRUCT(r.out); - r.out.disp_name = talloc_zero_size(mem_ctx, sizeof(*r.out.disp_name)); + r.out.disp_name = talloc_zero(mem_ctx, struct lsa_StringLarge); if (r.out.disp_name == NULL) { talloc_free(mem_ctx); return False; @@ -2425,7 +2425,7 @@ static BOOL api_lsa_EnumAccountsWithUserRight(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight, &r); ZERO_STRUCT(r.out); - r.out.sids = talloc_zero_size(mem_ctx, sizeof(*r.out.sids)); + r.out.sids = talloc_zero(mem_ctx, struct lsa_SidArray); if (r.out.sids == NULL) { talloc_free(mem_ctx); return False; @@ -2496,7 +2496,7 @@ static BOOL api_lsa_EnumAccountRights(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights, &r); ZERO_STRUCT(r.out); - r.out.rights = talloc_zero_size(mem_ctx, sizeof(*r.out.rights)); + r.out.rights = talloc_zero(mem_ctx, struct lsa_RightSet); if (r.out.rights == NULL) { talloc_free(mem_ctx); return False; @@ -2695,7 +2695,7 @@ static BOOL api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -3022,7 +3022,7 @@ static BOOL api_lsa_OpenPolicy2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -3160,7 +3160,7 @@ static BOOL api_lsa_QueryInfoPolicy2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union lsa_PolicyInformation); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -3295,7 +3295,7 @@ static BOOL api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union lsa_TrustedDomainInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -3431,7 +3431,7 @@ static BOOL api_lsa_EnumTrustedDomainsEx(pipes_struct *p) ZERO_STRUCT(r.out); r.out.resume_handle = r.in.resume_handle; - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_DomainListEx); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -3632,7 +3632,7 @@ static BOOL api_lsa_QueryDomainInformationPolicy(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union lsa_DomainInformationPolicy); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -3767,7 +3767,7 @@ static BOOL api_lsa_OpenTrustedDomainByName(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName, &r); ZERO_STRUCT(r.out); - r.out.trustdom_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.trustdom_handle)); + r.out.trustdom_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.trustdom_handle == NULL) { talloc_free(mem_ctx); return False; @@ -3902,7 +3902,7 @@ static BOOL api_lsa_LookupSids2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupSids2, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -3975,7 +3975,7 @@ static BOOL api_lsa_LookupNames2(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -4624,7 +4624,7 @@ static BOOL api_lsa_LookupNames3(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -5145,7 +5145,7 @@ static BOOL api_lsa_LookupSids3(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupSids3, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; @@ -5218,7 +5218,7 @@ static BOOL api_lsa_LookupNames4(pipes_struct *p) NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &r); ZERO_STRUCT(r.out); - r.out.domains = talloc_zero_size(mem_ctx, sizeof(*r.out.domains)); + r.out.domains = talloc_zero(mem_ctx, struct lsa_RefDomainList); if (r.out.domains == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c index 2a33db9f19..a07e30a7ee 100644 --- a/source3/librpc/gen_ndr/srv_netlogon.c +++ b/source3/librpc/gen_ndr/srv_netlogon.c @@ -37,7 +37,7 @@ static BOOL api_netr_LogonUasLogon(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonUasLogon, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, struct netr_UasInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -108,7 +108,7 @@ static BOOL api_netr_LogonUasLogoff(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, struct netr_UasLogoffInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -180,13 +180,13 @@ static BOOL api_netr_LogonSamLogon(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.validation = talloc_zero_size(mem_ctx, sizeof(*r.out.validation)); + r.out.validation = talloc_zero(mem_ctx, union netr_Validation); if (r.out.validation == NULL) { talloc_free(mem_ctx); return False; } - r.out.authoritative = talloc_zero_size(mem_ctx, sizeof(*r.out.authoritative)); + r.out.authoritative = talloc_zero(mem_ctx, uint8_t); if (r.out.authoritative == NULL) { talloc_free(mem_ctx); return False; @@ -455,7 +455,7 @@ static BOOL api_netr_ServerPasswordSet(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, &r); ZERO_STRUCT(r.out); - r.out.return_authenticator = talloc_zero_size(mem_ctx, sizeof(*r.out.return_authenticator)); + r.out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator); if (r.out.return_authenticator == NULL) { talloc_free(mem_ctx); return False; @@ -528,7 +528,7 @@ static BOOL api_netr_DatabaseDeltas(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; r.out.sequence_num = r.in.sequence_num; - r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -601,7 +601,7 @@ static BOOL api_netr_DatabaseSync(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; r.out.sync_context = r.in.sync_context; - r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -673,25 +673,25 @@ static BOOL api_netr_AccountDeltas(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer)); + r.out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.count_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.count_returned)); + r.out.count_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.count_returned == NULL) { talloc_free(mem_ctx); return False; } - r.out.total_entries = talloc_zero_size(mem_ctx, sizeof(*r.out.total_entries)); + r.out.total_entries = talloc_zero(mem_ctx, uint32_t); if (r.out.total_entries == NULL) { talloc_free(mem_ctx); return False; } - r.out.recordid = talloc_zero_size(mem_ctx, sizeof(*r.out.recordid)); + r.out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0); if (r.out.recordid == NULL) { talloc_free(mem_ctx); return False; @@ -763,25 +763,25 @@ static BOOL api_netr_AccountSync(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer)); + r.out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.count_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.count_returned)); + r.out.count_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.count_returned == NULL) { talloc_free(mem_ctx); return False; } - r.out.total_entries = talloc_zero_size(mem_ctx, sizeof(*r.out.total_entries)); + r.out.total_entries = talloc_zero(mem_ctx, uint32_t); if (r.out.total_entries == NULL) { talloc_free(mem_ctx); return False; } - r.out.next_reference = talloc_zero_size(mem_ctx, sizeof(*r.out.next_reference)); + r.out.next_reference = talloc_zero(mem_ctx, uint32_t); if (r.out.next_reference == NULL) { talloc_free(mem_ctx); return False; @@ -853,7 +853,7 @@ static BOOL api_netr_GetDcName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_GetDcName, &r); ZERO_STRUCT(r.out); - r.out.dcname = talloc_zero_size(mem_ctx, sizeof(*r.out.dcname)); + r.out.dcname = talloc_zero(mem_ctx, const char *); if (r.out.dcname == NULL) { talloc_free(mem_ctx); return False; @@ -924,7 +924,7 @@ static BOOL api_netr_LogonControl(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonControl, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -995,7 +995,7 @@ static BOOL api_netr_GetAnyDCName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, &r); ZERO_STRUCT(r.out); - r.out.dcname = talloc_zero_size(mem_ctx, sizeof(*r.out.dcname)); + r.out.dcname = talloc_zero(mem_ctx, const char *); if (r.out.dcname == NULL) { talloc_free(mem_ctx); return False; @@ -1066,7 +1066,7 @@ static BOOL api_netr_LogonControl2(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonControl2, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query)); + r.out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; @@ -1206,7 +1206,7 @@ static BOOL api_netr_DatabaseSync2(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; r.out.sync_context = r.in.sync_context; - r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -1278,7 +1278,7 @@ static BOOL api_netr_DatabaseRedo(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.delta_enum_array = talloc_zero_size(mem_ctx, sizeof(*r.out.delta_enum_array)); + r.out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY); if (r.out.delta_enum_array == NULL) { talloc_free(mem_ctx); return False; @@ -1349,7 +1349,7 @@ static BOOL api_netr_LogonControl2Ex(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query)); + r.out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; @@ -1484,7 +1484,7 @@ static BOOL api_netr_DsRGetDCName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1877,7 +1877,7 @@ static BOOL api_netr_ServerAuthenticate3(pipes_struct *p) ZERO_STRUCT(r.out); r.out.credentials = r.in.credentials; r.out.negotiate_flags = r.in.negotiate_flags; - r.out.rid = talloc_zero_size(mem_ctx, sizeof(*r.out.rid)); + r.out.rid = talloc_zero(mem_ctx, uint32_t); if (r.out.rid == NULL) { talloc_free(mem_ctx); return False; @@ -1948,7 +1948,7 @@ static BOOL api_netr_DsRGetDCNameEx(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -2019,7 +2019,7 @@ static BOOL api_netr_DsRGetSiteName(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, &r); ZERO_STRUCT(r.out); - r.out.site = talloc_zero_size(mem_ctx, sizeof(*r.out.site)); + r.out.site = talloc_zero(mem_ctx, const char *); if (r.out.site == NULL) { talloc_free(mem_ctx); return False; @@ -2091,7 +2091,7 @@ static BOOL api_netr_LogonGetDomainInfo(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union netr_DomainInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -2162,7 +2162,7 @@ static BOOL api_netr_ServerPasswordSet2(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, &r); ZERO_STRUCT(r.out); - r.out.return_authenticator = talloc_zero_size(mem_ctx, sizeof(*r.out.return_authenticator)); + r.out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator); if (r.out.return_authenticator == NULL) { talloc_free(mem_ctx); return False; @@ -2425,7 +2425,7 @@ static BOOL api_netr_DsRGetDCNameEx2(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -2752,13 +2752,13 @@ static BOOL api_netr_LogonSamLogonEx(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &r); ZERO_STRUCT(r.out); - r.out.validation = talloc_zero_size(mem_ctx, sizeof(*r.out.validation)); + r.out.validation = talloc_zero(mem_ctx, union netr_Validation); if (r.out.validation == NULL) { talloc_free(mem_ctx); return False; } - r.out.authoritative = talloc_zero_size(mem_ctx, sizeof(*r.out.authoritative)); + r.out.authoritative = talloc_zero(mem_ctx, uint8_t); if (r.out.authoritative == NULL) { talloc_free(mem_ctx); return False; @@ -2830,13 +2830,13 @@ static BOOL api_netr_DsrEnumerateDomainTrusts(pipes_struct *p) NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, &r); ZERO_STRUCT(r.out); - r.out.count = talloc_zero_size(mem_ctx, sizeof(*r.out.count)); + r.out.count = talloc_zero(mem_ctx, uint32_t); if (r.out.count == NULL) { talloc_free(mem_ctx); return False; } - r.out.trusts = talloc_zero_size(mem_ctx, sizeof(*r.out.trusts) * count); + r.out.trusts = talloc_zero_array(mem_ctx, struct netr_DomainTrust *, count); if (r.out.trusts == NULL) { talloc_free(mem_ctx); return False; @@ -3164,13 +3164,13 @@ static BOOL api_netr_LogonSamLogonWithFlags(pipes_struct *p) ZERO_STRUCT(r.out); r.out.return_authenticator = r.in.return_authenticator; - r.out.validation = talloc_zero_size(mem_ctx, sizeof(*r.out.validation)); + r.out.validation = talloc_zero(mem_ctx, union netr_Validation); if (r.out.validation == NULL) { talloc_free(mem_ctx); return False; } - r.out.authoritative = talloc_zero_size(mem_ctx, sizeof(*r.out.authoritative)); + r.out.authoritative = talloc_zero(mem_ctx, uint8_t); if (r.out.authoritative == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c index 351b3f4032..a47d6d9eec 100644 --- a/source3/librpc/gen_ndr/srv_srvsvc.c +++ b/source3/librpc/gen_ndr/srv_srvsvc.c @@ -39,7 +39,7 @@ static BOOL api_srvsvc_NetCharDevEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -111,7 +111,7 @@ static BOOL api_srvsvc_NetCharDevGetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -248,7 +248,7 @@ static BOOL api_srvsvc_NetCharDevQEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -320,7 +320,7 @@ static BOOL api_srvsvc_NetCharDevQGetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union srvsvc_NetCharDevQInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -587,7 +587,7 @@ static BOOL api_srvsvc_NetConnEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -661,7 +661,7 @@ static BOOL api_srvsvc_NetFileEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -733,7 +733,7 @@ static BOOL api_srvsvc_NetFileGetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union srvsvc_NetFileInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -870,7 +870,7 @@ static BOOL api_srvsvc_NetSessEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -1074,7 +1074,7 @@ static BOOL api_srvsvc_NetShareEnumAll(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -1146,7 +1146,7 @@ static BOOL api_srvsvc_NetShareGetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union srvsvc_NetShareInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1411,7 +1411,7 @@ static BOOL api_srvsvc_NetShareCheck(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck, &r); ZERO_STRUCT(r.out); - r.out.type = talloc_zero_size(mem_ctx, sizeof(*r.out.type)); + r.out.type = talloc_zero(mem_ctx, enum srvsvc_ShareType); if (r.out.type == NULL) { talloc_free(mem_ctx); return False; @@ -1482,7 +1482,7 @@ static BOOL api_srvsvc_NetSrvGetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union srvsvc_NetSrvInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -1620,7 +1620,7 @@ static BOOL api_srvsvc_NetDiskEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.info = r.in.info; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -1692,7 +1692,7 @@ static BOOL api_srvsvc_NetServerStatisticsGet(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet, &r); ZERO_STRUCT(r.out); - r.out.stats = talloc_zero_size(mem_ctx, sizeof(*r.out.stats)); + r.out.stats = talloc_zero(mem_ctx, struct srvsvc_Statistics); if (r.out.stats == NULL) { talloc_free(mem_ctx); return False; @@ -1829,7 +1829,7 @@ static BOOL api_srvsvc_NetTransportEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.transports = r.in.transports; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -1965,7 +1965,7 @@ static BOOL api_srvsvc_NetRemoteTOD(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, struct srvsvc_NetRemoteTODInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -2100,7 +2100,7 @@ static BOOL api_srvsvc_NetPathType(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetPathType, &r); ZERO_STRUCT(r.out); - r.out.pathtype = talloc_zero_size(mem_ctx, sizeof(*r.out.pathtype)); + r.out.pathtype = talloc_zero(mem_ctx, uint32_t); if (r.out.pathtype == NULL) { talloc_free(mem_ctx); return False; @@ -2171,7 +2171,7 @@ static BOOL api_srvsvc_NetPathCanonicalize(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize, &r); ZERO_STRUCT(r.out); - r.out.can_path = talloc_zero_size(mem_ctx, sizeof(*r.out.can_path) * r.in.maxbuf); + r.out.can_path = talloc_zero_array(mem_ctx, uint8_t, r.in.maxbuf); if (r.out.can_path == NULL) { talloc_free(mem_ctx); return False; @@ -2501,7 +2501,7 @@ static BOOL api_srvsvc_NetShareEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -2573,7 +2573,7 @@ static BOOL api_srvsvc_NetShareDelStart(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart, &r); ZERO_STRUCT(r.out); - r.out.hnd = talloc_zero_size(mem_ctx, sizeof(*r.out.hnd)); + r.out.hnd = talloc_zero(mem_ctx, struct policy_handle); if (r.out.hnd == NULL) { talloc_free(mem_ctx); return False; @@ -2710,7 +2710,7 @@ static BOOL api_srvsvc_NetGetFileSecurity(pipes_struct *p) NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity, &r); ZERO_STRUCT(r.out); - r.out.sd_buf = talloc_zero_size(mem_ctx, sizeof(*r.out.sd_buf)); + r.out.sd_buf = talloc_zero(mem_ctx, struct sec_desc_buf); if (r.out.sd_buf == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c index efedf1ef3c..92b91d2fae 100644 --- a/source3/librpc/gen_ndr/srv_svcctl.c +++ b/source3/librpc/gen_ndr/srv_svcctl.c @@ -103,7 +103,7 @@ static BOOL api_svcctl_ControlService(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; @@ -238,7 +238,7 @@ static BOOL api_svcctl_LockServiceDatabase(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r); ZERO_STRUCT(r.out); - r.out.lock = talloc_zero_size(mem_ctx, sizeof(*r.out.lock)); + r.out.lock = talloc_zero(mem_ctx, struct policy_handle); if (r.out.lock == NULL) { talloc_free(mem_ctx); return False; @@ -437,7 +437,7 @@ static BOOL api_svcctl_QueryServiceStatus(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; @@ -766,7 +766,7 @@ static BOOL api_svcctl_ChangeServiceConfigW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r); ZERO_STRUCT(r.out); - r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id)); + r.out.tag_id = talloc_zero(mem_ctx, uint32_t); if (r.out.tag_id == NULL) { talloc_free(mem_ctx); return False; @@ -838,7 +838,7 @@ static BOOL api_svcctl_CreateServiceW(pipes_struct *p) ZERO_STRUCT(r.out); r.out.TagId = r.in.TagId; - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -909,19 +909,19 @@ static BOOL api_svcctl_EnumDependentServicesW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -992,19 +992,19 @@ static BOOL api_svcctl_EnumServicesStatusW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r); ZERO_STRUCT(r.out); - r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size); + r.out.service = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.service == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -1076,7 +1076,7 @@ static BOOL api_svcctl_OpenSCManagerW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1147,7 +1147,7 @@ static BOOL api_svcctl_OpenServiceW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1218,13 +1218,13 @@ static BOOL api_svcctl_QueryServiceConfigW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size); + r.out.query = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -1295,13 +1295,13 @@ static BOOL api_svcctl_QueryServiceLockStatusW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size)); + r.out.required_buf_size = talloc_zero(mem_ctx, uint32_t); if (r.out.required_buf_size == NULL) { talloc_free(mem_ctx); return False; @@ -1436,7 +1436,7 @@ static BOOL api_svcctl_GetServiceDisplayNameW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r); ZERO_STRUCT(r.out); - r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name)); + r.out.display_name = talloc_zero(mem_ctx, const char *); if (r.out.display_name == NULL) { talloc_free(mem_ctx); return False; @@ -1508,7 +1508,7 @@ static BOOL api_svcctl_GetServiceKeyNameW(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r); ZERO_STRUCT(r.out); - r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name)); + r.out.key_name = talloc_zero(mem_ctx, const char *); if (r.out.key_name == NULL) { talloc_free(mem_ctx); return False; @@ -1644,7 +1644,7 @@ static BOOL api_svcctl_ChangeServiceConfigA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r); ZERO_STRUCT(r.out); - r.out.tag_id = talloc_zero_size(mem_ctx, sizeof(*r.out.tag_id)); + r.out.tag_id = talloc_zero(mem_ctx, uint32_t); if (r.out.tag_id == NULL) { talloc_free(mem_ctx); return False; @@ -1715,7 +1715,7 @@ static BOOL api_svcctl_CreateServiceA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r); ZERO_STRUCT(r.out); - r.out.TagId = talloc_zero_size(mem_ctx, sizeof(*r.out.TagId)); + r.out.TagId = talloc_zero(mem_ctx, uint32_t); if (r.out.TagId == NULL) { talloc_free(mem_ctx); return False; @@ -1786,19 +1786,19 @@ static BOOL api_svcctl_EnumDependentServicesA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct ENUM_SERVICE_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -1869,19 +1869,19 @@ static BOOL api_svcctl_EnumServicesStatusA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r); ZERO_STRUCT(r.out); - r.out.service = talloc_zero_size(mem_ctx, sizeof(*r.out.service) * r.in.buf_size); + r.out.service = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.service == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.services_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.services_returned)); + r.out.services_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.services_returned == NULL) { talloc_free(mem_ctx); return False; @@ -1953,7 +1953,7 @@ static BOOL api_svcctl_OpenSCManagerA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -2088,13 +2088,13 @@ static BOOL api_svcctl_QueryServiceConfigA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r); ZERO_STRUCT(r.out); - r.out.query = talloc_zero_size(mem_ctx, sizeof(*r.out.query) * r.in.buf_size); + r.out.query = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.query == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2165,13 +2165,13 @@ static BOOL api_svcctl_QueryServiceLockStatusA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r); ZERO_STRUCT(r.out); - r.out.status = talloc_zero_size(mem_ctx, sizeof(*r.out.status)); + r.out.status = talloc_zero(mem_ctx, struct SERVICE_LOCK_STATUS); if (r.out.status == NULL) { talloc_free(mem_ctx); return False; } - r.out.required_buf_size = talloc_zero_size(mem_ctx, sizeof(*r.out.required_buf_size)); + r.out.required_buf_size = talloc_zero(mem_ctx, uint32_t); if (r.out.required_buf_size == NULL) { talloc_free(mem_ctx); return False; @@ -2306,7 +2306,7 @@ static BOOL api_svcctl_GetServiceDisplayNameA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r); ZERO_STRUCT(r.out); - r.out.display_name = talloc_zero_size(mem_ctx, sizeof(*r.out.display_name)); + r.out.display_name = talloc_zero(mem_ctx, const char *); if (r.out.display_name == NULL) { talloc_free(mem_ctx); return False; @@ -2378,7 +2378,7 @@ static BOOL api_svcctl_GetServiceKeyNameA(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r); ZERO_STRUCT(r.out); - r.out.key_name = talloc_zero_size(mem_ctx, sizeof(*r.out.key_name)); + r.out.key_name = talloc_zero(mem_ctx, const char *); if (r.out.key_name == NULL) { talloc_free(mem_ctx); return False; @@ -2706,13 +2706,13 @@ static BOOL api_svcctl_QueryServiceConfig2A(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r); ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2783,13 +2783,13 @@ static BOOL api_svcctl_QueryServiceConfig2W(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r); ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2860,13 +2860,13 @@ static BOOL api_svcctl_QueryServiceStatusEx(pipes_struct *p) NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r); ZERO_STRUCT(r.out); - r.out.buffer = talloc_zero_size(mem_ctx, sizeof(*r.out.buffer) * r.in.buf_size); + r.out.buffer = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.buffer == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; @@ -2937,26 +2937,26 @@ static BOOL api_EnumServicesStatusExA(pipes_struct *p) NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r); ZERO_STRUCT(r.out); - r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size); + r.out.services = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.services == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned)); + r.out.service_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.service_returned == NULL) { talloc_free(mem_ctx); return False; } r.out.resume_handle = r.in.resume_handle; - r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name)); + r.out.group_name = talloc_zero(mem_ctx, const char *); if (r.out.group_name == NULL) { talloc_free(mem_ctx); return False; @@ -3027,26 +3027,26 @@ static BOOL api_EnumServicesStatusExW(pipes_struct *p) NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r); ZERO_STRUCT(r.out); - r.out.services = talloc_zero_size(mem_ctx, sizeof(*r.out.services) * r.in.buf_size); + r.out.services = talloc_zero_array(mem_ctx, uint8_t, r.in.buf_size); if (r.out.services == NULL) { talloc_free(mem_ctx); return False; } - r.out.bytes_needed = talloc_zero_size(mem_ctx, sizeof(*r.out.bytes_needed)); + r.out.bytes_needed = talloc_zero(mem_ctx, uint32_t); if (r.out.bytes_needed == NULL) { talloc_free(mem_ctx); return False; } - r.out.service_returned = talloc_zero_size(mem_ctx, sizeof(*r.out.service_returned)); + r.out.service_returned = talloc_zero(mem_ctx, uint32_t); if (r.out.service_returned == NULL) { talloc_free(mem_ctx); return False; } r.out.resume_handle = r.in.resume_handle; - r.out.group_name = talloc_zero_size(mem_ctx, sizeof(*r.out.group_name)); + r.out.group_name = talloc_zero(mem_ctx, const char *); if (r.out.group_name == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_unixinfo.c b/source3/librpc/gen_ndr/srv_unixinfo.c index a52ccb13fa..8cb6e567ac 100644 --- a/source3/librpc/gen_ndr/srv_unixinfo.c +++ b/source3/librpc/gen_ndr/srv_unixinfo.c @@ -37,7 +37,7 @@ static BOOL api_unixinfo_SidToUid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, &r); ZERO_STRUCT(r.out); - r.out.uid = talloc_zero_size(mem_ctx, sizeof(*r.out.uid)); + r.out.uid = talloc_zero(mem_ctx, uint64_t); if (r.out.uid == NULL) { talloc_free(mem_ctx); return False; @@ -108,7 +108,7 @@ static BOOL api_unixinfo_UidToSid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, &r); ZERO_STRUCT(r.out); - r.out.sid = talloc_zero_size(mem_ctx, sizeof(*r.out.sid)); + r.out.sid = talloc_zero(mem_ctx, struct dom_sid); if (r.out.sid == NULL) { talloc_free(mem_ctx); return False; @@ -179,7 +179,7 @@ static BOOL api_unixinfo_SidToGid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, &r); ZERO_STRUCT(r.out); - r.out.gid = talloc_zero_size(mem_ctx, sizeof(*r.out.gid)); + r.out.gid = talloc_zero(mem_ctx, uint64_t); if (r.out.gid == NULL) { talloc_free(mem_ctx); return False; @@ -250,7 +250,7 @@ static BOOL api_unixinfo_GidToSid(pipes_struct *p) NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, &r); ZERO_STRUCT(r.out); - r.out.sid = talloc_zero_size(mem_ctx, sizeof(*r.out.sid)); + r.out.sid = talloc_zero(mem_ctx, struct dom_sid); if (r.out.sid == NULL) { talloc_free(mem_ctx); return False; @@ -322,7 +322,7 @@ static BOOL api_unixinfo_GetPWUid(pipes_struct *p) ZERO_STRUCT(r.out); r.out.count = r.in.count; - r.out.infos = talloc_zero_size(mem_ctx, sizeof(*r.out.infos) * *r.in.count); + r.out.infos = talloc_zero_array(mem_ctx, struct unixinfo_GetPWUidInfo, *r.in.count); if (r.out.infos == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_winreg.c b/source3/librpc/gen_ndr/srv_winreg.c index 30b8da0f1b..dbf1919e59 100644 --- a/source3/librpc/gen_ndr/srv_winreg.c +++ b/source3/librpc/gen_ndr/srv_winreg.c @@ -37,7 +37,7 @@ static BOOL api_winreg_OpenHKCR(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -108,7 +108,7 @@ static BOOL api_winreg_OpenHKCU(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -179,7 +179,7 @@ static BOOL api_winreg_OpenHKLM(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -250,7 +250,7 @@ static BOOL api_winreg_OpenHKPD(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -321,7 +321,7 @@ static BOOL api_winreg_OpenHKU(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKU, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -458,7 +458,7 @@ static BOOL api_winreg_CreateKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_CreateKey, &r); ZERO_STRUCT(r.out); - r.out.new_handle = talloc_zero_size(mem_ctx, sizeof(*r.out.new_handle)); + r.out.new_handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.new_handle == NULL) { talloc_free(mem_ctx); return False; @@ -1054,7 +1054,7 @@ static BOOL api_winreg_OpenKey(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenKey, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1126,49 +1126,49 @@ static BOOL api_winreg_QueryInfoKey(pipes_struct *p) ZERO_STRUCT(r.out); r.out.classname = r.in.classname; - r.out.num_subkeys = talloc_zero_size(mem_ctx, sizeof(*r.out.num_subkeys)); + r.out.num_subkeys = talloc_zero(mem_ctx, uint32_t); if (r.out.num_subkeys == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_subkeylen = talloc_zero_size(mem_ctx, sizeof(*r.out.max_subkeylen)); + r.out.max_subkeylen = talloc_zero(mem_ctx, uint32_t); if (r.out.max_subkeylen == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_classlen = talloc_zero_size(mem_ctx, sizeof(*r.out.max_classlen)); + r.out.max_classlen = talloc_zero(mem_ctx, uint32_t); if (r.out.max_classlen == NULL) { talloc_free(mem_ctx); return False; } - r.out.num_values = talloc_zero_size(mem_ctx, sizeof(*r.out.num_values)); + r.out.num_values = talloc_zero(mem_ctx, uint32_t); if (r.out.num_values == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_valnamelen = talloc_zero_size(mem_ctx, sizeof(*r.out.max_valnamelen)); + r.out.max_valnamelen = talloc_zero(mem_ctx, uint32_t); if (r.out.max_valnamelen == NULL) { talloc_free(mem_ctx); return False; } - r.out.max_valbufsize = talloc_zero_size(mem_ctx, sizeof(*r.out.max_valbufsize)); + r.out.max_valbufsize = talloc_zero(mem_ctx, uint32_t); if (r.out.max_valbufsize == NULL) { talloc_free(mem_ctx); return False; } - r.out.secdescsize = talloc_zero_size(mem_ctx, sizeof(*r.out.secdescsize)); + r.out.secdescsize = talloc_zero(mem_ctx, uint32_t); if (r.out.secdescsize == NULL) { talloc_free(mem_ctx); return False; } - r.out.last_changed_time = talloc_zero_size(mem_ctx, sizeof(*r.out.last_changed_time)); + r.out.last_changed_time = talloc_zero(mem_ctx, NTTIME); if (r.out.last_changed_time == NULL) { talloc_free(mem_ctx); return False; @@ -1820,7 +1820,7 @@ static BOOL api_winreg_GetVersion(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_GetVersion, &r); ZERO_STRUCT(r.out); - r.out.version = talloc_zero_size(mem_ctx, sizeof(*r.out.version)); + r.out.version = talloc_zero(mem_ctx, uint32_t); if (r.out.version == NULL) { talloc_free(mem_ctx); return False; @@ -1891,7 +1891,7 @@ static BOOL api_winreg_OpenHKCC(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -1962,7 +1962,7 @@ static BOOL api_winreg_OpenHKDD(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -2229,7 +2229,7 @@ static BOOL api_winreg_OpenHKPT(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; @@ -2300,7 +2300,7 @@ static BOOL api_winreg_OpenHKPN(pipes_struct *p) NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &r); ZERO_STRUCT(r.out); - r.out.handle = talloc_zero_size(mem_ctx, sizeof(*r.out.handle)); + r.out.handle = talloc_zero(mem_ctx, struct policy_handle); if (r.out.handle == NULL) { talloc_free(mem_ctx); return False; diff --git a/source3/librpc/gen_ndr/srv_wkssvc.c b/source3/librpc/gen_ndr/srv_wkssvc.c index 7ad7db0192..97b3857f4c 100644 --- a/source3/librpc/gen_ndr/srv_wkssvc.c +++ b/source3/librpc/gen_ndr/srv_wkssvc.c @@ -37,7 +37,7 @@ static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p) NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo, &r); ZERO_STRUCT(r.out); - r.out.info = talloc_zero_size(mem_ctx, sizeof(*r.out.info)); + r.out.info = talloc_zero(mem_ctx, union wkssvc_NetWkstaInfo); if (r.out.info == NULL) { talloc_free(mem_ctx); return False; @@ -175,13 +175,13 @@ static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p) ZERO_STRUCT(r.out); r.out.users = r.in.users; - r.out.entriesread = talloc_zero_size(mem_ctx, sizeof(*r.out.entriesread)); + r.out.entriesread = talloc_zero(mem_ctx, uint32_t); if (r.out.entriesread == NULL) { talloc_free(mem_ctx); return False; } - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; @@ -383,7 +383,7 @@ static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p) ZERO_STRUCT(r.out); r.out.level = r.in.level; r.out.ctr = r.in.ctr; - r.out.totalentries = talloc_zero_size(mem_ctx, sizeof(*r.out.totalentries)); + r.out.totalentries = talloc_zero(mem_ctx, uint32_t); if (r.out.totalentries == NULL) { talloc_free(mem_ctx); return False; |