summaryrefslogtreecommitdiff
path: root/lib/util
Commit message (Collapse)AuthorAgeFilesLines
* lib: make asn1_util a private libraryAndrew Tridgell2011-04-061-4/+5
| | | | | | | this prevents symbol duplication of the asn1 symbols in the service and ntvfs subsystems Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* lib: moved data_blob.c into samba-util-commonAndrew Tridgell2011-04-061-2/+2
| | | | | | | this avoids a duplication of the data_blob symbols some binaries (eg. smbtorture) Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* debug: default debug to stderr Andrew Tridgell2011-04-041-1/+2
| | | | | | | if setup_logging() hasn't been called then default to sending debug to stderr Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* debug: Restore the s3-style check in check_log_size()Volker Lendecke2011-03-311-1/+6
| | | | | | | This has caused me considerable grief. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Mar 31 19:42:38 CEST 2011 on sn-devel-104
* lib/util/charset Add tests for strcasecmp_m(), talloc_strupper() et alAndrew Bartlett2011-03-314-15/+241
| | | | | | | | | | | | | | | | | | This adds tests for: strncasecmp_m strcasecmp_m strupper_talloc_n strlower_talloc strhaslower strhasupper The tests can certainly be improved with pre-calculated upper and lower case text, but this at least puts them though their paces. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Mar 31 14:24:22 CEST 2011 on sn-devel-104
* charconv: Use talloc_tos() in the S3 buildVolker Lendecke2011-03-311-1/+9
| | | | | | | | In S3 we put a talloc_pool on top of the stack so that an allocation from talloc_tos() normally is just a pointer increment. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Mar 31 09:14:01 CEST 2011 on sn-devel-104
* Arg. I hate the "if (xxx) return foo" all on one line style of code.Jeremy Allison2011-03-311-2/+8
| | | | | | | Fix the talloc leaks I introduced by not spotting these returns. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Mar 31 05:19:34 CEST 2011 on sn-devel-104
* Don't burn 2k of stack on every iconv, use the heap when it's a slow call.Jeremy Allison2011-03-311-16/+25
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Mar 31 04:09:09 CEST 2011 on sn-devel-104
* lib/util/charset smb_panic() on incorrect use of strlen_m_extAndrew Bartlett2011-03-311-0/+18
| | | | | | | | | This may save a developer some time in the future. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Mar 31 02:40:31 CEST 2011 on sn-devel-104
* lib/util/charset Add tests for strlen_m_ext() and convert_string_talloc()Andrew Bartlett2011-03-311-2/+87
| | | | | | | This convers a few more cases for convert_string_talloc() and introduces tests for strlen_m_ext() across complex multibyte strings. Andrew Bartlett
* lib/util/charset Add wrapper to allow testing of strlen_m_ext()Andrew Bartlett2011-03-312-2/+22
| | | | | | | This allows test routines to force in particular character sets, and not rely on the smb.conf. Andrew Bartlett
* lib/util/charset correct calculation of UTF8 character sizesAndrew Bartlett2011-03-311-1/+1
| | | | | | Characters between 0x800 0x0FFFF are 3 bytes long. Andrew Bartlett
* Fix convert_string() to take a *converted_size arg. and return a bool.Jeremy Allison2011-03-303-34/+45
| | | | | | | | Makes these interfaces much harder to misuse and easier to ensure error checking. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
* lib/util/charset Add tests for convert_string_talloc_handle()Andrew Bartlett2011-03-303-0/+431
| | | | | | | Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Mar 30 13:02:47 CEST 2011 on sn-devel-104
* lib/util Move base64 functions into lib/util/base64.cAndrew Bartlett2011-03-304-3/+155
| | | | Andrew Bartlett
* lib/util/charset Remove pointless static bool initialisedAndrew Bartlett2011-03-301-5/+0
|
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* lib/util/util_pw: share more code between lib/util/util_pw.c and ↵Günther Deschner2011-03-302-8/+12
| | | | | | source3/lib/username.c Guenther
* lib/util/util_pw: share sys_get{pw,gr} group of calls.Günther Deschner2011-03-303-0/+94
| | | | Guenther
* lib/util/util_pw: temporary rename of getpwnam_alloc and getpwuid_alloc.Günther Deschner2011-03-301-2/+2
| | | | Guenther
* debug: ignore debug_set_logfile() with a blank stringAndrew Tridgell2011-03-291-1/+5
| | | | | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Mar 29 07:03:58 CEST 2011 on sn-devel-104
* lib: removed a spurios declaration of 'logfile'Andrew Tridgell2011-03-291-1/+0
| | | | | | we don't have a global logfile variable any more Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* charcnv: ensure convert_string_error doesn't conflict with s3 functionAndrew Tridgell2011-03-251-5/+5
| | | | | | | | | use _handle for handle based functions Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Fri Mar 25 05:22:24 CET 2011 on sn-devel-104
* lib/util/charset rename iconv_convenience to iconv_handleAndrew Bartlett2011-03-256-79/+79
| | | | | | This better reflects what this structure is Andrew Bartlett
* charcnv: added convert_string_error()Andrew Tridgell2011-03-251-33/+57
| | | | | | this will allow us to remove conv_silent Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* unistr: moved some UCS2 macros into util_unistrAndrew Tridgell2011-03-251-9/+0
| | | | | | | we need to move towards eliminating smb_ucs2_t. This moves a couple of the related macros into the only file they are used in Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* libcli: created smb_constants.hAndrew Tridgell2011-03-251-0/+1
| | | | | | this starts the (long!) process of moving some of the SMB constants into common files. This just moves the FLAGS2_ defines, which are needed for common string routines (for FLAGS2_UNICODE_STRINGS)
* lib: remove unused pieces of string_wrappers.hAndrew Tridgell2011-03-251-6/+0
|
* lib: move the string wrappers from source3/include to common lib/utilAndrew Tridgell2011-03-251-0/+132
| | | | | | this will allow the common charcnv library to use the string wrappers Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell2011-03-244-44/+36
| | | | | | | | | convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
* charset: remove another allow_badcharcnv check Andrew Tridgell2011-03-241-3/+0
| | | | better to fail only if there is a bad character
* lib/util: Merge basic string length and comparison functionsAndrew Bartlett2011-03-235-343/+427
| | | | | | | | | | These functions now use the codepoints for more accurate string handling and now form common code. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Mar 23 08:21:54 CET 2011 on sn-devel-104
* charcnv: remove the automatic fail on allow_badcharcnv trueAndrew Tridgell2011-03-231-5/+0
| | | | we should just fail the call if the string really is bad
* fault: fixed smb_panic() prototypesAndrew Tridgell2011-03-231-2/+0
| | | | | Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Mar 23 01:51:44 CET 2011 on sn-devel-104
* fault: moved fault.c into common libraryAndrew Tridgell2011-03-231-2/+2
|
* fault: switch s4 to use the common fault.cAndrew Tridgell2011-03-232-237/+1
|
* fault: get fault.c ready for use by s4Andrew Tridgell2011-03-232-299/+74
| | | | | this moves the s3 specific dumpcore code into source3/lib/dumpcore.c, and uses a function pointer to setup which smb_panic call to use
* fault: moved s3 fault.c to top levelAndrew Tridgell2011-03-231-0/+380
|
* fault: rename fault.c to fault_s4.cAndrew Tridgell2011-03-232-11/+11
| | | | this is in preparation for merging the s3 fault code into common
* lib/: Fix prototypes for functions.Jelmer Vernooij2011-03-191-2/+2
|
* lib-util: put data_blob back in the public librarySimo Sorce2011-03-171-2/+2
| | | | | | | | data_blob is defined ina public header, so it needs to be exposed in the public library. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Thu Mar 17 15:39:08 CET 2011 on sn-devel-104
* lib: fixed header pathsAndrew Tridgell2011-03-151-8/+8
| | | | | this is a public header, and needs to use sane paths for the public header creation
* talloc: use <talloc.h> not "talloc.h"Andrew Tridgell2011-03-151-1/+1
| | | | this ensures we use the right header
* lib/util/fault.c - "call_backtrace" - no need to have "backtrace_size" as size_tMatthias Dieter Wallnöfer2011-03-101-1/+1
| | | | The function "backtrace" returns an "int".
* debug: fixed a valgrind errorAndrew Tridgell2011-03-041-1/+4
| | | | | | | Thanks to Volker for spotting this one! Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Fri Mar 4 03:09:52 CET 2011 on sn-devel-104
* lib/util: LIBCRYPTO is in common already, so add it to samba-util-common.Günther Deschner2011-03-031-2/+2
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Mar 3 18:08:30 CET 2011 on sn-devel-104
* lib/util: new merged debug systemAndrew Bartlett2011-03-017-426/+1461
| | | | | | | | | | | | This is the s3 debug system, with a number of changes to tidy it up for common use. The debug class system is simplified by the removal of the ISSET table, the system no longer attempts to cope with assignment of DEBUGLEVEL, and the full class table is always available (rather than just DEBUGLEVEL_CLASS[DBCG_ALL]) from startup. It is also no longer confusingly described as a hack, but as the initial table. Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Mar 1 04:32:12 CET 2011 on sn-devel-104
* lib/util move debug.[ch] out of the wayAndrew Bartlett2011-03-013-1/+1
| | | | | | | This will allow a modified version of the s3 debug system to be the new common debug system. Andrew Bartlett
* lib/util/time: Merge time functions from source3/lib/time.cAndrew Bartlett2011-03-012-0/+76
|
* tdb: Use <tdb.h> to include tdb so system headers are found when building ↵Jelmer Vernooij2011-02-282-2/+2
| | | | against system tdb.