summaryrefslogtreecommitdiffstats
path: root/source/rpc_server
Commit message (Collapse)AuthorAgeFilesLines
* broadcast printer notify message to all clients. We now have printerJean-François Micouleau2000-09-261-8/+15
| | | | | | | | notification as on NT. Andrew, your message passing code is cool :-) J.F.
* Changes from John Reilly to add a parameter "show add printer wizard" thatJeremy Allison2000-09-261-5/+25
| | | | | | | | | allows Samba to turn off the display of APW (hmmm. This should probably be a share specific parameter, I'll fix that in another commit). Also a few small changes to JF's code to fix compiler warnings about missing return statements and also change '//' comments (C++) to /* .. */ comments (C). Jeremy.
* printer notify code.Jean-François Micouleau2000-09-251-6/+144
| | | | | | | It only sends notifies to one client. The broadcasting notify code will code soon. J.F.
* Adding fix from Jim Vopni <jimv@metrics.com> to ensure jobs areJeremy Allison2000-09-211-33/+33
| | | | | closed before a printer is closed/deleted. Jeremy.
* in a printer_info_6, driver version is 64 bits long and there is a 32 bitJean-François Micouleau2000-09-161-0/+7
| | | | | | padding before. J.F.
* Move towards getting W2k p&p to upload NT4.x drivers. Still doesn't work -Jeremy Allison2000-09-151-13/+166
| | | | | | | 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.
* Added SIGHUP when printer deleted as well as added.Jeremy Allison2000-09-131-0/+3
| | | | Jeremy.
* Fix for enumjobs infor level 2 which caused smbd to coredump.Jeremy Allison2000-09-121-0/+1
| | | | | Uninitialized element in struct. Jeremy.
* Fixed error return when printer is PAUSED - should be returning "Pause".Jeremy Allison2000-09-121-1/+1
| | | | Jeremy.
* Fixed memory leaks found in enumprinterdrivers code.Jeremy Allison2000-09-111-5/+8
| | | | Jeremy.
* Fix for malloc of zero bytes found by insure.Jeremy Allison2000-09-111-0/+5
| | | | Jeremy.
* Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).Jeremy Allison2000-09-092-0/+74
| | | | Jeremy.
* Fixed typo where docname was being checked for datatype - was causingJeremy Allison2000-09-081-1/+1
| | | | | STARTDOCPRINTER call to fail. I *love* Gerald's test code :-). Jeremy.
* Win32 API is explicit that EnumPrinterData returns ERROR_MORE_DATA notJeremy Allison2000-09-081-1/+1
| | | | | | ERROR_INSUFICIENT_BUFFER when working out what space is needed. This fix gives us the same return that WinNT does. Jeremy.
* Fixed the printerdata code to return NO_MORE_ITEMS if a size is requestedJeremy Allison2000-09-071-1/+20
| | | | | | and the parameter index doesn't exist. I think this code can be simplified considerably, but JF needs to check to be sure. Jeremy.
* Added code to return NO_MORE_ENTRIES when trying to determineJeremy Allison2000-09-071-0/+12
| | | | | | size using "NT mega hack". I think this is the correct thing to do but JF should also examine the. Jeremy.
* Fix from John Reilly for double free of printer struct.Jeremy Allison2000-09-061-3/+4
| | | | Jeremy.
* Fix for the SID history problem when using a Win2k domain controllerJeremy Allison2000-09-061-8/+9
| | | | | with security=domain. Also fixed to dynamically allocate the SIDs and GIDs. Jeremy.
* Implemented GETFORM tested and working using Gerald's Win32 test progs....Jeremy Allison2000-09-052-2/+103
| | | | Jeremy.
* Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill2000-09-012-13/+11
| | | | | | | | | | | | | | | | | | | - make proto - addition of function to convert from errno values to NT status codes (source/lib/error.c) - purge queue done without full access permission will purge only the jobs owned by that user, rather than failing. - unlock job database tdb before sending job to printer - in print_job_start(), ensure that we don't pick a jobid with an existing temporary file that may be owned by another user, as it causes silent failures. - fixes for printer permission checking for NT5 clients (source/include/rpc_spoolss.h, source/printing/nt_printing.c, source/printing/printing.c, source/rpc_server/srv_spoolss_nt.c) - change from uint8 to 'enum SID_NAME_USE' (source/rpc_server/srv_lsa.c) - fixed memory leaks for win95 driver download process (source/smbd/lanman.c) - properly free prs_structs and dacl in testsuite/printing/psec.c
* Implemented DELETEFORM tested using Gerald's Win32 test code :-).Jeremy Allison2000-08-312-0/+53
| | | | Jeremy.
* Fixed error returns for moving printer driver files around so genericJeremy Allison2000-08-301-2/+3
| | | | | | "Access denied" isn't always returned. More fixes found using Gerald's wonderful Win32 test progs :-). Jeremy.
* Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison2000-08-302-3/+47
| | | | | | possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy.
* Merge from appliance branch.Tim Potter2000-08-281-0/+1
|
* yipee!Andrew Tridgell2000-08-282-5/+11
| | | | | | | | | | | | 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.
* Tidied up some error returns from printing calls. Still need to map UNIXJeremy Allison2000-08-231-7/+4
| | | | | errors to NT error for print job failure returns. Patch from John Reilly at HP. Jeremy.
* fixed initialization errors (again!) I must have forgot toGerald Carter2000-08-181-0/+6
| | | | | | | | | check these in before. jerry
* fixed unitialized struct bug in enum_users (whatever it is called)Gerald Carter2000-08-161-1/+5
| | | | jerry
* Merge of uninitialised variable fix from APPLIANCE_HEAD.Tim Potter2000-08-151-4/+1
|
* Added "add_printer_hook" call to update printer for Win9x clients.Jeremy Allison2000-08-101-62/+68
| | | | | Patch from John Reilly <jreilly@hp.com>. Jeremy.
* Tidied up security rights definitions.Jeremy Allison2000-08-101-2/+1
| | | | Jeremy.
* got error code right for printer update/add failureAndrew Tridgell2000-08-091-3/+3
|
* added printer admin optionAndrew Tridgell2000-08-091-42/+26
| | | | any user in that list can do anything to a printer
* Fixed up the user/group contexts when using authenticated pipes.Jeremy Allison2000-08-042-1/+15
| | | | | | | | Added a become_root()/unbecome_root() (push/pop security context) around the initgroups() call to ensure it would succeed. Hmmm - I wonder if this call being done as non-root might explain any "group access" bugs we've had in the past.... Jeremy.
* Started to canonicalize our handling of uid -> sid code in order toJeremy Allison2000-08-022-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | get ready and fix se_access_check(). Added cannonical lookup_name(), lookup_sid(), uid_to_sid(), gid_to_sid() functions that look via winbind first the fall back on local lookup. All Samba should use these rather than trying to call winbindd code directly. Added NT_USER_TOKEN struct in user_struct, contains list of NT sids associated with this user. se_access_check() should use this (cached) value rather than attempting to do the same thing itself when given a uid/gid pair. More work needs to be done to preserve these things accross security context changes (especially with the tricky pipe problem) but I'm beginning to see how this will be done..... probably by registering a new vuid for an authenticated RPC pipe and not treating the pipe calls specially. More thoughts needed - but we're almost there... Jeremy.
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-016-48/+37
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* Added print job substitutions for %{printername}, %{sharename} and %{portname}Jeremy Allison2000-08-011-5/+1
| | | | | | from the NT printer tdb. Also added checks for time restrictions before allowing a job to print. Jeremy.
* Save & restore the port name correctly.Jeremy Allison2000-07-311-16/+1
| | | | Jeremy.
* Added John Reilly's enumports/addprinter/delprinter scripting code plus theJeremy Allison2000-07-311-69/+227
| | | | | | | | | | 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.
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-273-179/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* if no comment in TDB, use comment from print share.Jean-François Micouleau2000-07-261-4/+15
| | | | J.F.
* Fixed memory leaks in _spoolss_addprinterdriver()Tim Potter2000-07-261-5/+9
|
* Fixed up error checking and move printer file code. Fixed a memory leak.Jeremy Allison2000-07-251-2/+3
| | | | Jeremy.
* Added some error checking and returns to the new 'move' code.Jeremy Allison2000-07-251-2/+3
| | | | Jeremy.
* A rather big change set ! (listed in no particular order)Jean-François Micouleau2000-07-252-198/+211
| | | | | | | | | | | | | | | | | | | | | - 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.
* Tidy up code to add printer. Always index in tdb by sharename. ThisJeremy Allison2000-07-251-5/+33
| | | | | is beginning to come together... Jeremy.
* Fixed open handle code in printers - 3 functions were always being doneJeremy Allison2000-07-221-120/+134
| | | | | | in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy.
* rpc_parse/parse_prs.c: Removed extraneous ()'s.Jeremy Allison2000-07-181-20/+24
| | | | | | | | 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.
* Missing var.Tim Potter2000-07-171-1/+1
|
* Free security descriptor after access check in update_printer_sec()Tim Potter2000-07-171-3/+7
|