summaryrefslogtreecommitdiff
path: root/source3/printing
AgeCommit message (Collapse)AuthorFilesLines
2000-09-15Move towards getting W2k p&p to upload NT4.x drivers. Still doesn't work -Jeremy Allison1-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. (This used to be commit e5d98ba9e97eb16337ff6c49f799e130844ae72e)
2000-09-13Ensure old DACL and SACL are preserved if the new SD is a 'set' only.Jeremy Allison1-2/+11
Jeremy. (This used to be commit 29f41d0d95661fbc31ae1d9669fd7fb439169f90)
2000-09-13When creating a print job entry for the printing backend, use the WindowsTim Potter1-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. (This used to be commit a15e610bb34636448cb30e590277c53e7f9efe1a)
2000-09-13Added time check test before allowing print job.Jeremy Allison2-1/+13
Jeremy. (This used to be commit 0249de4cd91d72efb344e9fb05e2be2cb3f03945)
2000-09-13Added missing break statement for manage documents check inTim Potter1-1/+3
print_access_check() function. (This used to be commit 318ead783c842f2a557207690afd522b3d28e077)
2000-09-11Fixed memory leaks found in enumprinterdrivers code.Jeremy Allison1-3/+3
Jeremy. (This used to be commit e08b521559a824da09b0b73a04e462c573c42b06)
2000-09-08Fixed up get_a_printer_driver_3 so it looks in the tdb using the correctJeremy Allison1-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. (This used to be commit 54cab7dd3b7c1ad3a01692447f80134518772486)
2000-09-06Temporary fix to convert from level6 (Win2k) to level 3 (NT4)Jeremy Allison1-1/+28
for driver download files. Jeremy. (This used to be commit 1c9ac94c941aac5f6d309a094e4f741d523dbfb0)
2000-09-01Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill2-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 (This used to be commit 74af3e2caec7197e5d1ca389e2f78054a4197502)
2000-08-31Implemented DELETEFORM tested using Gerald's Win32 test code :-).Jeremy Allison1-2/+49
Jeremy. (This used to be commit 596c21a2af0309ce43a5e52a343a671036d05ebf)
2000-08-30Fixed error returns for moving printer driver files around so genericJeremy Allison1-8/+18
"Access denied" isn't always returned. More fixes found using Gerald's wonderful Win32 test progs :-). Jeremy. (This used to be commit 67b9d40e3df19523714430cb4457717575f2a61e)
2000-08-30Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison1-3/+6
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)
2000-08-23Tidied up some error returns from printing calls. Still need to map UNIXJeremy Allison2-3/+12
errors to NT error for print job failure returns. Patch from John Reilly at HP. Jeremy. (This used to be commit 3514b5bb8fffd78e3647425d93b74e2e6291bafc)
2000-08-23Added code to do SID to uid/gid conversion. Needed for ACL support.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 81c5380f91839b6416c8a42739dadf00e7388528)
2000-08-22Patch from John Reilly <jreilly@hp.com> for not processing duplicate filesTim Potter1-0/+8
when moving printer driver to download area. (This used to be commit 6e0c9079c385a4f0e61d9f1b1e0351bc4dbc3151)
2000-08-10Tidied up security rights definitions.Jeremy Allison1-1/+1
Jeremy. (This used to be commit e466c863f5540e13776f4477b6d58e3fbfe7276d)
2000-08-09Fixed bug in new printer access check code. If PRINTER_ALL_ACCESS is changedJeremy Allison1-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. (This used to be commit 066520979b2b5d967e6e1d77f16185a5fb19dc0c)
2000-08-09Fixed memory leak with NT tokens.Jeremy Allison1-41/+56
Added debug messages to se_access_check(). Added FULL_ACCESS acl to default acl on printers. Jeremy. (This used to be commit 7507f6f408cf8b0f8d7e2b3da54ce5fb5ef5343b)
2000-08-09added printer admin optionAndrew Tridgell2-4/+18
any user in that list can do anything to a printer (This used to be commit 7b5912be150dd590d6195be40b0976305b8716ba)
2000-08-01Added print job substitutions for %{printername}, %{sharename} and %{portname}Jeremy Allison2-16/+71
from the NT printer tdb. Also added checks for time restrictions before allowing a job to print. Jeremy. (This used to be commit 8cfb55e81abebf0354e6d470ed68bbac1d6560ad)
2000-07-31Added John Reilly's enumports/addprinter/delprinter scripting code plus theJeremy Allison2-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. (This used to be commit 902ada63799cf27924c72e24e7593a8c9fb5eba9)
2000-07-27fix the devmode.orientation being set to 0.Jean-François Micouleau1-2/+8
that bug was *subtle* :-( J.F. (This used to be commit 0e9e048b6d65b57bdcc7440ddaa9d2cc1eac71dc)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison1-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. (This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-07-25Fixed up error checking and move printer file code. Fixed a memory leak.Jeremy Allison1-8/+33
Jeremy. (This used to be commit 5130dd0f8b80aed5fb3c0df290b627057cc9b825)
2000-07-25Added some error checking and returns to the new 'move' code.Jeremy Allison1-12/+46
Jeremy. (This used to be commit 0bd88d304cd773e0bbf3e6f7fedcb3b544d41cbe)
2000-07-25A rather big change set ! (listed in no particular order)Jean-François Micouleau1-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. (This used to be commit ac0a145acc0953a6f362497abbf4dfe70aa522a6)
2000-07-22Fixed open handle code in printers - 3 functions were always being doneJeremy Allison1-12/+13
in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy. (This used to be commit a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
2000-07-19Code from John Reilly <jreilly@hp.com> to add tdb lookups into the Win95Jeremy Allison1-0/+55
printer driver download if looking for the default driver files fail. Jeremy. (This used to be commit 1192d867c4e863471f9bc12afceb68a23ba2142e)
2000-07-17Initialise current time to time(NULL) in add_a_printer_2()Tim Potter1-1/+4
Added get and free security old descriptor in nt_printing_setsec() after access checking was moved up to rpc level. (This used to be commit a5b7cafc87e14ca3f28dcfc1ed6bcc6f47e79639)
2000-07-17Allow job owner to delete own print job.Tim Potter1-13/+28
(This used to be commit 90b1857c81627e587a7395ee2bdb51b26ea46512)
2000-07-17Moved access check for nt_printing_setsec() up into rpc function.Tim Potter1-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. (This used to be commit e92e161a813ac0793897ffe3d33b01054912d4c7)
2000-07-12we are now sure the printer_info_2 timestamp is updated everytimeJean-François Micouleau1-0/+5
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-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. (This used to be commit 493f7d11acf753ba24c88e6cbb73d86a8595a66a)
2000-07-11Allow name lookup to fail and fall back to using the "Everyone" SIDJeremy Allison1-3/+5
as SD owner. Allows smbd to work without winbindd running. Check for security implications ! Jeremy. (This used to be commit 9bd64da1e26a1b4a2df2b0537feb604a40762bb1)
2000-07-10Moved winbind client functions from various odd locations toTim Potter1-25/+0
nsswitch/wb_client.c Merge of nsswitch/common.c rename to nsswitch/wb_common.c from TNG. (This used to be commit f866c18f6be65db67d9d2a6c0b42e1af3b421e6c)
2000-07-10Re-instated lanman printing security checks (oops).Tim Potter3-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 (This used to be commit 2abce4dcfa351051df6e5f789b34fa99c9b81c22)
2000-07-06printing/nt_printing.c: (From JF) use the driver name - already given to us.Jeremy Allison2-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. (This used to be commit 4ff949228c40b6abb2008df8db985562ac2895d2)
2000-07-06Don't check NT permissions when printing from lanman.Tim Potter1-0/+8
(This used to be commit e84607eedf3be454f8f709c70cafc5ded4ea951d)
2000-07-06Implemented NT printer descriptor checking. Yay!Tim Potter2-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. (This used to be commit 8d42661d424d80e1048d08b5cad3281643231d62)
2000-07-01Found that the minimum priority is 1 and not 0 on NT.Jean-François Micouleau1-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. (This used to be commit a7098c47b6ecbd7bb5df1330ea176aa4d463aad3)
2000-06-29Tidy up current spool code - added some JRATEST ifdefs to allowJeremy Allison1-1/+1
experimentation with what is making spoolss.exe crash - may be removed later. Jeremy. (This used to be commit f3fe384dc39ce49c639a7adf35179a50cb86abf0)
2000-06-26Changing drivers using the properties page works - but only if getting/settingJeremy Allison1-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. (This used to be commit 8c9ed874363e6a710bc0fe521bb8c4f7ee219587)
2000-06-23Some compile fixes.Tim Potter1-3/+0
(This used to be commit 4d0c09cb4f17b60ab99767d3e61f2ad50c6c5c30)
2000-06-22lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.Jeremy Allison1-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. (This used to be commit de99011bf3b2a23bd1854a047382a107aaeb9c68)
2000-06-20Fixes for Win2k "add printer driver" INFO_LEVEL_6 was wrong, also someJeremy Allison1-2/+10
memory fixes. Jeremy. (This used to be commit 2a9e645cbddef1cddc5c978310b7efed492758d2)
2000-06-16Pass the vuid from the connection_struct to the printing back end functions.Tim Potter1-1/+1
(This used to be commit a8975d6e226e7271f60d5487243301db3c220d87)
2000-06-16Call print_access_check() function from printing back end.Tim Potter1-15/+45
(This used to be commit 979e083d3dd844b98b03108e636dfe11ae157fb0)
2000-06-16Added print_access_check() function for checking printer securityTim Potter1-0/+71
descriptors. Currently returns True (plus debug output) which should not affect the behaviour of nt or lanman printing. (This used to be commit a9b4710e649e887e07d68c1bf826e00c9811e4ee)
2000-06-09untiltime should be 0 by default to cover the whole 24 hours.Jean-François Micouleau1-3/+3
J.F. (This used to be commit 53aff484a6a37c83fd2e21d48fd1a5fcbad2f511)
2000-06-08make_sec_acl was passed pointer to static array ace[2], oops.Luke Leighton1-1/+1
(This used to be commit f3502d846c99c77b13ce75977f5dc79cc1a3506d)