summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2011-04-29lib/util Re-merge the string_sub() and all_string_sub() from source3Andrew Bartlett3-15/+46
Andrew Bartlett
2011-04-29lib/util/charset Move strstr_m() to the top levelAndrew Bartlett2-0/+84
2011-04-28lib/util/charset Merge talloc-based pull and push charset functionsAndrew Bartlett3-95/+151
These were copied from source3/lib/charcnv.c Andrew Bartlett
2011-04-28lib/util/charset Add copyright headersAndrew Bartlett1-1/+2
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Apr 28 04:13:44 CEST 2011 on sn-devel-104
2011-04-28lib/util/charset Make fast path from UTF16 to '8 bit' charsets clearerAndrew Tridgell1-14/+28
This breaks the fast path into handling for -1 and handling for specified lenghts, avoding branch operations on each character. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-28lib/util/charset Add tests for srclen=-1 behaviour.Andrew Bartlett1-0/+443
This confirms that we do include a null terminator in all non-failed conversions. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-28lib/util/charset use convert_string.c in commonAndrew Bartlett4-204/+5
This brings another layer of the charcnv library in common. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-28lib/util/charset Fix string termination conditions for UTF16 stringsAndrew Bartlett1-4/+4
This punts partial UTF16 strings to iconv() to deal with, as it's not a fast path any longer if it's got an odd length. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-27dynconfig: Have only one dynconfig.o in the common code.Andrew Bartlett1-1/+1
2011-04-27libcli/auth Move Samba4's gssapi_error_string from GENSEC to libcli/authAndrew Bartlett1-0/+10
This will allow the GSSAPI PAC fetch code to use it. Andrew Bartlett
2011-04-26lib/util Define samba-util-common only for s3-wafAndrew Bartlett1-24/+11
It causes too much trouble in the top level build. Andrew Bartlett
2011-04-24lib/util: add RBVAL, RBVALS, RSBVAL and RSRBVALS macrosStefan Metzmacher1-6/+11
They pull and push [u]int64_t values in big endian. metze
2011-04-24Fix license info for talloc in manpage.Jelmer Vernooij1-3/+3
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Apr 24 03:27:54 CEST 2011 on sn-devel-104
2011-04-23Fix case of libUTIL_LDB.Jelmer Vernooij1-6/+6
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Apr 23 18:52:06 CEST 2011 on sn-devel-104
2011-04-23Support the 'PYTHON' environment variable.Jelmer Vernooij2-0/+2
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Apr 23 04:19:05 CEST 2011 on sn-devel-104
2011-04-22asn1: Fix Coverity ID 2299, CHECKED_RETURNVolker Lendecke1-1/+5
2011-04-20lib/util/charset Always set *converted_size even on failureAndrew Bartlett1-4/+2
The caller may wish to inspect the partially converted string. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Apr 20 05:17:48 CEST 2011 on sn-devel-104
2011-04-20lib/util/charset create _handle functions for convert_string() et alAndrew Bartlett1-29/+86
This is now API compatible with the existing code in lib/util/charset lazy_initialize_conv() is no longer called as init_iconv() is called when the smb.conf is processed, and get_conv_handle() will auto-init with defaults if required. load_case_tables_library() is no longer requried as all binaries and libraries already load these in their entry points, as otherwise all the other string functions would fail. Andrew Bartlett
2011-04-19tdb_backup: avoid transaction on backup file, use lockallSimo Sorce1-8/+13
Transactions have the side effect of generating bigger files. By removing the transaction files get as much as 30% smaller. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Tue Apr 19 23:34:37 CEST 2011 on sn-devel-104
2011-04-19tdb: make sure we skip over recovery area correctly.Rusty Russell3-17/+44
If it's really the recovery area, we can trust the rec_len field, and don't have to go groping for bitpatterns. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Tue Apr 19 14:15:22 CEST 2011 on sn-devel-104
2011-04-18tdb_expand: limit the expansion with huge recordsSimo Sorce1-5/+20
ldb can create huge records when saving indexes. Limit the tdb expansion to avoid consuming a lot of memory for no good reason if the record being saved is huge.
2011-04-18tdb: tdb_repack() only when it's worthwhile.Rusty Russell1-6/+31
tdb_repack() is expensive and consumes memory, so we can spend some effort to see if it's worthwhile. In particular, tdbbackup doesn't need to repack: it started with an empty database! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-04-18tdb: fix transaction recovery area for converted tdbs.Rusty Russell1-2/+4
This is why macros are dangerous; these were converting the pointers, not the things pointed to! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-04-19lib/socket_wrapper: allow up to 32 interfaces for a bigger 'make test'Andrew Bartlett1-1/+4
The combined s3/s4 'make test' needs more interfaces. Andrew Bartlett
2011-04-16util: Build samba-util without unresolved symbols.Brad Hards1-33/+60
This is useful for the Samba4 case where external users otherwise need to link to (private) libsamba-util-common. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sat Apr 16 12:29:33 CEST 2011 on sn-devel-104
2011-04-14lib/util Move alpha_strcpy() from s3 into common codeAndrew Bartlett2-46/+51
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Apr 14 09:21:59 CEST 2011 on sn-devel-104
2011-04-14libcli/auth Move krb5 wrapper functions from s3 into commonAndrew Bartlett1-105/+5
This requires a small rework of the build system to ensure that the correct #define statements are made in both the s3 and top level builds. We now define the various HAVE_ macros in config.h at all times, using heimdal_build/wscript_configure when that is in use. Andrew Bartlett
2011-04-14s3-includes: include lib/util/debug.h headers in includes.h not smb.hGünther Deschner1-0/+1
Guenther
2011-04-13lib: Move next_token next to next_token_tallocVolker Lendecke2-47/+46
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13talloc: fix compiler warnings with -Wc++-compatStefan Metzmacher1-5/+5
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Apr 13 14:33:23 CEST 2011 on sn-devel-104
2011-04-13build: Bring DYNCONFIG into samba-util library to avoid symbol duplicationAndrew Bartlett1-1/+1
When this was depended on directly as a subsystem, it ended up in multiple libraries. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Apr 13 08:39:35 CEST 2011 on sn-devel-104
2011-04-13s3-charcnv: Move convert_string() et al to lib/util/charsetAndrew Bartlett1-0/+467
This is the first step to this being the common convert_string implementation. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Add many more charset testsAndrew Bartlett1-15/+444
This confirms that the behaviour of the convert_string() API (with the process-wide iconv handle). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Add convert_string_error()Andrew Bartlett2-0/+25
This adds an interface that matches the source3/ convert string code. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Make ASCII conversion validate it's inputAndrew Bartlett1-4/+69
We should not just strip the high bits off unicode strings being converted to ASCII, we need to actually fail the conversion. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Rename convert_string test to allow a 'non_handle' testAndrew Bartlett1-3/+2
A future commit will test (with a subset of tests) the varient of this function without _handle. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Add more tests for convert_string_error_handle()Andrew Bartlett1-0/+101
This helps define the semantics of this function very clearly, particularly for partial and invalid inputs. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Preserve 'pull' errors even when converting via UTF16Andrew Bartlett1-3/+8
When we do not have a direct iconv handle between any two charsets, we must go iva UTF16. However, we should still return the same buffer and error code as if we were able to go direct - including the partial conversion and the error code. This is important for locating the invalid multibyte character in the stream, for example. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Add tests for convert_string_error_handleAndrew Bartlett1-1/+68
These confirm that the errno is set correctly and that we stop on a partial multibyte character Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Add expected values for upper/lower case testsAndrew Bartlett1-0/+16
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Fix and add public interface for convert_string_error_handleAndrew Bartlett2-7/+14
It makes much more sense for this to match the source3/ interface and return a bool. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util: Make string_replace from s3 commonAndrew Bartlett2-10/+43
The s4 implementation didn't do multibyte strings, so was only good for '/' which is known to be safe in all multibyte charsets. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util ucs2_align is identical, put it in commonAndrew Bartlett2-7/+7
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util Move simple string routines into common code.Andrew Bartlett4-55/+82
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util/charset Move source3/lib/util_unistr.c to the common code.Andrew Bartlett3-1/+345
This file (largely) contains functions to deal with UTF16 strings. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13lib/util make UTIL_TDB a libraryAndrew Bartlett1-2/+3
2011-04-08talloc/testsuite: avoid memory leak reported by valgrindStefan Metzmacher1-1/+1
metze Signed-off-By: Andrew Tridgell <tridge@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Apr 8 10:15:41 CEST 2011 on sn-devel-104
2011-04-08talloc/testsuite: test more talloc_pool related thingsStefan Metzmacher1-0/+55
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: include valgrind headers if availableStefan Metzmacher1-0/+9
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08talloc: add TC_INVALIDATE_POOL marcoStefan Metzmacher1-3/+38
metze Signed-off-By: Andrew Tridgell <tridge@samba.org>