summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_spoolss.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-17reverted this patch till I sort out the craziness with UNIHDRAndrew Tridgell1-33/+37
(This used to be commit e3d00fa47d38cd214f5e350e1d6b30d90ed8a52c)
2003-01-17This removes the 3rd argument from init_unistr2(). There were 240Andrew Tridgell1-37/+33
calls to init_unistr2() in the code and every one of them got the 3rd argument incorrect, so I thought it best just to remove the argument. The incorrect usage was caused by callers using strlen() to determine the length of the string. The 3rd argument to init_unistr2() was supposed to be the character length, not the byte length of the string, so for non-english this could come out wrong. I also removed the bogus 'always allocate at least 256 bytes' hack. There may be some code that relies on this, but if there is then the code is broken and needs fixing. (This used to be commit b9eff31b1433c81fbff733e194914a40f25e3bda)
2003-01-02BIG patch...Andrew Bartlett1-168/+169
This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett (This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2002-12-13Guy Harris points out that the level and ptr fields in aTim Potter1-0/+4
SPOOL_USER_CTR look like they should be transposed. We don't make use of the user level information (what is it used for??) so I haven't changed any code, just added a comment. (This used to be commit bbb0b2ee40acfeb8cd91a55feb1db0c1e2d9ced5)
2002-12-03Support printer info 7, used for publishingJim McDonough1-0/+63
(This used to be commit 3c9726454ea6beb8d5d308805caecb86395c7ad2)
2002-11-07Merge of scalable printing code fix... Needs testing.Jeremy Allison1-1/+1
Also tidied up some of Richard's code (I don't think he uses the compiler flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like I do :-) :-). Jeremy. (This used to be commit 10024ed06e9d91f24fdc78d59eef2f76bf395438)
2002-11-06Client side functions for enumprinterkey.Tim Potter1-0/+29
(This used to be commit f56ce473b6964302ba51fc9796ee919738731065)
2002-10-17When unmarshalling a relstr, don't unmarshall the string data if theTim Potter1-0/+3
offset is zero. Previously we were jumping to the start of the parse buffer (i.e offset zero) and reading string data until we hit a terminating NULL. Test case: in a PRINTER_INFO_0 structure, the servername field may be NULL when doing an enumprinters with flags = PRINTER_ENUM_LOCAL. (This used to be commit e62c6bf066c2242aae605ba707c9775b37bcaca3)
2002-09-27HEAD and APP-HEAD spoolss parsing was out of sync. This MUST NOT HAPPEN !Jeremy Allison1-20/+17
Jeremy. (This used to be commit e42b76337b9a01fee84bc95d6899a724b2fdab29)
2002-09-13wrong alignment size calculationSimo Sorce1-1/+3
spot by Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> (This used to be commit eda0e7589f2591edc29e6c1eef44aa21628977be)
2002-09-04Fix typo in comment.Tim Potter1-1/+1
(This used to be commit 47b8ec632e20aa86c34f6a0a82d886fcc76f3000)
2002-09-03Implemented client function for deleteprinterdataex.Tim Potter1-0/+15
(This used to be commit 6d792c683df3a4f97e1a04a57bf4890aab35aecd)
2002-09-02Implemented some more client side spoolss functions:Tim Potter1-7/+96
- 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. (This used to be commit 6a1953f2431cc848abf210bdecd7080738991296)
2002-08-27fix 2 byte alignment/offset bug that prevented Win2k/XP clientsGerald Carter1-9/+16
from receiving all the printer data in EnumPrinterDataEx(). (This used to be commit 901769acc3258b6f8f33d36b0d5e3468a30ba1b0)
2002-08-17* the printing code should now be back to the working state it wasGerald Carter1-1/+1
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 (This used to be commit d59b0eb1236cf5bb9371030a94eb60d4131c15fb)
2002-08-16Fairly large change to printing code.Gerald Carter1-36/+0
* 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 (This used to be commit 7ba7c04c0e961618c82c2112b9627af114c6cc42)
2002-08-14added comment about a new specversion seen from client.Gerald Carter1-0/+2
Device mode size is still the same though. jerry (This used to be commit fb822e97cb832361062fbb2aa239d949cc83efed)
2002-08-08printing change notification merge from APPLIANCE_HEADGerald Carter1-2/+17
(This used to be commit 11ddfd9cfa550dcd3186c8aaf0cc038ce7f1791f)
2002-08-08Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD.Tim Potter1-0/+28
(This used to be commit fe43c2ac2d2e1dd3b3a25c807d4dd379c5ac4960)
2002-07-29passing -1 for the src length in rpcstr_pull results in onlyGerald Carter1-1/+1
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. (This used to be commit 0793612cca3bba55d5e5e2970308f95839f208b4)
2002-07-11all that is left to do is to actually perform theGerald Carter1-0/+4
file deletion now. I have the file list. One more commit should do it. (This used to be commit 7207662504f585352b0ceeb99f8998ef58db7f15)
2002-07-098-byte alignment needed for beginning driver_info_level_6.Gerald Carter1-22/+15
Verified by looking at NT4 and 2k servers. First time for everything I guess. (This used to be commit f57640720e4758176116bc2e1b578cf0e867f95f)
2002-07-08fixup ADDPRINTERDRIVEREX some more. unknown uint32 for now.Gerald Carter1-21/+24
(This used to be commit b0f178f452a816c6a77b0f5a77fdd8930da98cac)
2002-07-08added parsing routines for SPOOLSS_ADDPRINTERDRIVEREX andGerald Carter1-0/+101
SPOOLSS_DELETEPRINTERDRIVEREX. Ran them through some testing. I know I'm off by 2 x uint32's in the former RPC. (This used to be commit 55fbfd02ba917b74fd4df7a1aa8cc8c5a91e3e07)
2002-07-08* basic implementation of SPOOLSS_DELETEPRINTERDATAEX andGerald Carter1-0/+80
SPOOLSS_DELETEPRINTERKEY * stub funnctions for SPOOLSS_ADDPRINTERDRIVEREX and SPOOLSS_DELETEPRINTERDRIVEREX (This used to be commit d675974d0c04a68d48d90492005056d96697c96c)
2002-07-02Merge of constant renames from APPLIANCE_HEAD.Tim Potter1-8/+8
(This used to be commit daf4c6a013ffa474d768055e73a1cb31ee941e80)
2002-06-28Proper merge of all the working printing stuff from APPLIANCE_HEAD.Jeremy Allison1-37/+110
Now let's keep this in sync ! Jeremy. (This used to be commit 3603cd4947df2c10df604447dc542932cb9e5d5a)
2002-06-27a null grp_sid should have a 0 offset. Also removed a few more unnecessaryGerald Carter1-7/+0
prs_align() for sec_desc. (This used to be commit fc3770f281f6344a0589bfe614cd3e559b7259dd)
2002-06-24printing merge from SAMBA_2_2. Ther server code looks to be in sync now.Gerald Carter1-0/+2
Mostly formatting and s/free/SAFE_FREE/g changes with the two exceptions being * John driver init changes * Tim's printer enumeration bug fix (This used to be commit f7536762863811f96364e8acd3716bdb7d665bbf)
2002-06-18more debug classess activatedSimo Sorce1-0/+3
(This used to be commit 897e64d2e0c1d04ab93441ccaffe369bf43be46e)
2002-05-24merge from SAMBA_2_2.Gerald Carter1-3/+38
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 (This used to be commit 83f109c940f30d9b35176540d8bdccbb22ffa3a1)
2002-05-20OK that last commit was incorrect - this call is parsed properly. I onlyTim Potter1-4/+0
imagined it wasn't! (This used to be commit bbad6c6678c89a33fb233091f5965ccd1aa589f6)
2002-05-20There's probably a pointer to a buffer at the end of a enumprinterdrivers()Tim Potter1-0/+4
rpc call which we currently don't parse - just added a comment about it for the moment as not parsing it is harmless. (This used to be commit 2429c4cc796576aa2d816a14b10fdd932b672a02)
2002-05-20No need to pass a fstring in make_spoolss_q_enumprinters()Tim Potter1-1/+1
(This used to be commit 1fb8e2b3a07fdc0bb302f02a451ed32a275f0c10)
2002-05-14Added deleteprinterdata client rpc.Tim Potter1-1/+13
(This used to be commit 217ae50acd8cf088e268e7d2a6a7c192aca9e2f1)
2002-05-14Added writeprinter rpc command.Tim Potter1-0/+14
(This used to be commit a1934a7a8eda592e283a01014280ddb373564927)
2002-05-14Change make_spoolss_q_{get,set}printerdata() take a char* and length ratherTim Potter1-11/+31
than a unistr2. Printer data isn't necessarily in unistr format. Tallocate memory to hold returned data when unmarshalling getprinterdata and enumprinterdata replies. (This used to be commit 89633a1d87d2a437dc1ceab9439f415ee1ec606d)
2002-05-13compile fix merge from SAMBA_2_2Gerald Carter1-11/+21
(This used to be commit 2676be4e419878fbf74b619949e1d84c6186691c)
2002-05-13Support for client side startdocprinter.Tim Potter1-3/+63
Set useless_ptr = 1 for marshalling smb_io_doc_info() so it actually works. (This used to be commit 8e09e9454685f4638375247fdb4a1e7c6de91704)
2002-05-10misc merge from SAMBA_2_2Gerald Carter1-0/+4
(This used to be commit 0420098c47555224d2425845137e4159698e02c2)
2002-05-10devmode parsing merge from SAMBA_2_2Gerald Carter1-29/+74
(This used to be commit 59e49a79b485f5ba26dedff8a7d7fe1c8c77f16a)
2002-05-08Added client side spoolss rpc commands for startpageprinter,Tim Potter1-0/+60
endpageprinter, setjob and getjob. (This used to be commit d091a9d300c70b708218067d355c8282a6f14ab6)
2002-04-22merge from SAMBA_2_2Gerald Carter1-42/+19
(This used to be commit 5e381abbbfaa15f3ebd89cba3cd9bb6de8e4ff4e)
2002-04-11HP2500C driver writes devmode with private data that endsJeremy Allison1-0/+9
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. (This used to be commit 4369a58765f382e118e5393c805336484671cbf9)
2002-04-11specversion merge from SAMBA_2_2Gerald Carter1-0/+27
(This used to be commit d87aa35d482824df7b5a2e87240ae43c113cc730)
2002-04-10Fixed missing alignment in spoolss_io_q_enumjobs() function.Tim Potter1-0/+3
(This used to be commit e878cdc9f59084f39c022f2faa140369f76e94ec)
2002-04-09The useless_ptr must be non-zero for addform and setform client functionsTim Potter1-2/+5
to work. Note about setprinter level 1 not existing. (This used to be commit 6367bfc4781a678923f1fba4681c9b7fc6bb9710)
2002-03-26OpenPrinter() merge from 2.2Gerald Carter1-19/+76
(This used to be commit 619397cc90549d4602ecddc25ee50eb247c913ee)
2002-03-20resetprinter merge from SAMBA_2_2Gerald Carter1-12/+12
(This used to be commit 88d8897e21749f177952b264031aa386bbbeaaeb)
2002-03-15syncing up printing code with SAMBA_2_2 (already done some mergesGerald Carter1-41/+232
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 (This used to be commit 5760315c1de4033fdc22684c940f18010010924f)