summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-16 16:41:48 +0100
committerGünther Deschner <gd@samba.org>2009-02-17 16:15:52 +0100
commit9877f3d574392681ef121f8c9c038596f6d333dc (patch)
treee2d337029fd8e10514ee2eb4026e383db73a37f5
parent742270eb2dd521fa5010786536f000823fb67188 (diff)
downloadsamba-9877f3d574392681ef121f8c9c038596f6d333dc.tar.gz
samba-9877f3d574392681ef121f8c9c038596f6d333dc.tar.bz2
samba-9877f3d574392681ef121f8c9c038596f6d333dc.zip
s4-spoolss: fix spoolss server after out,ref count pointer changes.
Guenther
-rw-r--r--source4/ntptr/simple_ldb/ntptr_simple_ldb.c9
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c20
2 files changed, 14 insertions, 15 deletions
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index 073fd9992c..c570b03a35 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -260,7 +260,7 @@ static WERROR sptr_EnumPrintServerForms(struct ntptr_GenericHandle *server, TALL
}
r->out.info = info;
- r->out.count = count;
+ *r->out.count = count;
return WERR_OK;
}
@@ -588,7 +588,7 @@ static WERROR sptr_EnumPrinters(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx
}
r->out.info = info;
- r->out.count = count;
+ *r->out.count = count;
return WERR_OK;
}
@@ -646,7 +646,7 @@ static WERROR sptr_EnumPorts(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,
}
r->out.info = info;
- r->out.count = count;
+ *r->out.count = count;
return WERR_OK;
}
@@ -693,8 +693,7 @@ static WERROR sptr_EnumMonitors(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx
}
r->out.info = info;
- r->out.count = count;
- return WERR_OK;
+ *r->out.count = count;
return WERR_OK;
}
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index dc611e331a..33c657cc1b 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -243,9 +243,9 @@ static WERROR dcesrv_spoolss_EnumPrinters(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumPrinters(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, r->out.info, r->in.level, r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinters, ic, r->out.info, r->in.level, *r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
- r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
+ *r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -379,9 +379,9 @@ static WERROR dcesrv_spoolss_EnumPrinterDrivers(struct dcesrv_call_state *dce_ca
status = ntptr_EnumPrinterDrivers(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, r->out.info, r->in.level, r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPrinterDrivers, ic, r->out.info, r->in.level, *r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
- r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
+ *r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -786,9 +786,9 @@ static WERROR dcesrv_spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLO
return WERR_FOOBAR;
}
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, r->out.info, r->in.level, r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumForms, ic, r->out.info, r->in.level, *r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
- r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
+ *r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -809,9 +809,9 @@ static WERROR dcesrv_spoolss_EnumPorts(struct dcesrv_call_state *dce_call, TALLO
status = ntptr_EnumPorts(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, r->out.info, r->in.level, r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumPorts, ic, r->out.info, r->in.level, *r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
- r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
+ *r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -832,9 +832,9 @@ static WERROR dcesrv_spoolss_EnumMonitors(struct dcesrv_call_state *dce_call, TA
status = ntptr_EnumMonitors(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, r->out.info, r->in.level, r->out.count);
+ *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(spoolss_EnumMonitors, ic, r->out.info, r->in.level, *r->out.count);
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
- r->out.count = SPOOLSS_BUFFER_OK(r->out.count, 0);
+ *r->out.count = SPOOLSS_BUFFER_OK(*r->out.count, 0);
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}