summaryrefslogtreecommitdiffstats
path: root/source/printing
Commit message (Collapse)AuthorAgeFilesLines
* utils/smbcontrol.c: Fixes from Herb for interactive use.Jeremy Allison2000-09-291-1/+1
| | | | | printing/nt_printing.c: No C++ comments please :-). Jeremy.
* Fix from John Reilly for forms ordering problems.Jeremy Allison2000-09-281-12/+19
| | | | Jeremy.
* fix for IRIX 6.2 compiler errorHerb Lewis2000-09-261-1/+1
|
* Move towards getting W2k p&p to upload NT4.x drivers. Still doesn't work -Jeremy Allison2000-09-151-2/+67
| | | | | | | 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.
* Ensure old DACL and SACL are preserved if the new SD is a 'set' only.Jeremy Allison2000-09-131-2/+11
| | | | Jeremy.
* When creating a print job entry for the printing backend, use the WindowsTim Potter2000-09-131-11/+21
| | | | | | username rather than the Unix username. The Windows username will then be shown in the port monitor regardless of the Unix username used to spool the job.
* Added time check test before allowing print job.Jeremy Allison2000-09-132-1/+13
| | | | Jeremy.
* Added missing break statement for manage documents check inTim Potter2000-09-131-1/+3
| | | | print_access_check() function.
* Fixed memory leaks found in enumprinterdrivers code.Jeremy Allison2000-09-111-3/+3
| | | | Jeremy.
* Fixed up get_a_printer_driver_3 so it looks in the tdb using the correctJeremy Allison2000-09-081-0/+11
| | | | | | | key name for a driver info. Version needs to be adjusted in the same way that it is adjusted when the driver info is stored in the tdb. AddPrinterConnection() Win32 call caught this one. Jeremy.
* Temporary fix to convert from level6 (Win2k) to level 3 (NT4)Jeremy Allison2000-09-061-1/+28
| | | | | for driver download files. Jeremy.
* Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill2000-09-012-34/+99
| | | | | | | | | | | | | | | | | | | - 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-311-2/+49
| | | | Jeremy.
* Fixed error returns for moving printer driver files around so genericJeremy Allison2000-08-301-8/+18
| | | | | | "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-301-3/+6
| | | | | | possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy.
* Tidied up some error returns from printing calls. Still need to map UNIXJeremy Allison2000-08-232-3/+12
| | | | | errors to NT error for print job failure returns. Patch from John Reilly at HP. Jeremy.
* Added code to do SID to uid/gid conversion. Needed for ACL support.Jeremy Allison2000-08-231-2/+2
| | | | Jeremy.
* Patch from John Reilly <jreilly@hp.com> for not processing duplicate filesTim Potter2000-08-221-0/+8
| | | | when moving printer driver to download area.
* Tidied up security rights definitions.Jeremy Allison2000-08-101-1/+1
| | | | Jeremy.
* Fixed bug in new printer access check code. If PRINTER_ALL_ACCESS is changedJeremy Allison2000-08-091-0/+10
| | | | | | in the ACE's the same thing must be done in the desired access or they will never match. This took me a while to find... :-). Jeremy.
* Fixed memory leak with NT tokens.Jeremy Allison2000-08-091-41/+56
| | | | | | Added debug messages to se_access_check(). Added FULL_ACCESS acl to default acl on printers. Jeremy.
* added printer admin optionAndrew Tridgell2000-08-092-4/+18
| | | | any user in that list can do anything to a printer
* Added print job substitutions for %{printername}, %{sharename} and %{portname}Jeremy Allison2000-08-012-16/+71
| | | | | | from the NT printer tdb. Also added checks for time restrictions before allowing a job to print. Jeremy.
* Added John Reilly's enumports/addprinter/delprinter scripting code plus theJeremy Allison2000-07-312-29/+44
| | | | | | | | | | 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.
* fix the devmode.orientation being set to 0.Jean-François Micouleau2000-07-271-2/+8
| | | | | | that bug was *subtle* :-( J.F.
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-271-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixed up error checking and move printer file code. Fixed a memory leak.Jeremy Allison2000-07-251-8/+33
| | | | Jeremy.
* Added some error checking and returns to the new 'move' code.Jeremy Allison2000-07-251-12/+46
| | | | Jeremy.
* A rather big change set ! (listed in no particular order)Jean-François Micouleau2000-07-251-31/+243
| | | | | | | | | | | | | | | | | | | | | - 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.
* Fixed open handle code in printers - 3 functions were always being doneJeremy Allison2000-07-221-12/+13
| | | | | | in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy.
* Code from John Reilly <jreilly@hp.com> to add tdb lookups into the Win95Jeremy Allison2000-07-191-0/+55
| | | | | printer driver download if looking for the default driver files fail. Jeremy.
* Initialise current time to time(NULL) in add_a_printer_2()Tim Potter2000-07-171-1/+4
| | | | | Added get and free security old descriptor in nt_printing_setsec() after access checking was moved up to rpc level.
* Allow job owner to delete own print job.Tim Potter2000-07-171-13/+28
|
* Moved access check for nt_printing_setsec() up into rpc function.Tim Potter2000-07-171-36/+59
| | | | | | | | | | | Use sid + rid instead of lp_workgroup()/Administrator for printer owner sid as per JF's advice. Default printer owner is either the administrator of the pdc workgroup or Everyone depending on whether winbindd is running. Still the subject of some debate... Renamed se_access_check() parameters.
* we are now sure the printer_info_2 timestamp is updated everytimeJean-François Micouleau2000-07-121-0/+5
| | | | | | required. J.F.
* - The printers are indexed by the sharename in both get_a_printer() andJean-François Micouleau2000-07-121-15/+15
| | | | | | | | | | | | | | | 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.
* Allow name lookup to fail and fall back to using the "Everyone" SIDJeremy Allison2000-07-111-3/+5
| | | | | | as SD owner. Allows smbd to work without winbindd running. Check for security implications ! Jeremy.
* Moved winbind client functions from various odd locations toTim Potter2000-07-101-25/+0
| | | | | | nsswitch/wb_client.c Merge of nsswitch/common.c rename to nsswitch/wb_common.c from TNG.
* Re-instated lanman printing security checks (oops).Tim Potter2000-07-103-36/+115
| | | | | | | | | | | | | | | | | A user can now pause, resume or delete their own job even if they don't have the Manage Documents privilege. Added call to se_access_check() for changing printer properties. The Full Access privilege is required for the user to perform this. Several uninitialised variables and memory leaks plugged. Modified default ACL created on new printers to be Everyone / Print instead of Everyone / Full Access. This required some random stuffing around with the value of the revision field to correspond with the ACL that NT produces when setting the same permission on the printer. Fixed dodgy function call in printing/printfsp.c
* printing/nt_printing.c: (From JF) use the driver name - already given to us.Jeremy Allison2000-07-062-5/+2
| | | | | | | | printing/printing.c: priority needs to be 1 not zero (found by checked build). rpc_server/srv_spoolss_nt.c: Log invalid handle access, also print out if this is a different pid handle. This will help track down client access after a connection is closed. Jeremy.
* Don't check NT permissions when printing from lanman.Tim Potter2000-07-061-0/+8
|
* Implemented NT printer descriptor checking. Yay!Tim Potter2000-07-062-68/+115
| | | | | | | | | | | User details are passed into the printing back end from the spoolss code. For each print operation these details are checked using the se_access_check() function using information from the winbind daemon. Fixed bug in nt_printing_setsec() where the user and group SIDs were trashed if the permissions were changed from NT. It is necessary to merge these sids from the previous value of the security descriptor before storing it in the tdb.
* Found that the minimum priority is 1 and not 0 on NT.Jean-François Micouleau2000-07-011-1/+8
| | | | | | | | | | Changed back the devicemode's devicename to "\\server\printer". I'm 100% sure it is correct, it's what NT sends on the wire. And that's the printer's name and NOT the port's name as it has to be unique. It must also be a UNC because it's a remote printer (remote for the client). J.F.
* Tidy up current spool code - added some JRATEST ifdefs to allowJeremy Allison2000-06-291-1/+1
| | | | | | experimentation with what is making spoolss.exe crash - may be removed later. Jeremy.
* Changing drivers using the properties page works - but only if getting/settingJeremy Allison2000-06-261-4/+13
| | | | | | | | | | 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.
* Some compile fixes.Tim Potter2000-06-231-3/+0
|
* lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.Jeremy Allison2000-06-221-11/+9
| | | | | | | | | Removed unistr_to_ascii() as it was never used. printing/nt_printing.c: Removed "DUMMY.XX" files. rpc_server/srv_spoolss_nt.c: Use dos_PutUniCode() instead of ascii_to_unistr(). Attempted to fix the "return value" size code based on J.F's comments. This needs looking at. Jeremy.
* Fixes for Win2k "add printer driver" INFO_LEVEL_6 was wrong, also someJeremy Allison2000-06-201-2/+10
| | | | | memory fixes. Jeremy.
* Pass the vuid from the connection_struct to the printing back end functions.Tim Potter2000-06-161-1/+1
|
* Call print_access_check() function from printing back end.Tim Potter2000-06-161-15/+45
|