summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_spoolss.c
AgeCommit message (Collapse)AuthorFilesLines
2000-07-31Added John Reilly's enumports/addprinter/delprinter scripting code plus theJeremy Allison1-2/+2
fix for the Win9x printer drivers. Changed command names to add "command" string on the end for some consistancy with the other scripting commands. Added '%P' option to tdbpack/unpack to store long comment string. Made port name be "Samba Printer Port" if no enum port script given. Fixed prs_uint32_pre code to cope with null args. Jeremy. (This used to be commit 902ada63799cf27924c72e24e7593a8c9fb5eba9)
2000-07-31More work on rpcclient...Gerald Carter1-7/+27
* Fixed to work with Jeremy's recent changes re: dunamic memory allocation when unmarshalling unistr[2] * included EnumPorts level 1 * more work on AddPrinterEx --jerry (This used to be commit d321d0dddd052b49c94bef8f214be7343337d907)
2000-07-27remove warningsJean-François Micouleau1-2/+2
J.F. (This used to be commit 9178d2a1aac26f8d6533f7dc86ff9b19eb72db8b)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison1-19/+45
in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy. (This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-07-26Found out that we are crashing spoolss in enumprinterdata.Jean-François Micouleau1-1/+8
So fixed enumprinterdatas in rpcclient to debug the server code, and found that the parsing code was missing 2 prs_align(). We are not crashing NT anymore. :-) J.F. (This used to be commit 883f7402d495182aeff85152216cc8b3cfc18bef)
2000-07-25A rather big change set ! (listed in no particular order)Jean-François Micouleau1-4/+9
- changed the default forms flag to 2 - all short architecture name are uppercased - get_short_archi() is now case unsensitive - the drivers TDB is indexed by archi/version/name - implemented code to move drivers from the upload area to the download area. Someone else need to look at that code. - don't return anymore a default driver if it doesn't exist in the TDB. Instead return an error. - cleaned prs_unistr. - #ifdef out jeremy's new SD parsing in printer_info_2 - removed the unused MANGLE_CODE - #ifdef out the security checking in update_printer() as it doesn't work for me. Zap your ntdrivers.tdb, it won't work anymore. J.F. (This used to be commit ac0a145acc0953a6f362497abbf4dfe70aa522a6)
2000-07-22Fixed open handle code in printers - 3 functions were always being doneJeremy Allison1-2/+2
in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy. (This used to be commit a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
2000-07-21Added functions for enumerating ports on remote print server.Gerald Carter1-6/+48
Tim, You should also look at new_smb_io_printer_info_2() and see if the change from NULL to &i regarding the secdesc is ok. jerry (This used to be commit a2205c6646aa677090908a4e1532ed8590adc0e0)
2000-07-18rpc_parse/parse_prs.c: Removed extraneous ()'s.Jeremy Allison1-21/+19
rpc_parse/parse_spoolss.c: Fixed the security descriptor marshalling in a INFO_2 struct. for some reason SD's should be done inline after the info2, not as the last buffer marshall. rpc_server/srv_spoolss_nt.c: Removed extraneous ()'s. Jeremy. (This used to be commit f038a24e9f624fdb04cd52769d45783248ce8a38)
2000-07-14removed prs_data(), prs_free_data(), and prs_realloc_data()Gerald Carter1-12/+60
as these were unneeded and replaced by the real functions already in HEAD. Added a few more functions to parse_spoolss.c to help with the rpcclient merge from TNG. (This used to be commit 3bc9af4c1dbdb664970541f6091982ffccc87b31)
2000-07-12we are now sure the printer_info_2 timestamp is updated everytimeJean-François Micouleau1-5/+0
required. J.F. (This used to be commit 08b41bab177affac088c981d7c620728e8e6e9b0)
2000-07-12- The printers are indexed by the sharename in both get_a_printer() andJean-François Micouleau1-0/+9
add_a_printer() now. - correctly unpack the private part of a devmode and remove a memleak - correctly retrieve the pair(value,data) for getprinterdata - handle null devicemode in printer_info_2 I still have some bugs but I'm not crashing anymore NT4SP6 d/c build :-) J.F. (This used to be commit 493f7d11acf753ba24c88e6cbb73d86a8595a66a)
2000-07-10Fixes for various compile warnings on Solaris 8.Tim Potter1-1/+1
(This used to be commit 898a483cdab1ed7d8ff902c0dc0e0620440ae4cd)
2000-07-04the dummy field in driver_info_6 is before the driver version and notJean-François Micouleau1-2/+2
after. I don't know who broke all that code, but I'm ******** (censured) J.F. (This used to be commit 1fae158529ca0d1cb01ff422638418ce0dbd8dbf)
2000-07-04driver_info_6 had a prs_align() that should not have been there.Jean-François Micouleau1-2/+0
J.F. (This used to be commit a882dd225e464b300cedb52eb43f57f3a56c5b31)
2000-07-01Removed unneccessary ()'s afer &'s that made it look like weJeremy Allison1-125/+125
don't know how the C language works :-). Jeremy (This used to be commit d47329649d4f92a52acac7de256d9d9b0afc33c8)
2000-06-29Tidy up current spool code - added some JRATEST ifdefs to allowJeremy Allison1-11/+11
experimentation with what is making spoolss.exe crash - may be removed later. Jeremy. (This used to be commit f3fe384dc39ce49c639a7adf35179a50cb86abf0)
2000-06-28Removed extra uint32 field in auto-notify reply. This fixes some spoolss.exeJeremy Allison1-49/+75
crashes but there are still more to work on. Jeremy. (This used to be commit aa49dc037fa4e7b00d1a33619da5450a4eda1b9e)
2000-06-26Changing drivers using the properties page works - but only if getting/settingJeremy Allison1-3/+2
security descriptors is disabled (as it is in this code). If get/set sd's is enabled spooler.exe crashes on NT. I'll investigate and fix that issue next. Jeremy. (This used to be commit 8c9ed874363e6a710bc0fe521bb8c4f7ee219587)
2000-06-24lib/util_sid.c: Uninitialized memory read.Jeremy Allison1-2/+4
rpc_parse/parse_spoolss.c: Added note about prs_align when marshalling a SEC_DESC... rpc_server/srv_lsa.c: Tim - your changes broke the display of the 'everyone' group when doing file access with no winbindd running. This is a partial fix - more when I have analysed this more. rpc_server/srv_spoolss_nt.c: Fix for the 'change driver' problem ! Hurrah ! Jeremy. (This used to be commit 151b131ee01ef916c072bcdaa9943a2e984a0f45)
2000-06-20Fixes for Win2k "add printer driver" INFO_LEVEL_6 was wrong, also someJeremy Allison1-25/+22
memory fixes. Jeremy. (This used to be commit 2a9e645cbddef1cddc5c978310b7efed492758d2)
2000-06-10parsing code for reply[open|close]printer in preparation of the eventJean-François Micouleau1-0/+87
stuff. J.F. (This used to be commit 1871d4a3f64401f9a6f749ce26d1715e3bcdeac3)
2000-06-06Memory leak fixes.Jeremy Allison1-0/+14
Jeremy. (This used to be commit 34b63896ab1543936d6b9b382ef6727a161b6bf2)
2000-06-05Some tidyup fixes (memory leaks etc.). Still no progress with theJeremy Allison1-7/+12
"no driver" issue. I'm banging my head against comparitive packet dumps right now... Jeremy. (This used to be commit 03cd4aa1443acd958593f37c61ff9c90a43c660b)
2000-06-05simple increment bug in uniarray_2_dosarrayAndrew Tridgell1-0/+1
(This used to be commit 6506e6f47085beeaa6588a361a220ab21fc32aa6)
2000-06-04no space was being reserved for the security descriptor in the parseAndrew Tridgell1-3/+8
buffer (This used to be commit 417a88fc6a8406ad4244e8cc1317cb7163b07cc0)
2000-06-02More memory leak and PANIC action fixes.Jeremy Allison1-28/+69
This is *horrible* code :-(. Jeremy. (This used to be commit ac383bb765ea606fc1105aa91470fcdf453d9335)
2000-06-02Fixed null pointer indirect in addprinterex. Still working on problemJeremy Allison1-2/+2
with extra directory layer in NT drivers. Jeremy. (This used to be commit 48a80318269c832e702678237e86ba55c10444f1)
2000-06-01More insure found memory leak and corruption fixes.Jeremy Allison1-3/+51
Jeremy. (This used to be commit 3cdcfa6325b9cd2d7f7c90c4b2d1c6ec73fc2f6d)
2000-06-01Back to building. Now to test with insure.Jeremy Allison1-51/+27
Added some frees needed to stop memory leaks. Jeremy. (This used to be commit eba31e4e802120c9eb8c4688f521b4de9cb91f5c)
2000-06-01Getting back to a compilable state (not there yet but close).Jeremy Allison1-22/+8
Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy. (This used to be commit c2099cfb033c2cdb6035f4f7f50ce21b98e1584d)
2000-05-28moved notif_y_table struct to spoolss_nt.c only used there.Luke Leighton1-7/+14
#ifdef'd driver-code out with define RELIES_ON_SMBD_SPECIFIC_CODE because spoolssd doesn't link with smbd/*.c (find_service("print$") is not possible). (This used to be commit 726c359d1d9f1fc8227ca920c888d2f040170e0b)
2000-05-27hack to get setprinter working, level2, null sec desc.Luke Leighton1-2/+20
(This used to be commit 3f976e713924a2fa47194ae3edfa3f1592e4cf1c)
2000-05-27security descs in spoolss. needs parse_sec.c nttrans.c broken.Luke Leighton1-10/+149
(This used to be commit f9f2a04fdb7b2af1cfe5bf26ec6f0d955ea948b9)
2000-05-24a fairly big change in spoolss.Andrew Tridgell1-49/+20
got rid of the forms, drivers and printers files in the nt drivers directory and instead use a single tdb note that this is _not_ all finished. (This used to be commit 4fef181af3964311f45e77bdd43d6fb4e546127f)
2000-05-15don't call prs_dump() hereAndrew Tridgell1-1/+0
(This used to be commit 87d9bac3a1b9eba15259abdfea85cf94b3630561)
2000-05-12changed uniarray_2_ascarray to uniarray_2_dosarrayAndrew Tridgell1-2/+2
(This used to be commit 4de7202da478baf232c93cc9b8d845889f1d2bab)
2000-05-12Added unicode_to_dos_char() function to address converting single UNICODEJeremy Allison1-4/+4
characters to one or more DOS codepage characters. Jeremy. (This used to be commit eefbfb5e16fcf40f335edc840a49f837f6b64111)
2000-05-12added spool_io_printer_driver_info_level_6()Andrew Tridgell1-0/+193
thsi function and the associated header structure were autogenerated using a little awk based code geerator I wroe ths evening. I'll commit that next ... (This used to be commit 974813f0d4afb6c14ed27c48ab24b19932557f9f)
2000-05-02added support for deleting printers into the spoolss systemAndrew Tridgell1-0/+43
(This used to be commit e72a5718537b84409fc20ff21951b1d1ab24d97f)
2000-04-25moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell1-1/+0
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
2000-04-06Modified interfaces and added checks around *all* *alloc callsJeremy Allison1-8/+18
so that errors are returned on memory allocation failure. Jeremy. (This used to be commit 9a118cd4a2b03146b341eeffb62144a2d29b574c)
2000-04-05off by one error ...Jean-François Micouleau1-2/+5
J.F. (This used to be commit cef44398f90f670358f2ad430056371d394c7f91)
2000-04-05changed all the status code to ERROR_xxx instead of NT_STATUS_xx which areJean-François Micouleau1-1/+1
wrong in the spoolss case. fxed a bug in the job notify code (that's the polite answer), the truth is different: there is a bug in the NT spooler service, including SP6a and NT2K. changed the default lpcommand in the LPRNG case. J.F. (This used to be commit 396f73c11b29a47650b3243fef0825252a3cef9b)
2000-03-29rewrote getprinterdriver level 3, now correctly handle the dependentJean-François Micouleau1-106/+171
files. A number of memleak fixed some error return values fixed. J.F. (This used to be commit c212fbe009fe556d5329b5d7106159cf21402d82)
2000-03-25rpc_parse/parse_spoolss.c: Added checks on mallocs/overflow checks on all prs_xxJeremy Allison1-133/+291
calls. smbd/connection.c: Fix from David Lee <T.D.Lee@durham.ac.uk>. Jeremy. (This used to be commit 53721fbc7d2a986cf999b8f031a2d9003c0dccae)
2000-03-13oops ! forgot smb.h in last commitJean-François Micouleau1-1/+39
added info level 1 parsing code for addprinter(ex) J.F. (This used to be commit 4847f7b17b2d23e4efd4e7cae6bfcfc2319b9409)
2000-03-13parse correctly getprinterdriver2Jean-François Micouleau1-5/+9
found a stupid bug in enumprinters fixed some memleaks found a coredump in enumprinterdata getprinterdriverdir responds correctly now. J.F. (This used to be commit 07f2e194ba61e72320636fb7e5d0f041e255868b)
2000-03-10getprinter level 0: was to short, found most of the fields, undocumented,Jean-François Micouleau1-39/+121
undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F. (This used to be commit 87da4404aba29a2ebd999886e4c06958c96d3e05)
2000-03-06changed prs_unistr to parse empty and non-empty strings the same way.Jean-François Micouleau1-245/+118
fixed typo in SPOOLSS_SYNT some cleanup of unused functions wrote make_spoolss_enumprinter and make_spoolss_openprinterex for rpcclient as I'm trying to keep in sync the parsing code between HEAD and TNG. Will commit changes to TNG after lunch. J.F. (This used to be commit 025cdb345f6de287a41d4449b2662dbc5e762bf2)