summaryrefslogtreecommitdiff
path: root/source3/rpc_server
AgeCommit message (Collapse)AuthorFilesLines
2000-08-28Merge from appliance branch.Tim Potter1-0/+1
(This used to be commit 567b0095b1b8393b3b1e32533aa2860ab3dbfa47)
2000-08-28yipee!Andrew Tridgell2-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. (This used to be commit 14e534a8907c34b53e00a63756efd71903ff9432)
2000-08-23Tidied up some error returns from printing calls. Still need to map UNIXJeremy Allison1-7/+4
errors to NT error for print job failure returns. Patch from John Reilly at HP. Jeremy. (This used to be commit 3514b5bb8fffd78e3647425d93b74e2e6291bafc)
2000-08-18fixed initialization errors (again!) I must have forgot toGerald Carter1-0/+6
check these in before. jerry (This used to be commit e682d6a599934e5460abe0d30cb2465fa80c7937)
2000-08-16fixed unitialized struct bug in enum_users (whatever it is called)Gerald Carter1-1/+5
jerry (This used to be commit a606131508592d72f3fd8a0dd63073e9c559062f)
2000-08-15Merge of uninitialised variable fix from APPLIANCE_HEAD.Tim Potter1-4/+1
(This used to be commit 20a7fefee8c85f02f6a0e2a02c0df04a8b22b7cb)
2000-08-10Added "add_printer_hook" call to update printer for Win9x clients.Jeremy Allison1-62/+68
Patch from John Reilly <jreilly@hp.com>. Jeremy. (This used to be commit 76a5713bd3fad18ec60d12fc3f965f3e9717c159)
2000-08-10Tidied up security rights definitions.Jeremy Allison1-2/+1
Jeremy. (This used to be commit e466c863f5540e13776f4477b6d58e3fbfe7276d)
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-04Fixed up the user/group contexts when using authenticated pipes.Jeremy Allison2-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. (This used to be commit 06a65972e872f37d88b84f22ea714feebd38f6c0)
2000-08-02Started to canonicalize our handling of uid -> sid code in order toJeremy Allison2-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. (This used to be commit 5e5cc6efe2e4687be59085f562caea1e2e05d0a8)
2000-08-01Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison6-48/+37
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)
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 Allison3-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. (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 Micouleau2-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. (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-13Don't return winbind groups or users when responding to samr_enum_dom_usersTim Potter1-0/+21
and samr_enum_dom_aliases commands. Unfortunately the algorithm for determining winbind groups from normal groups is simply to check for the presence of the lp_winbind_separator() character. )-: (This used to be commit 363a9c45bf0a7d3266ccdf4eeb0b9f5e3d38389f)
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-10Moved winbind client functions from various odd locations toTim Potter1-59/+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 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-06Pass pipes_struct rather than vuid down to startdocprinter, setprinter andTim Potter1-3/+3
setjob spoolss server commands. (This used to be commit f35745137451f769a0723cb0665ba0b9d4801ad8)
2000-07-06Changed checking for WINBINDD_OK return value instead of NSS_STATUS_SUCCESSTim Potter1-3/+3
when looking up sids from winbindd. (This used to be commit 79fb877bf13ba462ad0a878d8975f8b5183e3ea3)
2000-07-03Some more sec_ctx changes. Modified some fields in the pipe_structTim Potter2-20/+28
structure so authenticated pipe users can have their unix groups set when become_authenticated_pipe_user() is called. (This used to be commit 55c9bf124dc661df43bfe582ef14b1297aeaf0fa)
2000-07-03Renamed generic_request() to winbindd_request()Tim Potter1-1/+1
(This used to be commit d9041958558fc8e3c7b0491eb0f7e45bee9d19c5)
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-26Fixed display of "Everyone" in SD's.Jeremy Allison1-1/+5
Jeremy. (This used to be commit 3c7fdaa576c09dab2e4de78ed353b1fa1d65a40d)
2000-06-24lib/util_sid.c: Uninitialized memory read.Jeremy Allison2-7/+14
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-23Got a bit carried away deleting things.Tim Potter1-1/+1
(This used to be commit 211391d88e10d94edcc81b83fefcadb4a905ea56)
2000-06-23Removed unused variables.Tim Potter1-2/+0
(This used to be commit a75e738211e744adb966bcbc24371554c9642220)
2000-06-23Removed save directory argument to become_root() calls. Probably most ofTim Potter6-42/+42
this stuff doesn't need to be done as root anyway. (This used to be commit c3cad0ff6482784f95fd54ba51ee5be2354bb95d)