summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2002-07-20Add support for duplicating stderr into our logfiles.Andrew Bartlett2-17/+27
This is for two things: To allow panic actions etc to pump out backtraces to stderr and to allow vangrind to put its stuff in a logfile - making it possible to debug smbd when launched from inetd. I've also cleaned up some of the duplicate names in procedures between smbd and nmbd. Andrew Bartlett (This used to be commit 4bcb32731984b4aef1d4911a168a4e7a10d32fd4)
2002-07-20Add a wrapper for dup2() to our system.cAndrew Bartlett1-0/+10
Andrew Bartlett (This used to be commit b24b6307f6b40e559aec441e0ebab8f666b87d9f)
2002-07-20fixed a logic error in the sorted_tree_find_child() routineGerald Carter1-32/+63
that caused a valid search to fail. The printing registry view now works again. (This used to be commit 2050859f03493d5135984ce1e42baf8f1f2566b9)
2002-07-19fixed seg fault in registry frontend caused by trying toGerald Carter1-0/+2
use a destroyed TALLOC_CTX* (This used to be commit 432b9f8d7c20fbf3b2a0906c8a93272abbe43fb6)
2002-07-19Never ignore valgrind messages :-). Don't reference before the startJeremy Allison1-1/+1
of a string.... Jeremy. (This used to be commit 35f0fbd254c222d015bdc582277b90efbaade81e)
2002-07-19* refactored registry operations some. subkey lists andGerald Carter1-15/+32
registry values are now passed around in containers (REGSUBKEY_CTR & REGVAL_CTR) which each possess a TALLOC_CTX. * removed subkey_specific_fn() from REGISTRY_OPS. Is implemented in the form of a wrapper * temporarily broke the printing registry ops. * implemented inheritence for the data_p of nodes in a SORTED_TREE * All REGISTRY_KEY instances now store a valid REGISTRY_HOOK since the default REGOSTRY_OPS structure is stored in the root of the cache_tree. * Probably some other change I forgot.... T (This used to be commit e7b55e8f017e638342d9c8c1a9259000745a0298)
2002-07-19fixed line buffer mode in XFILEAndrew Tridgell1-1/+1
thanks to tim for finding this bug (This used to be commit 91bff7545405ba88bc721f358ccdbf0aac0e3ba6)
2002-07-18Previous fix was incorrect. len in string_sub and all_string_sub isJeremy Allison1-4/+4
number of *bytes*. >= check was correct, the len=0 case needed changing to len = ls + 1. Jeremy. (This used to be commit 06a4a6d30ade5ea4d123ae640393677c9a510763)
2002-07-18Add useful VALGRIND #ifdef.Jeremy Allison1-0/+2
Jeremy. (This used to be commit 07716f3a2316fedfe9a3210fd1dad8f7d1e4d9c8)
2002-07-18Fixed off-by-one in all_string_sub also.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 8b0e47fc1f00c76dfccb6c2b58188d9a5ae67c65)
2002-07-18Formatting fixups.Jeremy Allison1-66/+73
Jeremy. (This used to be commit 4aa922a1afdd538f51d5eff4cb7af2694a88c591)
2002-07-18Another bug found by valgrind. Don't AND a src length of -1.Jeremy Allison1-1/+2
Jeremy. (This used to be commit a67079882dd1b924d2e007e39b06da438533ef96)
2002-07-18virtual registry framework with initial printing hooks.Gerald Carter1-0/+414
(This used to be commit a43d9788fa8823d678ee72470421b980165ec2b0)
2002-07-18The previous code would not allow things like string_sub(str, "\\", "/", 0).Gerald Carter1-1/+1
It complained about an overflow of 0 bytes. Jeremy please check since you modified this last. (This used to be commit a5aad760061e21635319a9b5628990cf59b827ed)
2002-07-15don't use C++ comments in C - it doesn't work on many compilersAndrew Tridgell1-1/+1
(This used to be commit cf853314f9eda479c6f18bfc725fa0b5d88d0a38)
2002-07-15fixed a problem with getgroups() where it could include our currentAndrew Tridgell1-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) (This used to be commit cfc5ca3416cea5ea5d2ac34f5521cb6367e42cd2)
2002-07-14addedd new (t)alloc_sub_* functionsSimo Sorce2-31/+305
they will get a const string and return a (t)alloced epanded one. also modified passdb/* stuff to use this one. (This used to be commit d378ac1e2efb0efc9a0f983d69cf678ca6255fd5)
2002-07-13make this a ZERO_STRUCTP for consitancy with the rest of Samba.Andrew Bartlett1-1/+1
(This used to be commit 587a3d91b7226f4e96c4320322f62c6490a3c6ac)
2002-07-13fixed a stdin bug in XFILE that prevented 'print -' from workingAndrew Tridgell1-4/+4
(This used to be commit e66e354421b8be64a1b6774bde4d187532ee7690)
2002-07-12The changes in make_sec_desc to make us match W2K broke the ↵Jeremy Allison1-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. (This used to be commit 175d43980e57c25582d8ab859f5730283e82f3b2)
2002-07-11*Experimental* new large-scaling printer code. Splits printing.tdb intoJeremy Allison1-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. (This used to be commit b0909cfa14fc7ef29d2b98b56d52723570da782a)
2002-07-09some support functions to ease the next commit.Simo Sorce1-6/+96
(This used to be commit 4be1c882be56ae0fe18bb134a1513e0e6f6965b0)
2002-07-09the last WINS update broke self registration when we are a WINSAndrew Tridgell1-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. (This used to be commit 3e843d30158d05cdfba716bac7e5c0a75ae7a79c)
2002-07-08Kill off const warnings - add a pile of const to various places.Andrew Bartlett1-1/+1
(This used to be commit 1de04ec4735c19ec21cdef6e679cea17c734c5f6)
2002-07-08(this should have been part of the previous commit)Andrew Bartlett1-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 (This used to be commit fc9739861104df4ddc93efab3275275307e4fbb9)
2002-07-03Fix the forword prototype to be a static for this static function.Andrew Bartlett1-1/+1
(This used to be commit bb1aa5e1d2e4f71dfaab0ade24ed15d1b5fdfc33)
2002-07-02Address the string_sub problem by changing len = 0 to mean "no expand".Jeremy Allison2-41/+77
Went through and checked all string_subs I could to ensure they're being used correctly. Jeremy. (This used to be commit 17cae0d683be404be69554cd0e84117bdcc56c87)
2002-07-01used findstatic.pl to make some variables static and remove some deadAndrew Tridgell7-146/+29
code (This used to be commit 91ad9041e9507d36eb3f40c23c5d4df61f139ef0)
2002-07-01bias the lookup sorting towards directly reachable IPsAndrew Tridgell1-0/+8
(This used to be commit 514b91827a970a0041314af341b8c66a01668e4a)
2002-06-28don't warn on non-existant files in map_file(), let the caller handle any ↵Andrew Tridgell1-1/+2
warning (This used to be commit 98a119ee58286b708a54dcba9ffcfbdcf8cb6bba)
2002-06-28don't warn on the loading of zero length files. This fixes theAndrew Tridgell1-1/+1
'valid.dat' warning (This used to be commit 57101ef770e34ef9fd2ddcb5d9c9e9ad050e5e3d)
2002-06-27fixed a link problem with global_in_nmbdAndrew Tridgell1-2/+2
(This used to be commit 9a3e323ec261a1ee3a83f8c558583c3d4a53e06a)
2002-06-27The next phase in the WINS rewrite!Andrew Tridgell2-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 used to be commit 313f2c9ff7a513802e4f893324865e70912d419e)
2002-06-26This commit finally gives us multiple wins server groups. We nowAndrew Tridgell1-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. (This used to be commit e125f06058b6b51382cf046b1dbb30728b8aeda5)
2002-06-26made the wins list handling a littler clearerAndrew Tridgell1-9/+5
(This used to be commit d03efabc4dca842cafcd0edfa1eaa5b4d3e821b6)
2002-06-26mumble ... fix typo ... mumbleAndrew Tridgell1-1/+1
(This used to be commit 68be27cfea938d7f91a8ce1da39eb86c577f7719)
2002-06-26fixed we_are_multihomed() to cope with dynamic interfaces (ie. don'tAndrew Tridgell1-6/+1
cache the result!) (This used to be commit fc8aa198b16da24b68e45982eb45dd7d5fd089e1)
2002-06-26- completely rewrote the wins_srv.c code. It is now much simpler, andAndrew Tridgell1-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). (This used to be commit a049360d5b0d95a935b06aad43efc17d34de46dc)
2002-06-25fixed a bug in handling select in the main daemon - this stops the daemon ↵Andrew Tridgell1-12/+6
spinning if a signal is received at an inconvenient moment (This used to be commit d8d7dd523d897ea25a572c8f21903e94e8485404)
2002-06-21Changed level of "bind succeded on port %d" debug to 10.Tim Potter1-1/+1
(This used to be commit de00428ef12b597e5c29896bf961cfd7a1e122dd)
2002-06-20Fixed compiler warning.Tim Potter1-1/+1
(This used to be commit c29cef7f3408714d4e6e18906760d74016c6748f)
2002-06-18more debug classess activatedSimo Sorce1-1/+1
(This used to be commit 897e64d2e0c1d04ab93441ccaffe369bf43be46e)
2002-06-17compile warngin fixes merged from 2.2Gerald Carter1-1/+1
(This used to be commit 29874f4b8fecdc7cbd84d656dafce54cca49e0b1)
2002-06-17Fixed typo in debug.Tim Potter1-1/+1
(This used to be commit 41f036ab37274ce7cdd782ead764dd1a36ecba1d)
2002-06-15Simplify this code further. Just substitute %H, and let the normal codeAndrew Bartlett1-36/+0
paths handle the rest later. Andrew Bartlett (This used to be commit 09754ec797c4232d2016c7eff2e74044f28ebb7c)
2002-06-15Unsused function since last commitAndrew Bartlett1-34/+0
(This used to be commit 957c865cee7f799145f9f1d30dfd0d0a25d826cf)
2002-06-15Rework much of the service.c code:Andrew Bartlett1-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 used to be commit 4c0cbcaed95231f8cf11edb43f6adbec9a0d0b5c)
2002-06-15This patch does 2 things:Andrew Bartlett1-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 (This used to be commit 9b0dabdf4ec3bb45879caae76e03b57ccdad8b4b)
2002-06-15Add back sys_getpwnam() and freinds to the system.c interface, but don'tAndrew Bartlett4-5/+29
use the silly cache any more. Also add group functions and fix a few callers. Andrew Bartlett (This used to be commit 41d4b94077c118ecde2bf8792b9bb7ab71c6403e)
2002-06-14moved lp_list_* functions away from param/loadparm.c, put int lib/util_str.cSimo Sorce3-6/+188
and renamed to str_list_* as it is a better name. Elrond should be satisfied now :) (This used to be commit 4ae260adb9505384fcccfb4c9929cb60a45f2e84)