summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2000-08-09added printer admin optionAndrew Tridgell5-46/+51
any user in that list can do anything to a printer (This used to be commit 7b5912be150dd590d6195be40b0976305b8716ba)
2000-08-09Fixed AddPrinterDriver()Gerald Carter1-1/+0
jerry (This used to be commit 39d025693eadf4ca1c4fe17dd9110bb8a647f361)
2000-08-09fixed help stringAndrew Tridgell1-1/+2
(This used to be commit 16afa46797a4cdaa6e3b668caf6d910c08bec9b4)
2000-08-08Found the sec_ctx_stack overflow - a become_root() should have been anJeremy Allison1-1/+1
unbecome_root() - typo. Jeremy. (This used to be commit ebb160663ed55e44e44f1c3d17eb077a32c2ffb9)
2000-08-08Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.Jeremy Allison1-4/+17
Jeremy. (This used to be commit b3a1038ac1bfb0c32e64f6cb26e5e46fbda794a2)
2000-08-08Changed the sec desc access checks to match the spec. Needs testing.Jeremy Allison2-223/+149
Jeremy. (This used to be commit 5a4a7cd4727df5d1b5e71d343e776c7df52dc515)
2000-08-08make protoGerald Carter1-2/+14
(This used to be commit 74074072cf244d221f8f9b09302d0cbc85d689d4)
2000-08-08cleanup in init_unistr2_from_unistr()Gerald Carter1-27/+19
--jerry (This used to be commit 1e00ac19cd001024fa8007eff5137aac877796fa)
2000-08-08All changes related to rpcclient...Gerald Carter7-11/+487
- cleaned up some code - Fixed a few memory leaks of my own making - Add AddPrinterDriver(); I'm missing some of the semantics here as the call is done correctly, but I'm not getting all the information right in the DRIVER_INFO_3 struct I think. Will work on it tomorrow some more... --jerry (This used to be commit 3bf9a29f34ee4ade5180c5a0b0b9ff4aca7f0f08)
2000-08-05it is not my day it seems. :-(Gerald Carter1-1/+1
Fixed missing ) j- (This used to be commit 7b69cbbde36e51f8f7b74691428a04e8871d8b4a)
2000-08-05removed the for() loop to copy the buffer in init_unistr2_from_unistr()Gerald Carter1-3/+2
Replaced with a memcpy() Forgot to commit this a few moments ago j- (This used to be commit 34d4fb54c3121d31cb8b29193f71d5e7b5471cdc)
2000-08-05Fixed bug in init_unistr2_from_unistr() found by Elrond.Gerald Carter1-1/+1
Thanks :-) j- (This used to be commit 4ecd15cd5851e94808756e3da0ce6a066f0a0cd7)
2000-08-04make protoGerald Carter1-1/+1
(This used to be commit dfd6b51bc7fb61d25af3074c386ce51cf3bc86f4)
2000-08-04spoolss_addprinterex() was adding the printer and returning theGerald Carter2-26/+28
correct handle, but was deleting the connection to the server. Doh!! --jerry (This used to be commit 8e5e929561a1ae954bd60f7bd745d697438f835c)
2000-08-04Fixed up se_access_check() to use the token list from the user structJeremy Allison1-82/+32
as the SID list. Now to go through and tidy up the algorithm. Jeremy. (This used to be commit 1f7300df6713a6728feb1600ca7e62fc213232fc)
2000-08-04make protoGerald Carter1-3/+10
(This used to be commit 6bdb7d5c9787bd16e851f5c751d952c4df8ccc5b)
2000-08-04clunky support for calling AddPrinterEx(). The code currently reportsGerald Carter3-27/+178
that the call failed, but the printer shows up on the remote NT client. (note this is the client side call). I've botched the return value somewhere and will fix that today. jerry (This used to be commit e15d9befd24cf5f3410c4be819b2a1fcf68048fb)
2000-08-04After talking with Jeremy and JF (and staring at packet traces betweenGerald Carter2-3/+55
NT <-> NT), I've come to realize that UNISTR2 strings should be NULL terminated. jerry (This used to be commit c8f9e54beafcb0c0668f1510e7693dbf22485aa8)
2000-08-04In cli_error() return ENOENT when an ERROR_INVALID_NAME is received insteadTim Potter1-0/+1
of the generic EINVAL. (This used to be commit a290107aee01a85ca1ef5565f23c8f00e18e98c2)
2000-08-04Fixed up the user/group contexts when using authenticated pipes.Jeremy Allison6-7/+25
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-03Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison9-103/+246
with the current user. This will allow se_access_check() to quickly do a SD check without having to translate uid/gid's to SIDs. Still needs work on pipe calls. Jeremy. (This used to be commit e28d01b744b3dbd33e0e54af4e7f426fa8c082b8)
2000-08-02Much though I hate to admit it - JF was completely correct. I cannotJeremy Allison1-2/+2
now reproduce the bug I had with adding a printer driver, and PrintMig.exe crashes if I use my SD code but works with his. I stand completely corrected :-). - So I'm reverting to his code as it works :-). Jeremy. (This used to be commit d6db29be98f717a9038b5ac1ff492c70ce2e92a7)
2000-08-02Started to canonicalize our handling of uid -> sid code in order toJeremy Allison13-218/+251
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 Allison21-139/+97
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 Allison6-37/+93
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 Allison10-151/+359
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-31make protoGerald Carter1-10/+13
(This used to be commit 38b07395566a2c114ccda173fb0fe88cf7683588)
2000-07-31More work on rpcclient...Gerald Carter1-7/+27
* Fixed to work with Jeremy's recent changes re: dunamic memory allocation when unmarshalling unistr[2] * included EnumPorts level 1 * more work on AddPrinterEx --jerry (This used to be commit d321d0dddd052b49c94bef8f214be7343337d907)
2000-07-31More work on rpcclient...Gerald Carter6-116/+373
* Fixed to work with Jeremy's recent changes re: dunamic memory allocation when unmarshalling unistr[2] * included EnumPorts level 1 * more work on AddPrinterEx --jerry (This used to be commit 45fbf31b698d6e754630590034cff712c0a716b1)
2000-07-28Fixed read overrun in init_string2()Tim Potter1-2/+4
(This used to be commit 4ab75143c4466ad0ea8443512dd5ade449d72462)
2000-07-27remove warningsJean-François Micouleau1-2/+2
J.F. (This used to be commit 9178d2a1aac26f8d6533f7dc86ff9b19eb72db8b)
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 Allison26-412/+513
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-26Found out that we are crashing spoolss in enumprinterdata.Jean-François Micouleau4-14/+32
So fixed enumprinterdatas in rpcclient to debug the server code, and found that the parsing code was missing 2 prs_align(). We are not crashing NT anymore. :-) J.F. (This used to be commit 883f7402d495182aeff85152216cc8b3cfc18bef)
2000-07-26Fixed memory leaks in root and non-root password changing.Tim Potter1-7/+20
(This used to be commit f3a4f81a5e51e411f1c7c6245597cca01e9ad5b2)
2000-07-26Fixed memory leaks in _spoolss_addprinterdriver()Tim Potter1-5/+9
(This used to be commit 1f49788442b0d1264c70166e727b8588b936e6ec)
2000-07-26Fixed memory leak in modify_trust_password()Tim Potter1-0/+4
(This used to be commit 7145689bf55b9f3100632badac486fde30ee4972)
2000-07-25Fixed up error checking and move printer file code. Fixed a memory leak.Jeremy Allison3-12/+38
Jeremy. (This used to be commit 5130dd0f8b80aed5fb3c0df290b627057cc9b825)
2000-07-25make protoGerald Carter1-0/+5
--jerry (This used to be commit 1f65b13dd56fbe41320f6c4e8f391ce739509e45)
2000-07-25some initial code for AddPrinterEx() project. Most is ifdef'd outGerald Carter3-3/+149
'cause it's not all written. -jerry (This used to be commit 2c0f6bcc8f926ee9c17de12671075e8a9239bb94)
2000-07-25if the sids are not the same pointer and either of the sids are NULLAndrew Tridgell1-0/+3
then the two sids are not equal (This used to be commit 9ccf3b1dc5baf0e00d032d8b932ab0fb5b1e11b1)
2000-07-25Added some error checking and returns to the new 'move' code.Jeremy Allison4-16/+53
Jeremy. (This used to be commit 0bd88d304cd773e0bbf3e6f7fedcb3b544d41cbe)
2000-07-25A rather big change set ! (listed in no particular order)Jean-François Micouleau9-306/+494
- 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-25Fix for mounting a printer as a share. Not that there's anythingTim Potter1-0/+5
specifically wrong with this, but Samba is fooled by the client into thinking the printer is a file share. Files copied to the share gather dust in the spool directory and aren't printed. This patch has the effect of not allowing printers to be mounted as file shares. Not sure whether this is the correct solution or not. {Jeremy,JF,Tridge} please check! (This used to be commit dcf3249bb9fef2a05b376e9c8c1a0a7d602d8a2e)
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-24Run main server loop with sys_select() instead of sys_select_intr(). TheTim Potter1-2/+13
main daemon was not catching sighup and reloading the service file. (This used to be commit f026a897e9296a71fb5c4d5f6e1b4d3287689bde)
2000-07-22Fixed open handle code in printers - 3 functions were always being doneJeremy Allison5-155/+171
in order - moved them into open_printer_hnd(). Added saving of comment field. Jeremy. (This used to be commit a0ee774fe92e5d0bc84d1d6729e8c538c67e8aba)
2000-07-21make protoGerald Carter1-0/+13
(This used to be commit e4af400ed6580c04bcaf3a28fe8aeaa0cdbd4dcf)