summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
* fix for IRIX compiler error messagesHerb Lewis2000-09-261-3/+3
|
* first cut at smbcontrol program. It currently allows syntax like:Andrew Tridgell2000-09-131-0/+43
| | | | | | | smbcontrol nmbd debug 7 smbcontrol smbd debug 9 smbcontrol 3278 debug 1 smbcontrol nmbd force-election
* fixed a race in the pipe() setup in sys_select()Andrew Tridgell2000-09-121-1/+1
|
* - fixed some memory leaks in the messages codeAndrew Tridgell2000-09-121-1/+28
| | | | - added a MSG_PING message for performance testing.
* - changed the msg_type to be an int instead of an enum so that it isAndrew Tridgell2000-09-122-14/+19
| | | | | | | easier to add new message types to messages.h without breaking old binaries - added a MSG_FORCE_ELECTION message to force nmbd to hold an election
* much nicer message interface. We now register dispatch functions,Andrew Tridgell2000-09-122-26/+62
| | | | | | | | | allowing new bits of code or vfs modules to register functions without impacting on the messaging code itself. Also note that multiple registrations for the same message type are possible allowing the same message to be delivered to multiple parts of the code (possibly useful for reload messages).
* the first cut of the internal messaging system.Andrew Tridgell2000-09-112-44/+254
| | | | | The motivation for this system is to replace the UDP message for oplocks, but this commit only does the "set debug level" message.
* Changes from APPLIANCE_HEAD (per Tim Potter):David O'Neill2000-09-011-0/+75
| | | | | | | | | | | | | | | | | | | - make proto - addition of function to convert from errno values to NT status codes (source/lib/error.c) - purge queue done without full access permission will purge only the jobs owned by that user, rather than failing. - unlock job database tdb before sending job to printer - in print_job_start(), ensure that we don't pick a jobid with an existing temporary file that may be owned by another user, as it causes silent failures. - fixes for printer permission checking for NT5 clients (source/include/rpc_spoolss.h, source/printing/nt_printing.c, source/printing/printing.c, source/rpc_server/srv_spoolss_nt.c) - change from uint8 to 'enum SID_NAME_USE' (source/rpc_server/srv_lsa.c) - fixed memory leaks for win95 driver download process (source/smbd/lanman.c) - properly free prs_structs and dacl in testsuite/printing/psec.c
* -U% should be an anonymous connection. Fixed bug whereGerald Carter2000-09-011-1/+2
| | | | | | | | | | | the password was being set to "" instead of NULL. ..and yes Elrond, I'll merge this into TNG. P jerry
* Implemented AbortPrinter() from Gerald's Win32 test code. Just purge allJeremy Allison2000-08-301-0/+2
| | | | | | possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy.
* added -P (for no prompt) and -A <authfile> optionsGerald Carter2000-08-291-22/+92
| | | | jerry
* needed to use strwicmp() in smbclient code, so I moved it to util_str.cGerald Carter2000-08-291-0/+30
| | | | | | | | and made it non-static --jerry
* made reopen_logs() always re-open logs, not try and be smart about notAndrew Tridgell2000-08-281-37/+34
| | | | | re-opening in some circumstances. This fixes a problem where a HUP does not re-open logs and leaves the log open on a unlinked file.
* - fixed the %U macro so that the old (and documented) semantics workAndrew Tridgell2000-08-251-2/+13
| | | | | | | | | again. This got broken with one of the substitute.c updates a couple of months ago. - also fixed %u to return the username from the current_user structure when called via a method that does not have direct access to the username. I cache the uidtoname() result to prevent thrashing nss.
* Added code to do SID to uid/gid conversion. Needed for ACL support.Jeremy Allison2000-08-231-2/+2
| | | | Jeremy.
* oops. must return "" string and length zero when strlen(filebuf) == 0Luke Leighton2000-08-181-13/+16
|
* getfileline() - line with length of zero -> filebuf[strlen(filebuf)-1]Luke Leighton2000-08-181-10/+13
| | | | is NOT ok.
* Reverted the change Luke made. Removed IS_BITS_SET_XX macros.Jeremy Allison2000-08-141-13/+7
| | | | | | | | Do not re-add them. These macros are unsafe as they are not understood. Change all TNG code using them to correct '&' and '|' please. IS_BITS_SET_ALL was being used in cmd_interp.c when IS_BITS_SET_SOME should have been used. Jeremy.
* hey, jerry: turns out you _have_ converted to get_safe_nt_errmsg!!!Luke Leighton2000-08-141-2/+4
| | | | | | [got confused with which way dirdiff was going :)]. ... but you forgot to update TNG's lib/cmd_interp.c...
* jeremy,Luke Leighton2000-08-141-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.
* fixed unistr_to_ascii to deal with NULL src stringsGerald Carter2000-08-121-14/+14
| | | | jerry
* reworked talloc() to in order to help track down invalidGerald Carter2000-08-121-25/+26
| | | | | | | | | | | | | | | | | 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
* Tidied up security rights definitions.Jeremy Allison2000-08-101-4/+4
| | | | 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.
* 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
* Fixed memory leak with NT tokens.Jeremy Allison2000-08-091-2/+15
| | | | | | Added debug messages to se_access_check(). Added FULL_ACCESS acl to default acl on printers. 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-081-220/+149
| | | | Jeremy.
* All changes related to rpcclient...Gerald Carter2000-08-081-2/+2
| | | | | | | | | | | | | - 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
* 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 an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison2000-08-031-3/+5
| | | | | | | 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.
* Started to canonicalize our handling of uid -> sid code in order toJeremy Allison2000-08-021-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | 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-011-13/+7
| | | | | | | | NT_STATUS_XXX). Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more obscure way. Jeremy.
* More work on rpcclient...Gerald Carter2000-07-311-4/+2
| | | | | | | | | | | | * 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
* Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison2000-07-273-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* if the sids are not the same pointer and either of the sids are NULLAndrew Tridgell2000-07-251-0/+3
| | | | then the two sids are not equal
* Added EnumPorts() and fixed up some problemsGerald Carter2000-07-211-48/+27
| | | | | | | | | with the other spoolss client calls. Also cleaned up output for 'help' command. jerry
* Instead of handing back a string (which might be a DNS name or an IPChristopher R. Hertel2000-07-191-33/+85
| | | | | | | | | | | | | | | | | | string), the wins_srv module now hands back a struct in_addr when it's called. It caches the IP address once it has been looked up. The IP is cleared (and must be looked up again) if the 'wins server' parameter is reread, or if the node is marked 'dead'. A dead node will not be re-tried for 10 minutes (per a #define in wins_srv.c). As it was, the code was reading the WINS server name or IP directly from lp_wins_server. That's okay, except that if the value was expressed as a name, then a DNS lookup would be done every time the client wanted to talk to the server. I still need to work out the implications of failover regarding the 'unicast subnet' list. Chris -)-----
* First cut toward adding WINS server failover.Christopher R. Hertel2000-07-191-0/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | *Note: failover doesn't actually work yet!* It's just that the code I'm adding provides all of the pieces necessary. I do have one big question. Something that I'll have to ask Jeremy, I'm thinkin'. In nmbd/nmbd_subnetdb.c the IP of the WINS server is used to set up the Unicast subnet. ...so what happens if the WINS server changes? My guess is either: a) nothing. b) I'd have to change the unicast subnet entry whenever the WINS server changes. Urq. BTW, the lp_wins_server() function no longer returns the WINS server name or IP. It returns the list of WINS servers entered in smb.conf. To get the currently 'live' WINS server, use the wins_srv() function. Fun, eh? Chris -)-----
* I really didn't like the way generic arrays (lists) wereGerald Carter2000-07-181-0/+321
| | | | | | | | | | | | | implemented in util_array.c so I wrote a smaller (and simplier package). I would like to replace the use of util_array.c functions in the rest of the source tree if no one objects. This will be an interface change, but not really a difference in the functionality provided. --jerry
* Added some debugs.Tim Potter2000-07-171-13/+27
| | | | | Changed interface to se_access_check to take a user struct instead of each bit as a separate parameter.
* Fixed a bug in cmd_interp.c where if user%pass was entered onGerald Carter2000-07-142-206/+3
| | | | | | | | | | | | the command line, the password would still be cached in memory in plain text for the lifetime of the rpcclient command line session. removed loopback connection functions from msrpc-client.c since we don't support that in the server code now anyways. simplify, simplify, ... --jerry
* Uninitialised variables.Tim Potter2000-07-131-0/+2
|
* Fixed a bug in parsing the command line.Gerald Carter2000-07-101-1/+1
| | | | jerry
* Fixes for various compile warnings on Solaris 8.Tim Potter2000-07-101-1/+2
|
* Moved winbind client functions from various odd locations toTim Potter2000-07-101-64/+0
| | | | | | nsswitch/wb_client.c Merge of nsswitch/common.c rename to nsswitch/wb_common.c from TNG.
* Added some useful debugging stuff.Tim Potter2000-07-101-10/+66
| | | | Fixes for se_access_check() when you are the owner of the object.
* More rpcclient merge issues:Gerald Carter2000-07-073-9/+221
| | | | | | | | | | | | * fixes some readline bugs from the merge * first attempt at commands (spoolenum almost works) * no changes to existing functions in HEAD; only additions of new functions. I'll weed out what I can as I go. --jerry
* Rewrite of se_access_check() function. Added comments and fixed a bunch ofTim Potter2000-07-061-189/+287
| | | | | bugs. I think there is a problem though with the permissions granted when SEC_RIGHTS_MAXIMUM_ALLOWED is passed as the permissions requested.