1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-20 16:23:51 +03:00
Commit Graph

187 Commits

Author SHA1 Message Date
Tim Potter
6d792c683d Implemented client function for deleteprinterdataex. -
Tim Potter
6a1953f243 Implemented some more client side spoolss functions:
- getprinterdataex(), setprinterdataex(), enumprinterdataex()

Pass data type down to setprinterdata() fn instead of hardcoding REG_SZ.

Did some trickyness to get enumprinterdataex replies unmarshalled
properly.  The code seems to have been written to require the number
of entries returned before unpacking said entries.  Skip to the end of
the response and read the number of entries then jump back and process
the printer data.
-
Gerald Carter
901769acc3 fix 2 byte alignment/offset bug that prevented Win2k/XP clients
from receiving all the printer data in EnumPrinterDataEx().
-
Gerald Carter
d59b0eb123 * the printing code should now be back to the working state it was
before the swap from NT_PRINTER_PARAM to REGISTRY_VALUE.

* XxxPrinterDataEx() functions have not been expanded to support
  keys other than SPOOL_PRINTERDATA_KEY yet

* fixed apparent long standing bug regarding the dependentfiles
  list in the DRIVER_INFO struct
-
Gerald Carter
7ba7c04c0e Fairly large change to printing code.
* removed support for PHANTOM_DEVMODE printer data

* s/NT_PRINTER_PARAM/REGISTRY_VALUE/g - This was a good bit
  of work.  Everything seems stable, but is not complete.

* support for printer data keys other than PrinterDriverData
  in the store and fetch routines.  Still needs to be plugged
  into the XxxPrinterDataEx() calls.

Tested against NT4.0 & 2k.  Like I said, it's not done, but doesn't
crash so it shouldn't upset anyone (unless you're trying to build
a Samba printer server off of HEAD).  More work to come.  Should
settle by Monday.


jerry
-
Gerald Carter
fb822e97cb added comment about a new specversion seen from client.
Device mode size is still the same though.




jerry
-
Gerald Carter
11ddfd9cfa printing change notification merge from APPLIANCE_HEAD -
Tim Potter
fe43c2ac2d Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD. -
Gerald Carter
0793612cca passing -1 for the src length in rpcstr_pull results in only
converting the first character of the unicode string.,  See convert_string()
for why.  uniarray_2_dosarray() passes 0 for the src length now which works.
-
Gerald Carter
7207662504 all that is left to do is to actually perform the
file deletion now.  I have the file list.
One more commit should do it.
-
Gerald Carter
f57640720e 8-byte alignment needed for beginning driver_info_level_6.
Verified by looking at NT4 and 2k servers.  First time
for everything I guess.
-
Gerald Carter
b0f178f452 fixup ADDPRINTERDRIVEREX some more. unknown uint32 for now. -
Gerald Carter
55fbfd02ba added parsing routines for SPOOLSS_ADDPRINTERDRIVEREX and
SPOOLSS_DELETEPRINTERDRIVEREX.  Ran them through some testing.
I know I'm off by 2 x uint32's in the former RPC.
-
Gerald Carter
d675974d0c * basic implementation of SPOOLSS_DELETEPRINTERDATAEX and
SPOOLSS_DELETEPRINTERKEY
* stub funnctions for SPOOLSS_ADDPRINTERDRIVEREX and
  SPOOLSS_DELETEPRINTERDRIVEREX
-
Tim Potter
daf4c6a013 Merge of constant renames from APPLIANCE_HEAD. -
Jeremy Allison
3603cd4947 Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync !
Jeremy.
-
Gerald Carter
fc3770f281 a null grp_sid should have a 0 offset. Also removed a few more unnecessary
prs_align() for sec_desc.
-
Gerald Carter
f753676286 printing merge from SAMBA_2_2. Ther server code looks to be in sync now.
Mostly formatting and s/free/SAFE_FREE/g changes with the two exceptions
being

  * John driver init changes
  * Tim's printer enumeration bug fix
-
Simo Sorce
897e64d2e0 more debug classess activated -
Gerald Carter
83f109c940 merge from SAMBA_2_2.
Tim, please check the prs_align() removed from sec_io_desc()
and make sure it doesn't break anything else.  I know it is
right for the printing needs and I have tested some other
general things like viewing acls on directories, but I would
feel more comfortable if you would have a look as well.


jerry
-
Tim Potter
bbad6c6678 OK that last commit was incorrect - this call is parsed properly. I only
imagined it wasn't!
-
Tim Potter
2429c4cc79 There's probably a pointer to a buffer at the end of a enumprinterdrivers()
rpc call which we currently don't parse - just added a comment about it for
the moment as not parsing it is harmless.
-
Tim Potter
1fb8e2b3a0 No need to pass a fstring in make_spoolss_q_enumprinters() -
Tim Potter
217ae50acd Added deleteprinterdata client rpc. -
Tim Potter
a1934a7a8e Added writeprinter rpc command. -
Tim Potter
89633a1d87 Change make_spoolss_q_{get,set}printerdata() take a char* and length rather
than a unistr2.  Printer data isn't necessarily in unistr format.

Tallocate memory to hold returned data when unmarshalling getprinterdata
and enumprinterdata replies.
-
Gerald Carter
2676be4e41 compile fix merge from SAMBA_2_2 -
Tim Potter
8e09e94546 Support for client side startdocprinter.
Set useless_ptr = 1 for marshalling smb_io_doc_info() so it actually works.
-
Gerald Carter
0420098c47 misc merge from SAMBA_2_2 -
Gerald Carter
59e49a79b4 devmode parsing merge from SAMBA_2_2 -
Tim Potter
d091a9d300 Added client side spoolss rpc commands for startpageprinter,
endpageprinter, setjob and getjob.
-
Gerald Carter
5e381abbbf merge from SAMBA_2_2 -
Jeremy Allison
4369a58765 HP2500C driver writes devmode with private data that ends
on a 2 byte boundary. We then miss-parse the desired_access. Also added
other fixes to ensure we align after private data (discussed with Gerry).
Jeremy.
-
Gerald Carter
d87aa35d48 specversion merge from SAMBA_2_2 -
Tim Potter
e878cdc9f5 Fixed missing alignment in spoolss_io_q_enumjobs() function. -
Tim Potter
6367bfc478 The useless_ptr must be non-zero for addform and setform client functions
to work.

Note about setprinter level 1 not existing.
-
Gerald Carter
619397cc90 OpenPrinter() merge from 2.2 -
Gerald Carter
88d8897e21 resetprinter merge from SAMBA_2_2 -
Gerald Carter
5760315c1d syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
-
Tim Potter
ab1ebd3779 Remove studly gaps from prs_werror() calls so the same debug text is
logged.  This makes it much easier to use grep on log files when searching
for errors.
-
Tim Potter
e69222f081 Implemented client side functions for SPOOLSS addform, getform, setform and
enumforms.
-
Tim Potter
1803778451 Added make functions for SPOOL_Q_{ADD,SET,DELETE}FORM.
I'm pretty sure that the useless_ptr in spoolss_io_q_setform() needs to be
initialised to 1 otherwise the form isn't marshalled at all.  JF, can you
verify this?  If so then this probably applies to the io functions for
setform and deleteform.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jeremy Allison
27f65b3aad Fixed ADDPRINTEREX to take a devmode and a security descriptor...
Jeremy.
-
Jeremy Allison
9a969069f1 Added prs_mem_clear(). Clear memory on buffer reallocation. That way
we're not returning what the client gave us.
Jeremy.
-
Jeremy Allison
b63b762978 Added PRINTER_INFO_4/PRINTER_INFO_5, we're seeing level 5 requested on the wire... so.
Jeremy.
-
Tim Potter
690cc12bad Sed error. The status value in the PRINTER_INFO_2 structure isn't a WERROR
but a plain old uint32.
-
Gerald Carter
72d3b16022 merge from 2.2 -
Tim Potter
b596c0b171 Replaced some hardcoded hex numbers with constants.
Made a note about NOTIFY_OPTION_TYPE and NOTIFY_OPTION_TYPE_DATA - they are
actually one structure.  The latter is just the deferred referrant of the
former.
-
Gerald Carter
5b4b3323a3 merge from 2.2 -