summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-07-20 13:38:48 +0000
committerGerald Carter <jerry@samba.org>2000-07-20 13:38:48 +0000
commit58221bfcf7d3e613a5cc84dea09f1dc0f9238d59 (patch)
tree7c7c05f3b24276d08d9c8e0955fdef978c827aef /source3
parent9f040cc17ea6c5f536571fa37a10125ec3f12765 (diff)
downloadsamba-58221bfcf7d3e613a5cc84dea09f1dc0f9238d59.tar.gz
samba-58221bfcf7d3e613a5cc84dea09f1dc0f9238d59.tar.bz2
samba-58221bfcf7d3e613a5cc84dea09f1dc0f9238d59.zip
Fixed unitilized secdesc pointer which was causing spoolgetprinter
rpcclient command to fail on shared printers. jerry (This used to be commit c8abc31187dbfe6076277896b029fa11443e43bd)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/msrpc_spoolss.c5
-rw-r--r--source3/rpcclient/cmd_spoolss.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/rpc_client/msrpc_spoolss.c b/source3/rpc_client/msrpc_spoolss.c
index d8379048cf..10582c01be 100644
--- a/source3/rpc_client/msrpc_spoolss.c
+++ b/source3/rpc_client/msrpc_spoolss.c
@@ -92,6 +92,8 @@ static void decode_printer_info_2(NEW_BUFFER *buffer, uint32 returned,
buffer->prs.data_offset=0;
for (i=0; i<returned; i++) {
+ /* a little initialization as we go */
+ inf[i].secdesc = NULL;
new_smb_io_printer_info_2("", buffer, &(inf[i]), 0);
}
@@ -356,6 +358,9 @@ BOOL msrpc_spoolss_enum_printerdata( const char* printer_name,
if(!spoolss_open_printer_ex( printer_name, 0, 0, station, user_name, &hnd))
return False;
+ /* FIXME!!!! --jerry
+ something is severly buggy about the use of
+ data, datalen, value, & valuelen */
status = spoolss_enum_printerdata(&hnd, 0, &valuelen, value,
&rvaluelen, &type, &datalen,
data, &rdatalen);
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 2dd70bfd67..9b4da4f1af 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -337,8 +337,8 @@ uint32 cmd_spoolss_getprinterdata(struct client_info *info, int argc, char *argv
printer_name, station, value_name));
status = msrpc_spoolss_getprinterdata( printer_name, station,
- "Administrateur",
- /*usr_creds->ntc.user_name,*/
+ /* "Administrateur", */
+ usr_creds->ntc.user_name,
value_name, &type,
&ctr, NULL);