summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Previous fix was incorrect. len in string_sub and all_string_sub isJeremy Allison2002-07-181-4/+4
| | | | | | number of *bytes*. >= check was correct, the len=0 case needed changing to len = ls + 1. Jeremy.
* Add useful VALGRIND #ifdef.Jeremy Allison2002-07-181-0/+2
| | | | Jeremy.
* Fixed off-by-one in all_string_sub also.Jeremy Allison2002-07-181-1/+1
| | | | Jeremy.
* Formatting fixups.Jeremy Allison2002-07-181-66/+73
| | | | Jeremy.
* Another bug found by valgrind. Don't AND a src length of -1.Jeremy Allison2002-07-181-1/+2
| | | | Jeremy.
* virtual registry framework with initial printing hooks.Gerald Carter2002-07-181-0/+414
|
* The previous code would not allow things like string_sub(str, "\\", "/", 0).Gerald Carter2002-07-181-1/+1
| | | | | | It complained about an overflow of 0 bytes. Jeremy please check since you modified this last.
* don't use C++ comments in C - it doesn't work on many compilersAndrew Tridgell2002-07-151-1/+1
|
* fixed a problem with getgroups() where it could include our currentAndrew Tridgell2002-07-151-0/+36
| | | | | | | | | effective gid which could mean that the user gets group 0 in their group list for acl interpretation this is a replacement fix for the one richard did in 2.2 (which didn't cope wiith variable behaviour depending on which nss module was in use)
* addedd new (t)alloc_sub_* functionsSimo Sorce2002-07-142-31/+305
| | | | | they will get a const string and return a (t)alloced epanded one. also modified passdb/* stuff to use this one.
* make this a ZERO_STRUCTP for consitancy with the rest of Samba.Andrew Bartlett2002-07-131-1/+1
|
* fixed a stdin bug in XFILE that prevented 'print -' from workingAndrew Tridgell2002-07-131-4/+4
|
* The changes in make_sec_desc to make us match W2K broke the ↵Jeremy Allison2002-07-121-1/+1
| | | | | | | | | marshalling/unmarshalling of security descriptors. We need to calculate the maximum offset and set the offset back after reading/writing every field in the SEC_DESC. This was *nasty* to find.... Jeremy.
* *Experimental* new large-scaling printer code. Splits printing.tdb intoJeremy Allison2002-07-111-3/+3
| | | | | | | a separate tdb per printer, but only keeps (currently one) tdb open at a time (although this is easily changed by changing a #define). Needs scalability testing with large numbers of printers now.... Jeremy.
* some support functions to ease the next commit.Simo Sorce2002-07-091-6/+96
|
* the last WINS update broke self registration when we are a WINSAndrew Tridgell2002-07-091-7/+0
| | | | | | | | | | | | | server. The real problem is all the special cases we had for when we are a wins server as opposed to when we are using a 'real' wins server. This patch removes the special cases. We now accept non-broadcast packets from ourselves and we use ourselves as a wins server when we are one. This gets rid of the special cases and simplifies things quite a bit. It all seems to work, but there are bound to be problems found later.
* Kill off const warnings - add a pile of const to various places.Andrew Bartlett2002-07-081-1/+1
|
* (this should have been part of the previous commit)Andrew Bartlett2002-07-081-1/+37
| | | | | | | | | | Add a function to display 'sid types' as strings - makes rpcclient outptut and DEBUG() logs much eaiser to understand. Move the enum for SID types to smb.h, becouse is really isn't LSA specific any more. Andrew Bartlett
* Fix the forword prototype to be a static for this static function.Andrew Bartlett2002-07-031-1/+1
|
* Address the string_sub problem by changing len = 0 to mean "no expand".Jeremy Allison2002-07-022-41/+77
| | | | | | Went through and checked all string_subs I could to ensure they're being used correctly. Jeremy.
* used findstatic.pl to make some variables static and remove some deadAndrew Tridgell2002-07-017-146/+29
| | | | code
* bias the lookup sorting towards directly reachable IPsAndrew Tridgell2002-07-011-0/+8
|
* don't warn on non-existant files in map_file(), let the caller handle any ↵Andrew Tridgell2002-06-281-1/+2
| | | | warning
* don't warn on the loading of zero length files. This fixes theAndrew Tridgell2002-06-281-1/+1
| | | | 'valid.dat' warning
* fixed a link problem with global_in_nmbdAndrew Tridgell2002-06-271-2/+2
|
* The next phase in the WINS rewrite!Andrew Tridgell2002-06-272-57/+55
| | | | | | | | | | | | | | | | We now cope wiith multiple WINS groups and multiple failover servers for release and refresh as well as registration. We also do the regitrations in the same fashion as W2K does, where we don't try to register the next IP in the list for a name until the WINS server has acked the previos IP. This prevents us flooding the WINS server and also seems to make for much more reliable multi-homed registration. I also changed the dead WINS server code to mark pairs of IPs dead, not individual IPs. The idea is that a WINS server might be dead from the point of view of one of our interfaces, but not another, so we need to keep talking to it on one while moving onto a failover WINS server on the other interface. This copes much better with partial LAN outages and weird routing tables.
* This commit finally gives us multiple wins server groups. We nowAndrew Tridgell2002-06-261-16/+245
| | | | | | | | | | | | | | | | | | | | | | | | accept an extended syntax for 'wins server' like this: wins server = group1:192.168.2.10 group2:192.168.3.99 group1:192.168.0.1 The tags before the IPs don't mean anything, they are just a way of grouping IPs together. If you use the old syntax (ie. no ':') then an implicit group name of '*' is used. In general I'd recommend people use interface names for the group names, but it doesn't matter much. When we register in nmbd we try to register all our IPs with each group of WINS servers. We keep trying until all of them are registered with every group, falling back to the failover WINS servers for each group as we go. When we do a WINS lookup we try each of the WINS servers for each group. If a WINS server for a group gives a negative answer then we give up on that group and move to the next group. If it times out then we move to the next failover wins server in the group. In either case, if a WINS server doesn't respond then we mark it dead for 10 minutes, to prevent lengthy waits for dead servers.
* made the wins list handling a littler clearerAndrew Tridgell2002-06-261-9/+5
|
* mumble ... fix typo ... mumbleAndrew Tridgell2002-06-261-1/+1
|
* fixed we_are_multihomed() to cope with dynamic interfaces (ie. don'tAndrew Tridgell2002-06-261-6/+1
| | | | cache the result!)
* - completely rewrote the wins_srv.c code. It is now much simpler, andAndrew Tridgell2002-06-261-303/+90
| | | | | | | | | | | | | | gives us a good grounding to properly support multiple wins servers for different interfaces (which will be coming soon ...) - fixed our wins registration failover code to actually do failover! We were not trying to register with a secondary wins server at all when the primary was down. We now fallback correctly. - fixed the multi-homed name registration packets so that they work even in a non-connected network (ie. when one of our interfaces is not routable from the wins server. Yes, this really happens in the real world).
* fixed a bug in handling select in the main daemon - this stops the daemon ↵Andrew Tridgell2002-06-251-12/+6
| | | | spinning if a signal is received at an inconvenient moment
* Changed level of "bind succeded on port %d" debug to 10.Tim Potter2002-06-211-1/+1
|
* Fixed compiler warning.Tim Potter2002-06-201-1/+1
|
* more debug classess activatedSimo Sorce2002-06-181-1/+1
|
* compile warngin fixes merged from 2.2Gerald Carter2002-06-171-1/+1
|
* Fixed typo in debug.Tim Potter2002-06-171-1/+1
|
* Simplify this code further. Just substitute %H, and let the normal codeAndrew Bartlett2002-06-151-36/+0
| | | | | | paths handle the rest later. Andrew Bartlett
* Unsused function since last commitAndrew Bartlett2002-06-151-34/+0
|
* Rework much of the service.c code:Andrew Bartlett2002-06-151-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this execise is to give the 'security>=user' code a straight paper path. Security=share will sill call authorise_login(), but otherwise we avoid that mess. This allow *much* more accurate error code reporting, beocuse we don't start pretending that we can use the (nonexistant) password etc. Also in this patch is code to create the 'homes' share at session setup time (as we have done in the past - been broken recently) and to record this on the user's vuser struct for later reference. The changes here should also allow for much better use of %H (some more changes to come here). The service.c changes move a lot of code around, but are not as drastric as they look... (Also included is a fix to srv_srvsvc_nt.c where 'total_entries' not '*total_entries' was compared). This code is needs testing, but passes my basic tests. I expect we have lost some functionality, but the stuff I had expected to loose was already broken before I started. In particular, we don't 'fall back' to guest if the user cannot access a share (for security=user). If you want this kind of stuff then you really want security=share anyway. Andrew Bartlett
* This patch does 2 things:Andrew Bartlett2002-06-151-0/+57
| | | | | | | | | | | | | | | It extends the 'server mutex' to conver security=server, becouse the connection race condition exists here too, and while people *should* use security=domain, some sites don't.... (This probably should be done in 2.2 as well). Also, start to actually extract and use the information that the remote server returns in the info3 struct. The server mutex code is now in a new file. Andrew Bartlett
* Add back sys_getpwnam() and freinds to the system.c interface, but don'tAndrew Bartlett2002-06-154-5/+29
| | | | | | use the silly cache any more. Also add group functions and fix a few callers. Andrew Bartlett
* moved lp_list_* functions away from param/loadparm.c, put int lib/util_str.cSimo Sorce2002-06-143-6/+188
| | | | | and renamed to str_list_* as it is a better name. Elrond should be satisfied now :)
* Patch from ctrlsoft to make the pluggable passdb subsystem use an lp_listAndrew Bartlett2002-06-141-2/+2
| | | | | | | | | | | | | rather than a string when configuring mulitple backends. Also adjust some of the users of get_global_sam_sid() to cope with the fact that it just might not exist (uninitialised, can't access secrets.tdb). More places need conversion. Add some const and remove silly casts. Andrew Bartlett
* Patch (from ctrlsoft <jelmer@nl.linux.org>) to poptify testparm, and theAndrew Bartlett2002-06-142-3/+19
| | | | | | modifications required to suppress the const warnings. Andrew Bartlett
* Add const, kill of useless casts and therefore eliminate warnings.Andrew Bartlett2002-06-141-3/+3
| | | | Andrew Bartlett
* Ensure we save any older SIGALRM signal handler.Jeremy Allison2002-06-133-7/+11
| | | | Jeremy.
* Latest patch from metze <metze@metzemix.de> to move most of samba acrossAndrew Bartlett2002-06-131-4/+27
| | | | | | | | | | | to using SIDs instead of RIDs. The new funciton sid_peek_check_rid() takes an 'expected domain sid' argument. The idea here is to prevent mistakes where the SID is implict, but isn't the same one that we have in the struct. Andrew Bartlett
* few fixes from Elrond(elrond@samba-tng.org) and Billy ↵Simo Sorce2002-06-111-4/+8
| | | | O'Connor(billy@oconnoronline.net)
* Remove "sids.h" as it really wasn't being used anywhere, and was exportingAndrew Bartlett2002-06-101-2/+0
| | | | | | | | | the (now static) global_sam_sid. The only place it was being used was to return global_sid_NULL to some uid->sid functions - and I'm not convinced this is correct in any case. Andrew Bartlett