summaryrefslogtreecommitdiffstats
path: root/source3/rpc_parse
Commit message (Collapse)AuthorAgeFilesLines
* fixed samr_create_user(). we now correctly parse the query and the reply.Jean-François Micouleau2000-09-281-5/+6
| | | | | | | | | | | And we create the disabled account. That means we can create user and trust accounts remotely ! ifdef out a return in passdb/smbpass.c. I think I didn't break any security. Jeremy could you check if I didn't make any mistakes ??? J.F. (This used to be commit 416be1b64f366c8b859f25856fce2467ec0446d9)
* samr unknown 0x32 is in fact samr create user.Jean-François Micouleau2000-09-271-3/+3
| | | | | | | so renamed and tidy up of the server function. J.F. (This used to be commit 0f707ac1fb5685b800d6599b9074ec1d4e65b1c1)
* printer notify code.Jean-François Micouleau2000-09-251-1/+118
| | | | | | | | It only sends notifies to one client. The broadcasting notify code will code soon. J.F. (This used to be commit 4c63c9185887c64e57d901e82a4a16a83522c898)
* Some code moved back from TNG - updates to LSA stuff. Not yet used butJeremy Allison2000-09-201-8/+80
| | | | | | will be needed soon. Jeremy. (This used to be commit f0aa8f9314c837fe39b6d1b0c41d5cfae2e4098f)
* param/loadparm.c: Fix based on Damian's code to stop printer scripts getting ↵Jeremy Allison2000-09-191-34/+19
| | | | | | | | | | overwritten. rpc_parse/parse_spoolss.c: Tidyup to call function for relstring arrays. Win2000 now does "Add Printer" successfully !!!!! Jeremy. (This used to be commit d666b958bc335c7fceebeb7a6333d78bc421c30f)
* in a printer_info_6, driver version is 64 bits long and there is a 32 bitJean-François Micouleau2000-09-161-2/+10
| | | | | | | padding before. J.F. (This used to be commit cd41d7a35477accec1a82b86f9fa3477e5a49d6e)
* Fixes from JF as I didn't understand the string array sizing code correctly.Jeremy Allison2000-09-151-17/+17
| | | | | Jeremy. (This used to be commit 63a7d0fc359ab7cb2ece74dff0ee25f6bb9fbe36)
* Move towards getting W2k p&p to upload NT4.x drivers. Still doesn't work -Jeremy Allison2000-09-151-16/+129
| | | | | | | | not sure why (JF - a glance at this would be appreciated). Removed code that JF objected to with enumprinterdata. Added translations to/from level 6 - but Win2k still not happy... hmmm... Jeremy. (This used to be commit e5d98ba9e97eb16337ff6c49f799e130844ae72e)
* Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).Jeremy Allison2000-09-091-6/+46
| | | | | Jeremy. (This used to be commit fb48efaf830626f6ef05b88f5f8a74b932ceb257)
* Fix for the SID history problem when using a Win2k domain controllerJeremy Allison2000-09-061-12/+56
| | | | | | with security=domain. Also fixed to dynamically allocate the SIDs and GIDs. Jeremy. (This used to be commit 2b1f66eb82f05fe0b85ac5b4916e32847b8de675)
* Implemented GETFORM tested and working using Gerald's Win32 test progs....Jeremy Allison2000-09-051-1/+56
| | | | | Jeremy. (This used to be commit 55ed0a9b0c91159c0fc4282c2171d9ced74a302a)
* Implemented DELETEFORM tested using Gerald's Win32 test code :-).Jeremy Allison2000-08-311-0/+32
| | | | | Jeremy. (This used to be commit 596c21a2af0309ce43a5e52a343a671036d05ebf)
* Fixed overrun write error when using debuglevel > 50.Jeremy Allison2000-08-301-1/+1
| | | | | Jeremy. (This used to be commit 3d9b163655f684f2b98aa72f976379cee869db05)
* Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison2000-08-301-0/+35
| | | | | | | possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy. (This used to be commit 6d081a9017f87f59b7189ba507e211db01c40af5)
* yipee!Andrew Tridgell2000-08-281-0/+9
| | | | | | | | | | | | | The spoolss AddJob function has an [in,out] buffer not an [in] buffer (despite the comment in the code to the contrary). Also, we must fail this function - not just blindly reply "no problem" as AddJob should always fail on non-local printers. This fixes a bug where the "print test page" failed about half the time. I suspect it will also fix a bunch of other intermittent spoolss bugs where the client (incorrectly) tries to use the AddJob printing interface. (This used to be commit 14e534a8907c34b53e00a63756efd71903ff9432)
* added comment for my own memory purposesGerald Carter2000-08-171-0/+1
| | | | | jerry (This used to be commit b64ddbd1aaba8811641e502e96f3bbef01171f52)
* hack for unmarshalling unistr's on machines with BIG_ENDIAN archGerald Carter2000-08-161-2/+19
| | | | | | | | | | | I think we have a lot more of these bugs lurking (i'm fairly confident of it). jerry (This used to be commit 3b14487c7e5218ff3e0ff3118ca1afd706e05247)
* - fixed memcpy bug in copy_unistr2()Gerald Carter2000-08-161-7/+21
| | | | | | | | | | - init_unistr2_from_unistr() does not NULL terminate the buffer --jerry (This used to be commit 65ee5f9b6ed3c4ad33fefd3c879f2649496fd3f3)
* Tidied up extra ()'s.Jeremy Allison2000-08-151-12/+12
| | | | | Jeremy (This used to be commit f94f37dcab2bc2b68e2b6b4ca440ad53a60e8117)
* fixed a few bugs in new_smb_io_relarraystr().Gerald Carter2000-08-141-2/+5
| | | | | | | | Marshalling code path now uses spoolss_smb_io_unistr() also caught a NULL pointer case. i'll update TNG later. (This used to be commit bd4c83eb40a14baf447ac88886d4eafe7b9a309f)
* fix for new_smb_io_relarraystr() and new_smb_io_relstr()Gerald Carter2000-08-141-2/+2
| | | | | | | | | | | | | | | to use spool_smb_io_unistr() as this does not call prs_align() befrore parsing the UNISTR. Parsing a void* buffer from an RPC should not be aligned on 4 byte boundaries. Don't think this change affects any marshalling code, only unmarshalling... jerry (This used to be commit bc154e8522a75540a8504195c1e6f45739167e6b)
* removed the prs_align in spoolss_smb_io_unistr() (JF, please check)Gerald Carter2000-08-121-3/+36
| | | | | | | | | | | | | as it was throwing things off when parsing buffers passed in SPOOLSS RPCs fixed the unmarshalling of UNISTR arrays to be double NULL terminated jerry (This used to be commit 236f19659cea87cc35128990954d30c43114b889)
* fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc'sGerald Carter2000-08-121-29/+37
| | | | | | | | | of 0 bytes. jerry (This used to be commit 3fcc59ba928250759bbf3ef46d7c118950a5ba6f)
* Fixed the problem with UNISTR marshalling in a buffer5 struct.Jeremy Allison2000-08-112-53/+25
| | | | | | | | | | | The smb_io_unistr() code called a prs_align, this was not being counted in the size or taken account of in the offset calculation. Fixed size_ calculation to always return a size a multiple of 4 and also set the offset correctly. This fixes the problem I saw and will hopefully fix the problem HP reported. JF please check this change. Jeremy. (This used to be commit ceba9f3dcdb4bddae17ec0024692c9074086302d)
* working on the unmarshalling of dependentfiles to a DRIVER_INFO_3Gerald Carter2000-08-101-2/+9
| | | | | | | | | | | struct. Not wuite there. jerry (This used to be commit 1a145977f09654fc51ebcd40ef7a2aa69aa96cfb)
* deal with allocation size of 0 in prs_unistr when UNMARSHALLINGGerald Carter2000-08-101-24/+30
| | | | | jerry (This used to be commit 26a73a70e282a5e46cc2b6fe7bc09b406724c9dd)
* More work on AddPrinterDriver() and AddPrinterEx() client RPC'sGerald Carter2000-08-092-9/+21
| | | | | | | | | Also fixed init_unistr() to deal with a NULL source character string. -jerry (This used to be commit 8ecd5dd52a6bd867f5d117352048ee43ce7254d9)
* cleanup in init_unistr2_from_unistr()Gerald Carter2000-08-081-27/+19
| | | | | --jerry (This used to be commit 1e00ac19cd001024fa8007eff5137aac877796fa)
* All changes related to rpcclient...Gerald Carter2000-08-081-3/+174
| | | | | | | | | | | | | | - cleaned up some code - Fixed a few memory leaks of my own making - Add AddPrinterDriver(); I'm missing some of the semantics here as the call is done correctly, but I'm not getting all the information right in the DRIVER_INFO_3 struct I think. Will work on it tomorrow some more... --jerry (This used to be commit 3bf9a29f34ee4ade5180c5a0b0b9ff4aca7f0f08)
* it is not my day it seems. :-(Gerald Carter2000-08-051-1/+1
| | | | | | | | Fixed missing ) j- (This used to be commit 7b69cbbde36e51f8f7b74691428a04e8871d8b4a)
* removed the for() loop to copy the buffer in init_unistr2_from_unistr()Gerald Carter2000-08-051-3/+2
| | | | | | | | | | | | Replaced with a memcpy() Forgot to commit this a few moments ago j- (This used to be commit 34d4fb54c3121d31cb8b29193f71d5e7b5471cdc)
* Fixed bug in init_unistr2_from_unistr() found by Elrond.Gerald Carter2000-08-051-1/+1
| | | | | | | | | | | Thanks :-) j- (This used to be commit 4ecd15cd5851e94808756e3da0ce6a066f0a0cd7)
* clunky support for calling AddPrinterEx(). The code currently reportsGerald Carter2000-08-041-8/+111
| | | | | | | | | | | | that the call failed, but the printer shows up on the remote NT client. (note this is the client side call). I've botched the return value somewhere and will fix that today. jerry (This used to be commit e15d9befd24cf5f3410c4be819b2a1fcf68048fb)
* After talking with Jeremy and JF (and staring at packet traces betweenGerald Carter2000-08-041-2/+52
| | | | | | | | | | | NT <-> NT), I've come to realize that UNISTR2 strings should be NULL terminated. jerry (This used to be commit c8f9e54beafcb0c0668f1510e7693dbf22485aa8)
* Much though I hate to admit it - JF was completely correct. I cannotJeremy Allison2000-08-021-2/+2
| | | | | | | | now reproduce the bug I had with adding a printer driver, and PrintMig.exe crashes if I use my SD code but works with his. I stand completely corrected :-). - So I'm reverting to his code as it works :-). Jeremy. (This used to be commit d6db29be98f717a9038b5ac1ff492c70ce2e92a7)
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-014-10/+9
| | | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy. (This used to be commit c55bcec817f47d6162466b193d533c877194124a)
* Added John Reilly's enumports/addprinter/delprinter scripting code plus theJeremy Allison2000-07-312-3/+3
| | | | | | | | | | | 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)
* More work on rpcclient...Gerald Carter2000-07-311-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)
* Fixed read overrun in init_string2()Tim Potter2000-07-281-2/+4
| | | | (This used to be commit 4ab75143c4466ad0ea8443512dd5ade449d72462)
* remove warningsJean-François Micouleau2000-07-271-2/+2
| | | | | J.F. (This used to be commit 9178d2a1aac26f8d6533f7dc86ff9b19eb72db8b)
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-274-111/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Found out that we are crashing spoolss in enumprinterdata.Jean-François Micouleau2000-07-261-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)
* A rather big change set ! (listed in no particular order)Jean-François Micouleau2000-07-252-61/+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)
* Fixed open handle code in printers - 3 functions were always being doneJeremy Allison2000-07-221-2/+2
| | | | | | | in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy. (This used to be commit a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
* Added functions for enumerating ports on remote print server.Gerald Carter2000-07-211-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)
* rpc_parse/parse_prs.c: Removed extraneous ()'s.Jeremy Allison2000-07-182-23/+21
| | | | | | | | | 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)
* fixed a bug (my own) in create_ntc_from_cli_state()Gerald Carter2000-07-181-2/+2
| | | | | --jerry (This used to be commit f7bc6df3befb8d0981dbd96f353039a5913321d7)
* removed prs_data(), prs_free_data(), and prs_realloc_data()Gerald Carter2000-07-142-105/+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)
* we are now sure the printer_info_2 timestamp is updated everytimeJean-François Micouleau2000-07-121-5/+0
| | | | | | | required. J.F. (This used to be commit 08b41bab177affac088c981d7c620728e8e6e9b0)
* - The printers are indexed by the sharename in both get_a_printer() andJean-François Micouleau2000-07-121-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)