summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
2000-08-14jeremy,Luke Leighton1-11/+15
please do not remove IS_BITS_SET_XXX macros just because you happen "not to like them". whilst still working on merging, you are not responsible for this code, therefore do not hinder its development whilst people are attempting to do merges. after the merge from TNG to cvs main is completed, you can do what the hell you like. thank you. jerry, please could you consider adding underlying routines (in this case get_safe_smb_errstr()) instead of reverting to a [less secure] previous coding method. thanks. (This used to be commit b2e044f89de7cb12fd14540d5d7d5070951ce2fb)
2000-08-14minor formatting fixes.Gerald Carter1-9/+9
jerry (This used to be commit 95355d2cf26f51b1f928b8a020a4a731483be0b8)
2000-08-14fix for new_smb_io_relarraystr() and new_smb_io_relstr()Gerald Carter1-2/+2
to use spool_smb_io_unistr() as this does not call prs_align() befrore parsing the UNISTR. Parsing a void* buffer from an RPC should not be aligned on 4 byte boundaries. Don't think this change affects any marshalling code, only unmarshalling... jerry (This used to be commit bc154e8522a75540a8504195c1e6f45739167e6b)
2000-08-12removed the prs_align in spoolss_smb_io_unistr() (JF, please check)Gerald Carter1-3/+36
as it was throwing things off when parsing buffers passed in SPOOLSS RPCs fixed the unmarshalling of UNISTR arrays to be double NULL terminated jerry (This used to be commit 236f19659cea87cc35128990954d30c43114b889)
2000-08-12fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc'sGerald Carter1-29/+37
of 0 bytes. jerry (This used to be commit 3fcc59ba928250759bbf3ef46d7c118950a5ba6f)
2000-08-12FIxed some unmarshalling problems with relstr and unistr arraysGerald Carter3-200/+163
jerry (This used to be commit ce2d20395ae3d41d55030427f4b7b44ce87c605e)
2000-08-12fixed unistr_to_ascii to deal with NULL src stringsGerald Carter1-14/+14
jerry (This used to be commit 8e95aae1709a9be28d6e25ff6f0fdc729dc09274)
2000-08-12reworked talloc() to in order to help track down invalidGerald Carter2-25/+32
memory access. Tridge, I don't think using 0xdeadbeef for size allocations of 0 is going to work. I ended up having to use NULL as much code that works on UNISTR checks to see if the buffer ptr is NULL. So valid code ends up with a seg fault. Rather than rewriting it all, I added a DEBUG_TALLOC #ifdef in talloc.h that sets a macro BAD_PTR. This is the value assigned to ptr for an allocation of 0 bytes. jerry (This used to be commit 233b9cffa2350552d9f775f791d5d5e0464a1ed4)
2000-08-12removed (void) typecast from SMB_ASSERTGerald Carter1-1/+1
jerry (This used to be commit f806881e6c2c94c03fb7e70d92cd0a5a3fc30fbd)
2000-08-11Fixed the problem with UNISTR marshalling in a buffer5 struct.Jeremy Allison2-53/+25
The smb_io_unistr() code called a prs_align, this was not being counted in the size or taken account of in the offset calculation. Fixed size_ calculation to always return a size a multiple of 4 and also set the offset correctly. This fixes the problem I saw and will hopefully fix the problem HP reported. JF please check this change. Jeremy. (This used to be commit ceba9f3dcdb4bddae17ec0024692c9074086302d)
2000-08-11First shot at actually *doing* WINS failover.Christopher R. Hertel1-1/+8
If libsmb/namequery.c:name_query() times out while doing a non-broadcast query, I mark that WINS server 'dead'. Note that I don't try the new WINS server. I think I can get that working too. This is only for queries, not registrations. The biggest problem is that I may have to fiddle with the UNICAST SUBNET, but I need to check talk that over with someone (Jeremy?) before I hack at it. I can't actually test the above change, I'm 'fraid. I'm getting: 4 errors detected in the compilation of "rpc_server/srv_spoolss_nt.c". in head branch. Chris -)----- (This used to be commit 40ae638866e3d826ccd5d827672634959c31b039)
2000-08-11Fix case where volumename could be returned as UNIX charset or DOS codepageJeremy Allison1-2/+6
depending on where it came from. Jeremy. (This used to be commit cfbf78085d48671e5be382e7486953a85a893be1)
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 Allison7-39/+30
Jeremy. (This used to be commit e466c863f5540e13776f4477b6d58e3fbfe7276d)
2000-08-10Removed requirement that sid have an owner before being interpreted.Jeremy Allison1-18/+9
Thanks to Elrond for pointing this out. Jeremy. (This used to be commit 1d9a5494f8214b8d6171073f4090687a8535d78c)
2000-08-10Working on spoolss_getprinterdriver() as it does not display all theGerald Carter2-6/+21
dependentfiles. jery (This used to be commit 206565368b887ba83791efe018f24175e6f31137)
2000-08-10working on the unmarshalling of dependentfiles to a DRIVER_INFO_3Gerald Carter1-2/+9
struct. Not wuite there. jerry (This used to be commit 1a145977f09654fc51ebcd40ef7a2aa69aa96cfb)
2000-08-10code formatting cleanupGerald Carter1-6/+0
jerry (This used to be commit 4bc5b8aa345b963e1247c6a364ba48a08fbd9764)
2000-08-10deal with allocation size of 0 in prs_unistr when UNMARSHALLINGGerald Carter1-24/+30
jerry (This used to be commit 26a73a70e282a5e46cc2b6fe7bc09b406724c9dd)
2000-08-10Deal will NULL UNISTR in unistr_to_asciiGerald Carter1-13/+21
jerry (This used to be commit cfa4c878a2ccaf346940f8f4a201737e185f76d6)
2000-08-10talloc returns 0xdeadbeef when asked to allocate 0 bytesGerald Carter1-19/+29
jerry (This used to be commit df51dc32f6ffc4fe2cebfaae5079417aad1ff34d)
2000-08-10Needed to add the SHARED attribute bit when creating a printerGerald Carter2-10/+15
on a Samba host. Also needed to add an option to pass the share name (printer name) on the command line. And fixed the checking of the return code for spoolss_r_addprinterex() jerry (This used to be commit 880e81161640cd38540b06d982c592cbada51d40)
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-09make protoGerald Carter1-2/+2
(This used to be commit ad74885e4730da2a15ff00e13f490f3f0b1be10d)
2000-08-09More work on AddPrinterDriver() and AddPrinterEx() client RPC'sGerald Carter6-64/+74
Also fixed init_unistr() to deal with a NULL source character string. -jerry (This used to be commit 8ecd5dd52a6bd867f5d117352048ee43ce7254d9)
2000-08-09Fixed memory leak with NT tokens.Jeremy Allison4-50/+103
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-09got error code right for printer update/add failureAndrew Tridgell1-3/+3
(This used to be commit 0d00d2ec258b36d73e865f06d5d11745d7cdafa9)
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)