summaryrefslogtreecommitdiff
path: root/source4/lib
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r2159: converted samba4 over to UTF-16.Andrew Tridgell3-84/+216
I had previously thought this was unnecessary, as windows doesn't use standards compliant UTF-16, and for filesystem operations treats bytes as UCS-2, but Bjoern Jacke has pointed out to me that this means we don't correctly store extended UTF-16 characters as UTF-8 on disk. This can be seen with (for example) the gothic characters with codepoints above 64k. This commit also adds a LOCAL-ICONV torture test that tests the first 1 million codepoints against the system iconv library, and tests 5 million random UTF-16LE buffers for identical error handling to the system iconv library. the lib/iconv.c changes need backporting to samba3 (This used to be commit 756f28ac95feaa84b42402723d5f7286865c78db)
2007-10-10r2154: Merge of Jim's format string fixup in r2130:2131Tim Potter1-1/+1
(This used to be commit 17a53eaac2d0d76413c8bb27a6f1c80536ccf3a7)
2007-10-10r2125: the lp_use_mmap() in map_file() is inappropriate for 2 reasons, so I ↵Andrew Tridgell1-13/+11
have removed it. - lp_use_mmap() is really meant to cope with systems that have broken mmap coherence, but map_file() doesn't need coherence, as its maps read only - map_file() is used to map the charset files before loadparm has loaded, so lp_use_mmap() is always returning false for the major use of map_file() (This used to be commit dbe786f61e3de0758f95f2abd1b15a4c320432ca)
2007-10-10r2106: try to cope with a wider range of UTF-16 characters when we are usingAndrew Tridgell2-3/+10
an external libiconv library. (This used to be commit 168be7fbd7ae876ded39f73a7835e91b35e67244)
2007-10-10r2100: rework the dcerpc client side library so that it is async. We nowAndrew Tridgell1-1/+1
generate a separate *_send() async function for every RPC call, and there is a single dcerpc_ndr_request_recv() call that processes the receive side of any rpc call. The caller can use dcerpc_event_context() to get a pointer to the event context for the pipe so that events can be waited for asynchronously. The only part that remains synchronous is the initial bind calls. These could also be made async if necessary, although I suspect most applications won't need them to be. (This used to be commit f5d004d8eb8c76c03342cace1976b27266cfa1f0)
2007-10-10r2092: fix the build(don't catch main() by make proto)Stefan Metzmacher2-2/+2
metze (This used to be commit ecdb0b442659e80ca91d5ec5b505224c68a97c5a)
2007-10-10r2089: fix standalone build with LDAP, this needs -llber tooStefan Metzmacher1-1/+1
metze (This used to be commit b9152c9ba2735f511663f34a910142eed67701b5)
2007-10-10r2088: add tdbtorture tdbdump and tdbtest to the buildStefan Metzmacher5-17/+119
NOTE: tdbbackup and tdbtool seems to be broken... NOTE: I also added SMB_EXT_LIB(GDBM,...) because that is needed by tdbtest metze (This used to be commit e66630662d4203ccecbb20962e83dbf50a2c056f)
2007-10-10r2087: the ldb tools really don't need LIBSMB!Stefan Metzmacher1-5/+5
that reduces the size of thet binaries with '-g' and gcc 3.4 from 5.3 MB to 745 KB:-) metze (This used to be commit 037a6d95b4a4640059a10dcbb0a266d15eaf42b3)
2007-10-10r2060: fix compiler warningStefan Metzmacher1-3/+3
metze (This used to be commit dde5442b75ba169856a52a45588e2702d198b31d)
2007-10-10r2055: Add PRINTF_ATTRIBUTE to many more parts of the code, and a newAndrew Bartlett5-3/+14
--enable-developer warning for when they are missing. Andrew Bartlett (This used to be commit 8115e44d47bcd65edba08d10117180ae508cdbc1)
2007-10-10r2049: talloc now has destructors and reference countsAndrew Tridgell1-56/+75
this means you can do: talloc_set_destructor(ptr, my_destructor); and your destructor will be called with the pointer as an argument when the pointer is about to be freed. The destructor can refuse the free by returning -1. You can also increase the reference count on a pointer like this: talloc_increase_ref_count(ptr); and a talloc_free() will just reduce the reference count, only actually freeing the memory when the count reaches zero. (This used to be commit b5608d52d33a1d8be5a8a6751bc6cec162c7ed92)
2007-10-10r2043: data_blob() now returns a talloc'd pointer. If everyone has beenAndrew Tridgell1-40/+10
following the data_blob() API properly then this will cause no problems. I'm expecting chaos. this is part of the general move towards using talloc for everything in samba4 (This used to be commit 3f6b3c21e4d538aeb30b7906a75995b8f4c11223)
2007-10-10r2039: got rid of the free() ptr in DATA_BLOBAndrew Tridgell1-17/+2
I plan on replacing the concept by adding a generic destructor in all talloc ptrs, so you can do: talloc_set_destructor(ptr, my_destructor); to setup a function that will be called on free. (This used to be commit 957b260621c091830c01e9e8c370c199350342ec)
2007-10-10r2034: Allow user-selectable hash functions on open only.Jeremy Allison3-17/+22
Jeremy. (This used to be commit b43320ee5c9ac14c330e61ae62e0786b088e04fa)
2007-10-10r2017: fix compiler warningsStefan Metzmacher1-1/+1
metze (This used to be commit eb75d9323fb07fe9a19bbf77168aeb8a4b92c3b8)
2007-10-10r2003: got rid of next_token_nr(), which involved some horrible globalsAndrew Tridgell2-23/+4
and nasy pointer tricks. this involved fixing some of the internals of smbclient (This used to be commit 126fec6169f9412932c82e7675840476132bce87)
2007-10-10r1991: After finding a talloc inconsistancy is a very good time to smb_panic(),Andrew Bartlett1-2/+12
it can only indicate programmer error, and doing a smb_panic() ensures an automatic backtrace (and eventually an abort()). Andrew Bartlett (This used to be commit b2d93d0010d80f158760f53273853de2439c3062)
2007-10-10r1990: Fix breakage caused by the recent talloc changes. (Failure to processAndrew Bartlett1-2/+2
an SPNEGO login from WinXP at least). talloc_asprintf_append() lost an argument, but because TALLOC_CTX is now a void*, this was not picked up by the compiler. I've tested the login (asn1), but not the registry/gtk changes. Andrew Bartlett (This used to be commit 4294be44057124568fe1d176702056bb62ad3214)
2007-10-10r1989: fixed a couple of bugs in code that assumes sizeof(time_t) == sizeof(int)Andrew Tridgell1-2/+6
(This used to be commit cc3d420c33152c8e9026dc39a7322d11edb3c774)
2007-10-10r1985: take advantage of the new talloc in a few more placesAndrew Tridgell1-5/+34
(This used to be commit 6ffdfd779936ce8c5ca49c5f444e8da2bbeee0a8)
2007-10-10r1983: a completely new implementation of tallocAndrew Tridgell10-376/+210
This version does the following: 1) talloc_free(), talloc_realloc() and talloc_steal() lose their (redundent) first arguments 2) you can use _any_ talloc pointer as a talloc context to allocate more memory. This allows you to create complex data structures where the top level structure is the logical parent of the next level down, and those are the parents of the level below that. Then destroy either the lot with a single talloc_free() or destroy any sub-part with a talloc_free() of that part 3) you can name any pointer. Use talloc_named() which is just like talloc() but takes the printf style name argument as well as the parent context and the size. The whole thing ends up being a very simple piece of code, although some of the pointer walking gets hairy. So far, I'm just using the new talloc() like the old one. The next step is to actually take advantage of the new interface properly. Expect some new commits soon that simplify some common coding styles in samba4 by using the new talloc(). (This used to be commit e35bb094c52e550b3105dd1638d8d90de71d854f)
2007-10-10r1973: for systems that don't have strtoull() try strtouq(). This should fixAndrew Tridgell1-0/+12
the build for some BSD varients. (This used to be commit 73e9ee791472bb212efe0eb4744daa91678263ad)
2007-10-10r1972: cmdline_auth_info does not need to be declared globalAndrew Tridgell1-2/+0
(This used to be commit d07dbdb22acc4c9cafb7141486fbf162d9f8164e)
2007-10-10r1957: add cmdline_set_* functionsStefan Metzmacher1-0/+26
and let smbclient use the cmdline _* functions metze (This used to be commit ffb87ebc33e728bf8506383f95b80605adec3c68)
2007-10-10r1949: provide functions to access the username, userdomain and userpasswordStefan Metzmacher1-1/+36
now you're prompted when cmdline_get_userpassword() is called and the password is not yet known metze (This used to be commit d14a01533c5d465ff3709c48576b798b3be807e0)
2007-10-10r1912: move popt_common.hStefan Metzmacher1-0/+51
metze (This used to be commit ecf6be894fc47f9e00f46531e06ef20e11115c0f)
2007-10-10r1911: merge a few popt parameters from 3.0 move some to better placesStefan Metzmacher1-15/+79
and deal with users DOMAIN and lp_workgroup() of the local workstation metze (This used to be commit 1fc0100e44a8640cfc15effb99f5824cb7817da8)
2007-10-10r1901: add missing include of <fnmatch.h>Stefan Metzmacher1-0/+1
metze (This used to be commit 5e5681e2830bfd487d7e783249fe069b41be1f37)
2007-10-10r1898: Check the context we are going to return.Simo Sorce1-1/+5
(This used to be commit d721b122b5c443363b8f8ec2e1ef4b798378b658)
2007-10-10r1894: Convert // to /* */Volker Lendecke2-2/+2
(This used to be commit 5dc793b2b4b5c54df4aa3b0c98c248bdd671bbb1)
2007-10-10r1892: this adds talloc_get_context(), which is something I discussed at theAndrew Tridgell1-1/+13
team meeting at CIFS04. It allows you to find the talloc context given any pointer allocated with talloc. (This used to be commit 01dc4ed9b4f9390930d3c235cf2ccf9a9028392d)
2007-10-10r1838: Updates from the airplane:Jelmer Vernooij4-0/+82
- IDL fixes + adding comments - Start working on dcom infrastructure (This used to be commit ef0fc269f06c82594c34ad8673c76c5ea099250e)
2007-10-10r1820: added a strcmp_safe() that handles NULL pointers. Needed for theAndrew Tridgell1-0/+15
search torture test, as some servers return really bad entries. (This used to be commit c900ebb3ac18d77ab334d3bf5259b3bba547b09c)
2007-10-10r1766: we do not have smb_read_error in samba4Simo Sorce1-4/+0
(This used to be commit 1c3d52cea4dff57b14ee9bc197001fadb1d18abf)
2007-10-10r1759: Add some helper functions to read and write data to a socket with ↵Simo Sorce1-0/+112
timeout (again from volker in trunk) (This used to be commit 40d8262e7dbba76f88f1900744ed02f9f7fcdadd)
2007-10-10r1758: Move and enhance the add_string_to_array function as per volker job ↵Simo Sorce1-0/+18
on trunk (This used to be commit 606caddeb95382287fa41a5017ca473d0301be6b)
2007-10-10r1749: added some random stuff that captures some discussions volker and IAndrew Tridgell1-0/+22
just had on emulating % macros from smb.conf in a possible ldb based config system (This used to be commit d547479290e30d4fd86ab718528e879a28f71447)
2007-10-10r1630: - fixed the replacement timegm() function to work correctly for DST ↵Andrew Tridgell1-10/+1
changes - got rid of global_myname(), using lp_netbios_name() instead (This used to be commit e8d4b390884e487163d81f66a5a7ac1de1305d9a)
2007-10-10r1606: make the low level socket read/write routines cope properly with ↵Andrew Tridgell1-4/+11
non-blocking sockets (This used to be commit bb6cbf29ccf8f2b556bf3e7b3ff487faa0f36773)
2007-10-10r1596: Fix up copyrights.Jim McDonough1-1/+1
(This used to be commit d2553aac0a75591026b9b1fcf46065e5b03ed19c)
2007-10-10r1578: the first stage of the async client rewrite.Andrew Tridgell1-135/+209
Up to now the client code has had an async API, and operated asynchronously at the packet level, but was not truly async in that it assumed that it could always write to the socket and when a partial packet came in that it could block waiting for the rest of the packet. This change makes the SMB client library full async, by adding a separate outgoing packet queue, using non-blocking socket IO and having a input buffer that can fill asynchonously until the full packet has arrived. The main complexity was in dealing with the events structure when using the CIFS proxy backend. In that case the same events structure needs to be used in both the client library and the main smbd server, so that when the client library is waiting for a reply that the main server keeps processing packets. This required some changes in the events library code. Next step is to make the generated rpc client code use these new capabilities. (This used to be commit 96bf4da3edc4d64b0f58ef520269f3b385b8da02)
2007-10-10r1517: change event_remove_timed() to remove by structure not by handler.Andrew Tridgell1-3/+1
this fixes a crash bug in smbd with multiple RPC clients (This used to be commit 6e102f732e4404fc5f9b2851d12b00d2d083b43d)
2007-10-10r1511: fixed a free() that should be ldb_free()Andrew Tridgell1-1/+1
this might explain the tdb corruption that metze found - it caused heap corruption that affected tdb (This used to be commit 31d55dfb443612a341ff6ade77c6e4477c4fefca)
2007-10-10r1498: (merge from 3.0)Andrew Bartlett2-34/+45
Rework our random number generation system. On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork(). For other systems, we now only re-seed after a fork, and on startup. No need to do it per-operation. This removes the 'need_reseed' parameter from generate_random_buffer(). This also requires that we start the secrets subsystem, as that is where the reseed value is stored, for systems without /dev/urandom. In order to aviod identical streams in forked children, the random state is re-initialised after the fork(), at the same point were we do that to the tdbs. Andrew Bartlett (This used to be commit b97d3cb2efd68310b1aea8a3ac40a64979c8cdae)
2007-10-10r1474: It is useful if talloc_strdup() behaves like strdup()Andrew Bartlett1-0/+3
- NULL in, NULL out Andrew Bartlett (This used to be commit 2cc0b3a2f1785c53268f018999a87c26539fd4a6)
2007-10-10r1452: Thanks to Volker for spotting that this code was certainly not tested...Andrew Bartlett1-0/+1
(make sure to actually return the result). Andrew Bartlett (This used to be commit 8d449bbe2b9aa29315e894be1400a9475ef99468)
2007-10-10r1435: talloc_steal is very useful - add a function to do it with a DATA_BLOBAndrew Bartlett1-0/+15
Andrew Bartlett (This used to be commit 66d6e2611084d579a20833a4c0daa5d72ef9393c)
2007-10-10r1434: Merge this function in from Samba 3.0, but use a mem_ctx rather thanAndrew Bartlett1-0/+17
an fstring. Andrew Bartlett (This used to be commit e8de8905b2f328395d71afdd73c77301c9366a66)
2007-10-10r1432: - Move the various Gtk-specific parts from the registry code into a ↵Jelmer Vernooij3-801/+0
directory gtk/ - Move common "Samba-Gtk" code into gtk/common/ ("Connect to RPC pipe"-dialog, etc) - Add a new utility 'gwcrontab' that can currently list, delete and add 'atsvc' jobs. It still displays times and dates as integers though, will fix that later. Some screenshots available at: http://samba.org/~jelmer/gwcrontab/ (This used to be commit d321cf20f1f0ff33603b013c26d370669f255868)