summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-05-10 00:42:06 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-05-18 11:45:31 +0200
commitb8268cf7b0264ea28f684cbdfbf462e68a018d83 (patch)
tree638192f21ae437a5c59ab2ec4500c9ea8c9f7b54 /source3/rpc_server
parentf9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d (diff)
downloadsamba-b8268cf7b0264ea28f684cbdfbf462e68a018d83.tar.gz
samba-b8268cf7b0264ea28f684cbdfbf462e68a018d83.tar.bz2
samba-b8268cf7b0264ea28f684cbdfbf462e68a018d83.zip
s3: Remove use of iconv_convenience.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c4
-rw-r--r--source3/rpc_server/srv_netlog_nt.c17
-rw-r--r--source3/rpc_server/srv_ntsvcs_nt.c2
-rw-r--r--source3/rpc_server/srv_pipe.c9
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c6
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c70
-rw-r--r--source3/rpc_server/srv_spoolss_util.c20
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c2
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c21
9 files changed, 69 insertions, 82 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index 58b181c038..84c04fe953 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -526,7 +526,7 @@ NTSTATUS _eventlog_ReadEventLogW(pipes_struct *p,
break;
}
- ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL, e,
+ ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, e,
(ndr_push_flags_fn_t)ndr_push_EVENTLOGRECORD);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
@@ -648,7 +648,7 @@ NTSTATUS _eventlog_GetLogInformation(pipes_struct *p,
/* FIXME: this should be retrieved from the handle */
f.full = false;
- ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL, &f,
+ ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &f,
(ndr_push_flags_fn_t)ndr_push_EVENTLOG_FULL_INFORMATION);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return ndr_map_error2ntstatus(ndr_err);
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index ee87fa8623..a039b08869 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -419,7 +419,7 @@ WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
}
}
- if (!push_reg_multi_sz(trusted_domains, NULL, &blob, trusted_domains)) {
+ if (!push_reg_multi_sz(trusted_domains, &blob, trusted_domains)) {
TALLOC_FREE(trusted_domains);
return WERR_NOMEM;
}
@@ -726,8 +726,7 @@ NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
/* Store off the state so we can continue after client disconnect. */
become_root();
- status = schannel_save_creds_state(p->mem_ctx,
- NULL, lp_private_dir(), creds);
+ status = schannel_save_creds_state(p->mem_ctx, lp_private_dir(), creds);
unbecome_root();
if (!NT_STATUS_IS_OK(status)) {
@@ -820,12 +819,9 @@ static NTSTATUS netr_creds_server_step_check(pipes_struct *p,
}
}
- status = schannel_check_creds_state(mem_ctx, NULL,
- lp_private_dir(),
- computer_name,
- received_authenticator,
- return_authenticator,
- creds_out);
+ status = schannel_check_creds_state(mem_ctx, lp_private_dir(),
+ computer_name, received_authenticator,
+ return_authenticator, creds_out);
return status;
}
@@ -1396,8 +1392,7 @@ NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p,
struct netlogon_creds_CredentialState *creds = NULL;
become_root();
- status = schannel_get_creds_state(p->mem_ctx,
- NULL, lp_private_dir(),
+ status = schannel_get_creds_state(p->mem_ctx, lp_private_dir(),
r->in.computer_name, &creds);
unbecome_root();
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/rpc_server/srv_ntsvcs_nt.c b/source3/rpc_server/srv_ntsvcs_nt.c
index cf02e44a21..c7fd3ccc89 100644
--- a/source3/rpc_server/srv_ntsvcs_nt.c
+++ b/source3/rpc_server/srv_ntsvcs_nt.c
@@ -103,7 +103,7 @@ WERROR _PNP_GetDeviceList(pipes_struct *p,
multi_sz[0] = devicepath;
- if (!push_reg_multi_sz(multi_sz, NULL, &blob, multi_sz)) {
+ if (!push_reg_multi_sz(multi_sz, &blob, multi_sz)) {
return WERR_NOMEM;
}
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 7b02ac8b1f..272b5360ad 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1453,7 +1453,7 @@ static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
blob = data_blob_const(prs_data_p(rpc_in_p) + prs_offset(rpc_in_p),
prs_data_size(rpc_in_p));
- ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), NULL, &neg,
+ ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &neg,
(ndr_pull_flags_fn_t)ndr_pull_NL_AUTH_MESSAGE);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0,("pipe_schannel_auth_bind: Could not unmarshal SCHANNEL auth neg\n"));
@@ -1476,9 +1476,8 @@ static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
*/
become_root();
- status = schannel_get_creds_state(p, NULL, lp_private_dir(),
- neg.oem_netbios_computer.a,
- &creds);
+ status = schannel_get_creds_state(p, lp_private_dir(),
+ neg.oem_netbios_computer.a, &creds);
unbecome_root();
if (!NT_STATUS_IS_OK(status)) {
@@ -1539,7 +1538,7 @@ static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
* this has any meaning
* here - gd */
- ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), NULL, &reply,
+ ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), &reply,
(ndr_push_flags_fn_t)ndr_push_NL_AUTH_MESSAGE);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0,("Failed to marshall NL_AUTH_MESSAGE.\n"));
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 24cff4fe46..847953d186 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -1049,8 +1049,7 @@ static struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
req.level = 1;
req.info.info1 = *info3;
- ndr_err = ndr_push_struct_blob(
- &req_blob, talloc_tos(), NULL, &req,
+ ndr_err = ndr_push_struct_blob(&req_blob, talloc_tos(), &req,
(ndr_push_flags_fn_t)ndr_push_named_pipe_auth_req);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -1080,8 +1079,7 @@ static struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
DEBUG(10,("name_pipe_auth_rep(client)[%u]\n", (uint32_t)rep_blob.length));
dump_data(10, rep_blob.data, rep_blob.length);
- ndr_err = ndr_pull_struct_blob(
- &rep_blob, talloc_tos(), NULL, &rep,
+ ndr_err = ndr_pull_struct_blob(&rep_blob, talloc_tos(), &rep,
(ndr_pull_flags_fn_t)ndr_pull_named_pipe_auth_rep);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 823b051e92..53d5e6f8a3 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -33,14 +33,14 @@
#include "registry.h"
/* macros stolen from s4 spoolss server */
-#define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
- ((info)?ndr_size_##fn(info, level, ic, 0):0)
+#define SPOOLSS_BUFFER_UNION(fn,info,level) \
+ ((info)?ndr_size_##fn(info, level, 0):0)
-#define SPOOLSS_BUFFER_UNION_ARRAY(mem_ctx,fn,ic,info,level,count) \
- ((info)?ndr_size_##fn##_info(mem_ctx, ic, level, count, info):0)
+#define SPOOLSS_BUFFER_UNION_ARRAY(mem_ctx,fn,info,level,count) \
+ ((info)?ndr_size_##fn##_info(mem_ctx, level, count, info):0)
-#define SPOOLSS_BUFFER_ARRAY(mem_ctx,fn,ic,info,count) \
- ((info)?ndr_size_##fn##_info(mem_ctx, ic, count, info):0)
+#define SPOOLSS_BUFFER_ARRAY(mem_ctx,fn,info,count) \
+ ((info)?ndr_size_##fn##_info(mem_ctx, count, info):0)
#define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= *r->out.needed)?val_true:val_false)
@@ -2253,7 +2253,7 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX *mem_ctx,
os.build = 2195; /* build */
os.extra_string = ""; /* leave extra string empty */
- ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, &os,
+ ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os,
(ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_GENERAL_FAILURE;
@@ -4335,7 +4335,7 @@ WERROR _spoolss_EnumPrinters(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumPrinters, NULL,
+ spoolss_EnumPrinters,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -4425,7 +4425,7 @@ WERROR _spoolss_GetPrinter(pipes_struct *p,
return result;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrinterInfo, NULL,
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrinterInfo,
r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
@@ -5147,7 +5147,7 @@ WERROR _spoolss_GetPrinterDriver2(pipes_struct *p,
return result;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverInfo, NULL,
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverInfo,
r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
@@ -5805,7 +5805,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
*/
if (!strequal(printer->info_2->comment, old_printer->info_2->comment)) {
- push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->comment);
+ push_reg_sz(talloc_tos(), &buffer, printer->info_2->comment);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "description",
REG_SZ, buffer.data, buffer.length);
@@ -5813,7 +5813,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
}
if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename)) {
- push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->sharename);
+ push_reg_sz(talloc_tos(), &buffer, printer->info_2->sharename);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "shareName",
REG_SZ, buffer.data, buffer.length);
@@ -5829,7 +5829,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
pname = printer->info_2->printername;
- push_reg_sz(talloc_tos(), NULL, &buffer, pname);
+ push_reg_sz(talloc_tos(), &buffer, pname);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "printerName",
REG_SZ, buffer.data, buffer.length);
@@ -5837,7 +5837,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
}
if (!strequal(printer->info_2->portname, old_printer->info_2->portname)) {
- push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->portname);
+ push_reg_sz(talloc_tos(), &buffer, printer->info_2->portname);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "portName",
REG_SZ, buffer.data, buffer.length);
@@ -5845,7 +5845,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
}
if (!strequal(printer->info_2->location, old_printer->info_2->location)) {
- push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->location);
+ push_reg_sz(talloc_tos(), &buffer, printer->info_2->location);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "location",
REG_SZ, buffer.data, buffer.length);
@@ -5855,7 +5855,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
/* here we need to update some more DsSpooler keys */
/* uNCName, serverName, shortServerName */
- push_reg_sz(talloc_tos(), NULL, &buffer, global_myname());
+ push_reg_sz(talloc_tos(), &buffer, global_myname());
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "serverName",
REG_SZ, buffer.data, buffer.length);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "shortServerName",
@@ -5863,7 +5863,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
slprintf( asc_buffer, sizeof(asc_buffer)-1, "\\\\%s\\%s",
global_myname(), printer->info_2->sharename );
- push_reg_sz(talloc_tos(), NULL, &buffer, asc_buffer);
+ push_reg_sz(talloc_tos(), &buffer, asc_buffer);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "uNCName",
REG_SZ, buffer.data, buffer.length);
@@ -6414,7 +6414,7 @@ WERROR _spoolss_EnumJobs(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumJobs, NULL,
+ spoolss_EnumJobs,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -6725,7 +6725,7 @@ WERROR _spoolss_EnumPrinterDrivers(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumPrinterDrivers, NULL,
+ spoolss_EnumPrinterDrivers,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -6868,7 +6868,7 @@ WERROR _spoolss_EnumForms(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumForms, NULL,
+ spoolss_EnumForms,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -6958,7 +6958,7 @@ WERROR _spoolss_GetForm(pipes_struct *p,
return result;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, NULL,
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo,
r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
@@ -7206,7 +7206,7 @@ WERROR _spoolss_EnumPorts(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumPorts, NULL,
+ spoolss_EnumPorts,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -7722,7 +7722,7 @@ WERROR _spoolss_GetPrinterDriverDirectory(pipes_struct *p,
return werror;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, NULL,
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo,
r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
@@ -8289,7 +8289,7 @@ WERROR _spoolss_EnumPrintProcessors(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumPrintProcessors, NULL,
+ spoolss_EnumPrintProcessors,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -8376,7 +8376,7 @@ WERROR _spoolss_EnumPrintProcDataTypes(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumPrintProcDataTypes, NULL,
+ spoolss_EnumPrintProcDataTypes,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -8549,7 +8549,7 @@ WERROR _spoolss_EnumMonitors(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
- spoolss_EnumMonitors, NULL,
+ spoolss_EnumMonitors,
*r->out.info, r->in.level,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -8710,8 +8710,8 @@ WERROR _spoolss_GetJob(pipes_struct *p,
return result;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_JobInfo, NULL,
- r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_JobInfo, r->out.info,
+ r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -9072,7 +9072,7 @@ WERROR _spoolss_EnumPrinterKey(pipes_struct *p,
}
}
- if (!push_reg_multi_sz(p->mem_ctx, NULL, &blob, array)) {
+ if (!push_reg_multi_sz(p->mem_ctx, &blob, array)) {
result = WERR_NOMEM;
goto done;
}
@@ -9307,7 +9307,7 @@ WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
}
*r->out.needed = SPOOLSS_BUFFER_ARRAY(p->mem_ctx,
- spoolss_EnumPrinterDataEx, NULL,
+ spoolss_EnumPrinterDataEx,
*r->out.info,
*r->out.count);
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
@@ -9378,8 +9378,8 @@ WERROR _spoolss_GetPrintProcessorDirectory(pipes_struct *p,
return result;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo, NULL,
- r->out.info, r->in.level);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo,
+ r->out.info, r->in.level);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
@@ -9396,7 +9396,7 @@ static bool push_monitorui_buf(TALLOC_CTX *mem_ctx, DATA_BLOB *buf,
ui.dll_name = dllname;
- ndr_err = ndr_push_struct_blob(buf, mem_ctx, NULL, &ui,
+ ndr_err = ndr_push_struct_blob(buf, mem_ctx, &ui,
(ndr_push_flags_fn_t)ndr_push_spoolss_MonitorUi);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && (DEBUGLEVEL >= 10)) {
NDR_PRINT_DEBUG(spoolss_MonitorUi, &ui);
@@ -9435,7 +9435,7 @@ static bool pull_port_data_1(TALLOC_CTX *mem_ctx,
const DATA_BLOB *buf)
{
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_struct_blob(buf, mem_ctx, NULL, port1,
+ ndr_err = ndr_pull_struct_blob(buf, mem_ctx, port1,
(ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData1);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && (DEBUGLEVEL >= 10)) {
NDR_PRINT_DEBUG(spoolss_PortData1, port1);
@@ -9451,7 +9451,7 @@ static bool pull_port_data_2(TALLOC_CTX *mem_ctx,
const DATA_BLOB *buf)
{
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_struct_blob(buf, mem_ctx, NULL, port2,
+ ndr_err = ndr_pull_struct_blob(buf, mem_ctx, port2,
(ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData2);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && (DEBUGLEVEL >= 10)) {
NDR_PRINT_DEBUG(spoolss_PortData2, port2);
diff --git a/source3/rpc_server/srv_spoolss_util.c b/source3/rpc_server/srv_spoolss_util.c
index d9df1a0a5f..2a5e95b280 100644
--- a/source3/rpc_server/srv_spoolss_util.c
+++ b/source3/rpc_server/srv_spoolss_util.c
@@ -778,7 +778,7 @@ static WERROR winreg_printer_write_sz(TALLOC_CTX *mem_ctx,
if (data == NULL) {
blob = data_blob_string_const("");
} else {
- if (!push_reg_sz(mem_ctx, NULL, &blob, data)) {
+ if (!push_reg_sz(mem_ctx, &blob, data)) {
DEBUG(0, ("winreg_printer_write_sz: Could not marshall string %s for %s\n",
data, wvalue.name));
return WERR_NOMEM;
@@ -1026,7 +1026,7 @@ static WERROR winreg_printer_write_multi_sz(TALLOC_CTX *mem_ctx,
NTSTATUS status;
wvalue.name = value;
- if (!push_reg_multi_sz(mem_ctx, NULL, &blob, data)) {
+ if (!push_reg_multi_sz(mem_ctx, &blob, data)) {
return WERR_NOMEM;
}
status = rpccli_winreg_SetValue(pipe_handle,
@@ -1111,7 +1111,7 @@ static WERROR winreg_enumval_to_sz(TALLOC_CTX *mem_ctx,
return WERR_INVALID_DATATYPE;
}
- if (!pull_reg_sz(mem_ctx, NULL, v->data, _str)) {
+ if (!pull_reg_sz(mem_ctx, v->data, _str)) {
return WERR_NOMEM;
}
@@ -1132,7 +1132,7 @@ static WERROR winreg_enumval_to_multi_sz(TALLOC_CTX *mem_ctx,
return WERR_INVALID_DATATYPE;
}
- if (!pull_reg_multi_sz(mem_ctx, NULL, v->data, array)) {
+ if (!pull_reg_multi_sz(mem_ctx, v->data, array)) {
return WERR_NOMEM;
}
@@ -1162,7 +1162,7 @@ static WERROR winreg_printer_write_date(TALLOC_CTX *mem_ctx,
}
wvalue.name = value;
- if (!push_reg_sz(mem_ctx, NULL, &blob, str)) {
+ if (!push_reg_sz(mem_ctx, &blob, str)) {
return WERR_NOMEM;
}
status = rpccli_winreg_SetValue(pipe_handle,
@@ -1229,7 +1229,7 @@ static WERROR winreg_printer_write_ver(TALLOC_CTX *mem_ctx,
}
wvalue.name = value;
- if (!push_reg_sz(mem_ctx, NULL, &blob, str)) {
+ if (!push_reg_sz(mem_ctx, &blob, str)) {
return WERR_NOMEM;
}
status = rpccli_winreg_SetValue(pipe_handle,
@@ -1696,7 +1696,7 @@ WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
goto done;
}
}
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL, devmode,
+ ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, devmode,
(ndr_push_flags_fn_t) ndr_push_spoolss_DeviceMode);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0, ("winreg_update_printer: Failed to marshall device mode\n"));
@@ -2142,7 +2142,6 @@ WERROR winreg_get_printer(TALLOC_CTX *mem_ctx,
}
ndr_err = ndr_pull_struct_blob(&blob,
info2->devmode,
- NULL,
info2->devmode,
(ndr_pull_flags_fn_t) ndr_pull_spoolss_DeviceMode);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -2262,7 +2261,6 @@ WERROR winreg_get_printer_secdesc(TALLOC_CTX *mem_ctx,
}
ndr_err = ndr_pull_struct_blob(&blob,
secdesc,
- NULL,
secdesc,
(ndr_pull_flags_fn_t) ndr_pull_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -2318,7 +2316,7 @@ create_default:
}
}
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL, secdesc,
+ ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, secdesc,
(ndr_push_flags_fn_t) ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0, ("winreg_set_secdesc: Failed to marshall security descriptor\n"));
@@ -2449,7 +2447,7 @@ WERROR winreg_set_printer_secdesc(TALLOC_CTX *mem_ctx,
goto done;
}
- ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL, new_secdesc,
+ ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, new_secdesc,
(ndr_push_flags_fn_t) ndr_push_security_descriptor);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
DEBUG(0, ("winreg_set_secdesc: Failed to marshall security descriptor\n"));
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index ef320d0ec6..73875c1c08 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2156,7 +2156,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
goto error_exit;
}
- sd_size = ndr_size_security_descriptor(psd, NULL, 0);
+ sd_size = ndr_size_security_descriptor(psd, 0);
sd_buf = TALLOC_ZERO_P(p->mem_ctx, struct sec_desc_buf);
if (!sd_buf) {
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 023d2130bf..ab446f9c0b 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -442,7 +442,7 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
}
for ( i=0; i<num_services; i++ ) {
- buffer_size += ndr_size_ENUM_SERVICE_STATUSW(&services[i], NULL, 0);
+ buffer_size += ndr_size_ENUM_SERVICE_STATUSW(&services[i], 0);
}
buffer_size += buffer_size % 4;
@@ -457,7 +457,7 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
enum ndr_err_code ndr_err;
struct ndr_push *ndr;
- ndr = ndr_push_init_ctx(p->mem_ctx, NULL);
+ ndr = ndr_push_init_ctx(p->mem_ctx);
if (ndr == NULL) {
return WERR_INVALID_PARAM;
}
@@ -605,8 +605,7 @@ WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p,
svc_stat_proc.process_id = sys_getpid();
svc_stat_proc.service_flags = 0x0;
- ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL,
- &svc_stat_proc,
+ ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &svc_stat_proc,
(ndr_push_flags_fn_t)ndr_push_SERVICE_STATUS_PROCESS);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_INVALID_PARAM;
@@ -715,7 +714,7 @@ WERROR _svcctl_QueryServiceConfigW(pipes_struct *p,
if ( !W_ERROR_IS_OK(wresult) )
return wresult;
- buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, NULL, 0);
+ buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, 0);
*r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
if (buffer_size > r->in.offered ) {
@@ -761,14 +760,13 @@ WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p,
desc_buf.description = description;
- ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL,
- &desc_buf,
+ ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &desc_buf,
(ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_INVALID_PARAM;
}
- buffer_size = ndr_size_SERVICE_DESCRIPTION(&desc_buf, NULL, 0);
+ buffer_size = ndr_size_SERVICE_DESCRIPTION(&desc_buf, 0);
r->out.buffer = blob.data;
break;
@@ -784,14 +782,13 @@ WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p,
ZERO_STRUCT( actions );
- ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL,
- &actions,
+ ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &actions,
(ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONS);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return WERR_INVALID_PARAM;
}
- buffer_size = ndr_size_SERVICE_FAILURE_ACTIONS(&actions, NULL, 0);
+ buffer_size = ndr_size_SERVICE_FAILURE_ACTIONS(&actions, 0);
r->out.buffer = blob.data;
break;
@@ -883,7 +880,7 @@ WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p,
if ( !(sec_desc = svcctl_get_secdesc( p->mem_ctx, info->name, get_root_nt_token() )) )
return WERR_NOMEM;
- *r->out.needed = ndr_size_security_descriptor( sec_desc, NULL, 0 );
+ *r->out.needed = ndr_size_security_descriptor(sec_desc, 0);
if ( *r->out.needed > r->in.offered) {
return WERR_INSUFFICIENT_BUFFER;