summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
2007-12-21Some C++ warningsVolker Lendecke3-5/+5
(This used to be commit 5ab82d4f574f2a2e2761e9e414c66a70aeffb05d)
2007-12-21Fix a missing prototype warningVolker Lendecke1-0/+1
(This used to be commit 93e5de23e7109432f554745b18c6d630a39f9c2b)
2007-12-21Remove some statics from md4.cVolker Lendecke1-7/+13
(This used to be commit 7e193c68b2a7eb16afc12379a4ceed41053d1eeb)
2007-12-21Add a singleton cacheVolker Lendecke1-2/+18
First user is yp_default_domain (This used to be commit c19363eb77fcc3e1bf3341e6373d38f1e91fc08f)
2007-12-21Make data_blob_string_const return null terminated stringsVolker Lendecke1-1/+1
... nobody was using it, so we're free to change it now :-) (This used to be commit 4b06c68482247d859ec30b8b1920706e43358989)
2007-12-21Remove next_token_nr_talloc and its associated globalVolker Lendecke1-77/+0
Only client.c and clitar.c used this, I think they should carry the static themselves. Also move the a bit funny routine toktocliplist to clitar.c, the only place where it is used. (This used to be commit 86d9412611fd99c21e15c71d30a3f95e35d8535b)
2007-12-21Convert the pwnam cache to memcacheVolker Lendecke1-53/+15
(This used to be commit 032c5589fe7f9f2fcb0f336e72517a81a720b6ce)
2007-12-21Add memcache_add_tallocVolker Lendecke1-0/+52
The first memcache API only had blobs, but we have quite a few objects that are more complex talloc'ed structues. The current one I'm looking at is the getpwnam cache, but there are others around. (This used to be commit ea0e5ad9a15c848904dee8cb2d3e392b6a894705)
2007-12-21Add a global cacheVolker Lendecke1-0/+36
It hurts, but I think this global variable is necessary for transition, and it has the potential to remove quite a few other global variables without messing with APIs too much. (This used to be commit c131d0dc52ec09c9227eff3d68877369c37aaed5)
2007-12-20fix dump printout when byte >= 0x80Herb Lewis1-1/+1
(This used to be commit e18fab269c7370a6670c56eeab60fd90feecf0b2)
2007-12-19Remove Get_Pwnam and its associated static variableVolker Lendecke2-49/+26
All callers are replaced by Get_Pwnam_alloc (This used to be commit 735f59315497113aebadcf9ad387e3dbfffa284a)
2007-12-19Samba Shared Repository - branch v3-2-test updated - ↵Volker Lendecke1-10/+8
initial-v3-2-unstable-716-g12cce3b On Tue, Dec 18, 2007 at 06:04:32PM -0600, Jeremy Allison wrote: > Fix valgrind error in dbwrap_rbt where rec_priv->node was > being accessed after free. VALOKER PLEASE CHECK THIS VERY > CAREFULLY !!!! This is a correct fix in that it fixes the > valgrind error, but it looks inelegant to me. I think if > I understood this code better I could craft a more subtle > fix. Still looking at it.... Thanks a lot. Fully correct. What about the attached little simplification? Volker (This used to be commit 5b72828600fb057a7aeb5f1a6fb6c23c23f28cd8)
2007-12-19Rename cache.[ch] to memcache.[ch]Volker Lendecke1-1/+1
cache.h conflicts with an XFS DMAPI include on "opi" :-( (This used to be commit b8db804e07cc19d406ba3892d6eecbe16132a89a)
2007-12-18We've finished with the old node once we've copied theJeremy Allison1-4/+4
keyval. Jeremy. (This used to be commit 39f3efbcc5fbdff1db1b12e5fc7368968f240993)
2007-12-18Fix valgrind error in dbwrap_rbt where rec_priv->node wasJeremy Allison1-1/+10
being accessed after free. VALOKER PLEASE CHECK THIS VERY CAREFULLY !!!! This is a correct fix in that it fixes the valgrind error, but it looks inelegant to me. I think if I understood this code better I could craft a more subtle fix. Still looking at it.... Jeremy. (This used to be commit 12cce3be2a24fd72106d747890caf6c7f29db43d)
2007-12-18Add a in-memory cacheVolker Lendecke1-0/+298
This is a more general API that caches data with a LRU scheme. See include/cache.h. No comments yet, I'm still working on it. But Jeremy has given me a hint in one of his checkins that he would like to make use of this now. The idea is that we get rid of all our silly little caches and merge them all into one cache that we can then very easily trim, for example even with a smbcontrol message if someone decides memory is tight. The main user is the stat cache, this patch also converts the getwd cache. More caches to come. (This used to be commit 7a911b35713538d82001a3c9f34152e293fe1943)
2007-12-17More static pstring elimination.Jeremy Allison1-26/+86
Jeremy. (This used to be commit 92acc0115d8d4111289c2ade1db7bb060ee908db)
2007-12-17Use the %*s feature of snprintf to remove anothe static fstring.Jeremy Allison1-9/+4
Jeremy. (This used to be commit 4ae4b2358688bf289305a2db0ed01b653ac073b2)
2007-12-17Fix bug #5121 (unix passwd sync not working on a streams basedJeremy Allison2-0/+5
system). Jeremy. (This used to be commit 545cd2139cfc9484b733693814d4724d37125942)
2007-12-16get rid of doschar_table[]Volker Lendecke1-54/+4
If I'm not completely blind, then check_dos_char is *only* used in the case when we can't mmap() valid.dat. To me this looks as if we initialize the 65536 bits in doschar_table[] with check_dos_char_slowly, use it once to initialize valid_table[] and *never* use them again. I think there's no point in keeping these 8k of modified memory around for an unlikely case (no "valid.dat") and even that only to use it exactly once. (This used to be commit 0bfea7259e4091c6d914528a0e65fc10d8a56fb8)
2007-12-16Tiny fixes to init_valid_table()Volker Lendecke1-2/+2
(This used to be commit a8948e0727b100945ab730d4d144ccbe219bbc94)
2007-12-16Make init_doschar_table() staticVolker Lendecke2-2/+3
It's only called directly before init_valid_table() anyway, so move it there. (This used to be commit b6d1d2428866712a550a354732e2386b4f87b67b)
2007-12-16Make check_dos_char staticVolker Lendecke1-1/+1
It's only called in t_doschar, a pretty bogus test program that is not compiled by default (This used to be commit 99c59e809ef3c5abcdfb796d50be7c40f7033787)
2007-12-16Remove a static fstringVolker Lendecke1-12/+20
(This used to be commit a9c62c57db9e580640d0265b08b3178496de76a8)
2007-12-15Cope with valgrind > 3.2.x.Jeremy Allison1-0/+4
Jeremy. (This used to be commit e799eb8da6f5e7a2173ba6b8fb040430fd1c6f34)
2007-12-15s/sid_to_string/sid_to_fstring/Volker Lendecke5-8/+8
least surprise for callers (This used to be commit eb523ba77697346a365589101aac379febecd546)
2007-12-15Use dom_sid_string for sid_string_tallocVolker Lendecke1-29/+12
Remove some code duplication, but introduce one more dependency on librpc/ndr. Easily turned around so that librpc/ndr depends on lib/util_sid if necessary (This used to be commit 3a0b1b2060facd5f1ac1461b23dd86c75cdd9458)
2007-12-15sid_string_static is no more :-)Volker Lendecke1-11/+8
We now have four ways to do sid_to_string: sid_to_string: Convert it into an existing fstring, when you have one sid_string_talloc: The obvious thing sid_string_tos: For the lazy, use only with care sid_string_dbg: The one to use in DEBUG statements (This used to be commit 7b8276aaa48852270c6b70b081c3f28e316a7a2c)
2007-12-15Replace sid_string_static with sid_to_stringVolker Lendecke2-5/+6
This adds 28 fstrings on the stack, but I think an fstring on the stack is still far better than a static one. (This used to be commit c7c885078be8fd3024c186044ac28275d7609679)
2007-12-15Replace sid_string_static by sid_string_dbg in DEBUGsVolker Lendecke5-36/+30
(This used to be commit bb35e794ec129805e874ceba882bcc1e84791a09)
2007-12-15Add sid_string_dbgVolker Lendecke1-0/+5
This makes use of the just added debug_ctx and will kill many sid_string_static() calls (This used to be commit 3e4148c280efe154c3f8d552731c8b29d6977507)
2007-12-15Add debug_ctx according to an idea by TridgeVolker Lendecke1-0/+14
Sorry, Jeremy, I think for debug messages this is just the right way to do it. (This used to be commit 6312016e2727c2b5b1a4964a98cfb9585d77cc8c)
2007-12-15add sid_string_tallocVolker Lendecke1-2/+10
(This used to be commit 9e3ef0923d71cc06b8445be2625ebd8dfed1b42d)
2007-12-14add POPT_COMMON_CONFIGFILE which only provides --configfile (not -s)Stefan Metzmacher1-0/+6
metze (This used to be commit af3392cc20942158ac9e0a533799c5904ff23347)
2007-12-14debug: fix crash bug when DEBUG() is used before setup_logging()Stefan Metzmacher1-0/+4
this was introduced by the pstring removal (1ea3ac80146b83c2522b69e7747c823366a2b47d) metze (This used to be commit a412e6c7c676a054acd9db371221a50078cfe1d9)
2007-12-12Add split_domain_user() (not to mix with winbind variants).Günther Deschner1-0/+24
Guenther (This used to be commit bd5308e5f63e4f692761557d0ecdee7226b66a15)
2007-12-11Add patches for bug #4866 from jiri sasek - Sun Microsystems - Prague Czech ↵Jeremy Allison2-0/+14
Republic <Jiri.Sasek@Sun.COM> - slightly modified - Jiri please check ! to allow Solaris to get passwords > 8 chars. Jeremy. (This used to be commit 657bf8c3479d6192f269e3daef1517e77a9fa9cb)
2007-12-10Remove the char[1024] strings from dynconfig. ReplaceJeremy Allison5-24/+24
them with malloc'ing accessor functions. Should save a lot of static space :-). Jeremy. (This used to be commit 52dc5eaef2106015b3a8b659e818bdb15ad94b05)
2007-12-10dbwrap_rbtVolker Lendecke1-0/+303
This is meant as a replacement for the internal tdb. To me it seems a bit silly that for in-memory structures we do our own memory management. With this rbt based approach we can make use of the system-supplied malloc. (This used to be commit 54e5d4404619443caed32e2acff8921cdbff9ed1)
2007-12-10Make the Linux rbtrees compile within SambaVolker Lendecke1-16/+41
(This used to be commit c871fd802f3c0c5ef1f63b2d01a636c885f22b23)
2007-12-10Add rbtree.[ch] from the Linux kernelVolker Lendecke1-0/+397
These are copies taken from 94545baded0bfbabdc30a3a4cb48b3db479dd6ef from Linus' kernel tree (This used to be commit 8a3289f913fc0432211b0e9937da1d71d4e18893)
2007-12-10Add db_tdb_fetchVolker Lendecke1-0/+27
(This used to be commit efa8764c21edfbd09f535900ba37359d72903bf8)
2007-12-10Add dbwrap bystring service routinesVolker Lendecke1-0/+42
(This used to be commit 1e214b536b0628db299d701839e62a4ac52727c9)
2007-12-09Many systems don't have sa_len as part of struct sockaddr.Jeremy Allison1-1/+1
Revert 5c347cb46d85d04bbba7c99dca7ff9628f977d84 "Choose a better default for sockaddr length.". Jeremy. (This used to be commit 677ac6adc38b0747f825ee597e0502277a8f74b1)
2007-12-09Choose a better default for sockaddr length.James Peach1-1/+1
(This used to be commit 5c347cb46d85d04bbba7c99dca7ff9628f977d84)
2007-12-09Fix connect(2) callers to use correct sockaddr size.James Peach4-7/+26
Some systems (eg Mac OSX 10.5) require the length passed to match the socket address family. This introduces sys_connect() that does the right thing, and replaces all uses oc connect(2) with sys_connect(). Note that there are some LGPL callers that still call connect(2) directly. (This used to be commit e1bfdc17c49da582cdf907e260301ab1946b2ed3)
2007-12-07Remove next_token - all uses must now be next_token_talloc.Jeremy Allison3-98/+22
No more temptations to use static length strings. Jeremy. (This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
2007-12-07We don't need P_GSTRING or P_UGSTRING anymore.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 78dc75600099b5b3b5a8ecffec747a227ff51d70)
2007-12-07Don't build rpctorture anymore - not maintained. Just remove.Jeremy Allison3-35/+17
Remove all vestiges of pstring (except for smbctool as noted in previous commit). Jeremy (This used to be commit 4c32a22ac50ada3275d2ffba3c1aa08bee7d1549)
2007-12-07Remove pstrings completely except for smbctool (what does this do ?).Jeremy Allison2-24/+9
Don't build this for now. Jeremy. (This used to be commit 46b67fd82c795d1a34a1efca9e409c0f3fa4f3a2)