summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* reworked talloc() to in order to help track down invalidGerald Carter2000-08-122-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
* removed (void) typecast from SMB_ASSERTGerald Carter2000-08-121-1/+1
| | | | jerry
* Updated by Patrick Powell <papowell@lprng.org>John Terpstra2000-08-121-106/+195
|
* Fixed the problem with UNISTR marshalling in a buffer5 struct.Jeremy Allison2000-08-112-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.
* First shot at actually *doing* WINS failover.Christopher R. Hertel2000-08-111-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 -)-----
* Fix case where volumename could be returned as UNIX charset or DOS codepageJeremy Allison2000-08-111-2/+6
| | | | | depending on where it came from. Jeremy.
* Added "add_printer_hook" call to update printer for Win9x clients.Jeremy Allison2000-08-101-62/+68
| | | | | Patch from John Reilly <jreilly@hp.com>. Jeremy.
* Tidied up security rights definitions.Jeremy Allison2000-08-107-39/+30
| | | | Jeremy.
* Removed requirement that sid have an owner before being interpreted.Jeremy Allison2000-08-101-18/+9
| | | | | Thanks to Elrond for pointing this out. Jeremy.
* Working on spoolss_getprinterdriver() as it does not display all theGerald Carter2000-08-102-6/+21
| | | | | | | | dependentfiles. jery
* working on the unmarshalling of dependentfiles to a DRIVER_INFO_3Gerald Carter2000-08-101-2/+9
| | | | | | | | | | struct. Not wuite there. jerry
* code formatting cleanupGerald Carter2000-08-101-6/+0
| | | | jerry
* deal with allocation size of 0 in prs_unistr when UNMARSHALLINGGerald Carter2000-08-101-24/+30
| | | | jerry
* Deal will NULL UNISTR in unistr_to_asciiGerald Carter2000-08-101-13/+21
| | | | jerry
* talloc returns 0xdeadbeef when asked to allocate 0 bytesGerald Carter2000-08-101-19/+29
| | | | jerry
* Needed to add the SHARED attribute bit when creating a printerGerald Carter2000-08-102-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
* Fixed bug in new printer access check code. If PRINTER_ALL_ACCESS is changedJeremy Allison2000-08-091-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.
* make protoGerald Carter2000-08-091-2/+2
|
* More work on AddPrinterDriver() and AddPrinterEx() client RPC'sGerald Carter2000-08-096-64/+74
| | | | | | | | Also fixed init_unistr() to deal with a NULL source character string. -jerry
* Fixed memory leak with NT tokens.Jeremy Allison2000-08-094-50/+103
| | | | | | Added debug messages to se_access_check(). Added FULL_ACCESS acl to default acl on printers. Jeremy.
* got error code right for printer update/add failureAndrew Tridgell2000-08-091-3/+3
|
* add printer admin docsAndrew Tridgell2000-08-091-26/+16
|
* added printer admin optionAndrew Tridgell2000-08-095-46/+51
| | | | any user in that list can do anything to a printer
* Fixed AddPrinterDriver()Gerald Carter2000-08-091-1/+0
| | | | jerry
* fixed help stringAndrew Tridgell2000-08-091-1/+2
|
* Found the sec_ctx_stack overflow - a become_root() should have been anJeremy Allison2000-08-081-1/+1
| | | | | unbecome_root() - typo. Jeremy.
* Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.Jeremy Allison2000-08-081-4/+17
| | | | Jeremy.
* Changed the sec desc access checks to match the spec. Needs testing.Jeremy Allison2000-08-082-223/+149
| | | | Jeremy.
* make protoGerald Carter2000-08-081-2/+14
|
* cleanup in init_unistr2_from_unistr()Gerald Carter2000-08-081-27/+19
| | | | --jerry
* All changes related to rpcclient...Gerald Carter2000-08-087-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
* it is not my day it seems. :-(Gerald Carter2000-08-051-1/+1
| | | | | | | Fixed missing ) j-
* removed the for() loop to copy the buffer in init_unistr2_from_unistr()Gerald Carter2000-08-051-3/+2
| | | | | | | | | | | Replaced with a memcpy() Forgot to commit this a few moments ago j-
* Fixed bug in init_unistr2_from_unistr() found by Elrond.Gerald Carter2000-08-051-1/+1
| | | | | | | | | | Thanks :-) j-
* Adding build file.John Terpstra2000-08-041-0/+14
|
* Adding build system files for Caldera OpenLinux.John Terpstra2000-08-042-0/+311
|
* make protoGerald Carter2000-08-041-1/+1
|
* spoolss_addprinterex() was adding the printer and returning theGerald Carter2000-08-042-26/+28
| | | | | | | | | correct handle, but was deleting the connection to the server. Doh!! --jerry
* Fixed up se_access_check() to use the token list from the user structJeremy Allison2000-08-041-82/+32
| | | | | as the SID list. Now to go through and tidy up the algorithm. Jeremy.
* Added my course notes. Had asked Jeremy some weeks ago.Volker Lendecke2000-08-043-0/+2804
| | | | | | It's german language, feel free to remove it again. Volker
* make protoGerald Carter2000-08-041-3/+10
|
* clunky support for calling AddPrinterEx(). The code currently reportsGerald Carter2000-08-043-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
* After talking with Jeremy and JF (and staring at packet traces betweenGerald Carter2000-08-042-3/+55
| | | | | | | | | | NT <-> NT), I've come to realize that UNISTR2 strings should be NULL terminated. jerry
* In cli_error() return ENOENT when an ERROR_INVALID_NAME is received insteadTim Potter2000-08-041-0/+1
| | | | of the generic EINVAL.
* Fixed up the user/group contexts when using authenticated pipes.Jeremy Allison2000-08-046-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.
* Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison2000-08-039-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.
* Much though I hate to admit it - JF was completely correct. I cannotJeremy Allison2000-08-021-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.
* Started to canonicalize our handling of uid -> sid code in order toJeremy Allison2000-08-0213-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.
* Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need ↵Jeremy Allison2000-08-0121-139/+97
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* Added print job substitutions for %{printername}, %{sharename} and %{portname}Jeremy Allison2000-08-016-37/+93
| | | | | | from the NT printer tdb. Also added checks for time restrictions before allowing a job to print. Jeremy.