summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
AgeCommit message (Collapse)AuthorFilesLines
2000-08-09got error code right for printer update/add failureAndrew Tridgell1-3/+3
(This used to be commit 0d00d2ec258b36d73e865f06d5d11745d7cdafa9)
2000-08-09added printer admin optionAndrew Tridgell1-42/+26
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 Allison1-5/+1
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-31Save & restore the port name correctly.Jeremy Allison1-16/+1
Jeremy. (This used to be commit c0648c981edef2a29b3a22a7d08aa226ca724e95)
2000-07-31Added John Reilly's enumports/addprinter/delprinter scripting code plus theJeremy Allison1-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. (This used to be commit 902ada63799cf27924c72e24e7593a8c9fb5eba9)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison1-8/+8
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-26if no comment in TDB, use comment from print share.Jean-François Micouleau1-4/+15
J.F. (This used to be commit c267b23620677a11f702bfea4885a28e66a05b05)
2000-07-26Fixed memory leaks in _spoolss_addprinterdriver()Tim Potter1-5/+9
(This used to be commit 1f49788442b0d1264c70166e727b8588b936e6ec)
2000-07-25Fixed up error checking and move printer file code. Fixed a memory leak.Jeremy Allison1-2/+3
Jeremy. (This used to be commit 5130dd0f8b80aed5fb3c0df290b627057cc9b825)
2000-07-25Added some error checking and returns to the new 'move' code.Jeremy Allison1-2/+3
Jeremy. (This used to be commit 0bd88d304cd773e0bbf3e6f7fedcb3b544d41cbe)
2000-07-25A rather big change set ! (listed in no particular order)Jean-François Micouleau1-197/+210
- 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-25Tidy up code to add printer. Always index in tdb by sharename. ThisJeremy Allison1-5/+33
is beginning to come together... Jeremy. (This used to be commit 614bf56186b5836020a7813855a5108da0ee8433)
2000-07-22Fixed open handle code in printers - 3 functions were always being doneJeremy Allison1-120/+134
in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy. (This used to be commit a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
2000-07-18rpc_parse/parse_prs.c: Removed extraneous ()'s.Jeremy Allison1-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. (This used to be commit f038a24e9f624fdb04cd52769d45783248ce8a38)
2000-07-17Missing var.Tim Potter1-1/+1
(This used to be commit 5c1c5622269c54dca89eb178ca25981ab7928e75)
2000-07-17Free security descriptor after access check in update_printer_sec()Tim Potter1-3/+7
(This used to be commit bc5f9c00be5b8c2f6d258f0c95ed3b4fc0201b87)
2000-07-17Renamed arguments to se_access_check()Tim Potter1-4/+28
(This used to be commit 714b50b47dab46f5cdde49d7c200b353c2e0398a)
2000-07-12- The printers are indexed by the sharename in both get_a_printer() andJean-François Micouleau1-6/+17
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-10Ensure correct driver paths are returned in INFO_2 struct.Jeremy Allison1-6/+6
Jeremy. (This used to be commit 7a95c289cd0b4615d2a5aa8a148c767b57460ffa)
2000-07-10Fixes for various compile warnings on Solaris 8.Tim Potter1-1/+2
(This used to be commit 898a483cdab1ed7d8ff902c0dc0e0620440ae4cd)
2000-07-10Re-instated lanman printing security checks (oops).Tim Potter1-14/+55
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 Allison1-47/+62
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-06Pass either an authenticated pipe or SMB user in a current_user struct downTim Potter1-13/+38
to the printing back end functions. (This used to be commit a2751a269e05d5e46d4b22d6082a5898cdb4526f)
2000-07-01reverting Jeremy's changes to enumprinterdata.Jean-François Micouleau1-2/+2
Jeremy, the out_max_value_len and out_max_data_len were good. Your change is breaking NT4SP6 checked version. J.F. (This used to be commit 5f2be8ba7dcd1eacc169e8d1d53c309e45a5cce6)
2000-07-01Found that the minimum priority is 1 and not 0 on NT.Jean-François Micouleau1-4/+4
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-30Fixed oops with missing MANGLE_PATH directive.Jeremy Allison1-2/+6
Jeremy. (This used to be commit fb6b5a964512dec37f85f8de39c0c06f702aabbd)
2000-06-29Tidy up current spool code - added some JRATEST ifdefs to allowJeremy Allison1-16/+17
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-30/+40
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-7/+9
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-22Changed enumports to show printernames as ports. In line with 'the grand ↵Jeremy Allison1-11/+51
plan' :-) Gerald & I discussed with HP. More changes to follow. Jeremy. (This used to be commit 193a248beda99103c73a0b0ea5e2fbcbb516ce8e)
2000-06-22lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.Jeremy Allison1-54/+32
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/+2
memory fixes. Jeremy. (This used to be commit 2a9e645cbddef1cddc5c978310b7efed492758d2)
2000-06-16Simplified server pipe implementation by changing arguments passed downTim Potter1-14/+17
through to the individual pipe api calls. Instead of passing two prs_struct pointers, we now pass the pipes_struct pointer which contains the former information as well as other useful stuff like the vuid. Pass the vuid from the pipes_struct down to the lower level spoolss functions to perform security checks. ZERO_STRUCTP the info_2 structure before filling it. Free the device mode field before freeing the info_2 to avoid a memory leak. Fixed uninitialised pointer bug in fill_job_info_2(). (This used to be commit a9547b7e3a068941cda5619f05a64e798584535a)
2000-06-07Fixing get/set of security descriptors.Jeremy Allison1-0/+2
Removed ugly hack for NT printing. Fixed up tdb parse stuff memory leaks. Jeremy. (This used to be commit 8ef41f31c53e14ad057d883810a1cd2301fede2a)
2000-06-06Memory leak fixes.Jeremy Allison1-1/+2
Jeremy. (This used to be commit 34b63896ab1543936d6b9b382ef6727a161b6bf2)
2000-06-06Create elements in default, not in read.Jeremy Allison1-3/+1
Jeremy. (This used to be commit 0d681ea252e0cf7fdf57d316d2bfe7caa9b4fbf5)
2000-06-05Some tidyup fixes (memory leaks etc.). Still no progress with theJeremy Allison1-10/+19
"no driver" issue. I'm banging my head against comparitive packet dumps right now... Jeremy. (This used to be commit 03cd4aa1443acd958593f37c61ff9c90a43c660b)
2000-06-04added a MANGLE_DRIVER_PATH define to chooose whether we stuff with theAndrew Tridgell1-10/+9
driver path do a rename etc. I turned it off by default as it is causing me no end of problems. The client will *cache* this path, and that screws things up badly as the temp directory is no longer there when it is needed. (This used to be commit 46f5f41c88b6ffa117d30f7702628b43dd456902)
2000-06-03rpc_client/cli_lsarpc.c: Removed unused variable.Jeremy Allison1-0/+5
rpc_server/srv_spoolss_nt.c: Fixed more memory leaks. smbd/nttrans.c: Fixed shadow variable problem. Jeremy. (This used to be commit f0a7540831181d3a47e7f8ce8be55a36a2f2aba1)
2000-06-02More memory leak and PANIC action fixes.Jeremy Allison1-3/+8
This is *horrible* code :-(. Jeremy. (This used to be commit ac383bb765ea606fc1105aa91470fcdf453d9335)
2000-06-02More memory leak fixes.Jeremy Allison1-15/+37
Jeremy. (This used to be commit 4e7b6b20eabe02f1ab74254607178ba35e61c9ce)
2000-06-02More memory corruption (leaks etc.) fixes.Jeremy Allison1-11/+12
Jeremy. (This used to be commit 71a0621f552083880e89923055e8bd14d0b1b82f)
2000-06-02Fixed null pointer indirect in addprinterex. Still working on problemJeremy Allison1-8/+21
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-4/+2
Jeremy. (This used to be commit 3cdcfa6325b9cd2d7f7c90c4b2d1c6ec73fc2f6d)
2000-06-01param/loadparm.c: Looks like someone ran indent on this !Jeremy Allison1-2/+4
passdb/smbpass.c: Insure uninitialized memory reference fix. printing/nt_printing.c: rpc_server/srv_spoolss_nt.c: Insure memory leak fixes. smbd/unix_acls.c: Shadow ref fix. Jeremy. (This used to be commit d175d3ebefc053e9badd91ca5f2d8bd03eb6705d)
2000-06-01Changes I really don't want to lose whilst CVS is playing up.Jeremy Allison1-222/+257
Dynamic changes to spoolss code. Jeremy. (This used to be commit 0a5e7a8f31c26fe80db5398a441a1969a8882845)
2000-05-29fixed some more crashesAndrew Tridgell1-86/+44
this introduces some memory leaks that I need to fix later (This used to be commit 2170d72d508ab8fb63a1da3024395f8fd6011cfa)
2000-05-28don't free a driver structure from the stack!Andrew Tridgell1-5/+7
(This used to be commit d241f1dcaf612881a428dd578b97383d02a4d3c3)
2000-05-28#ifdef not #ifLuke Leighton1-3/+3
(This used to be commit f0229102fe337213cd53fcb0a3d7e2ba786470b9)
2000-05-28moved notif_y_table struct to spoolss_nt.c only used there.Luke Leighton1-1/+24
#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)