summaryrefslogtreecommitdiff
path: root/lib/util
AgeCommit message (Collapse)AuthorFilesLines
2010-12-06idtree: fix overflow for v. large ids on allocation and removalRusty Russell1-1/+1
Chris Cowan tracked down a SEGV in sub_alloc: idp->level can actually be equal to 7 (MAX_LEVEL) there, as it can be in sub_remove. (We unfairly blamed a shift of a signed var for this crash in commit 2db1987f5a3a). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Mon Dec 6 05:02:22 CET 2010 on sn-devel-104
2010-12-05lib/util:tests/time.c - "test_timestring" - fix it on SolarisMatthias Dieter Wallnöfer1-3/+5
Solaris returns "Thu Jan 01" and not "Thu Jan 1" - therefore proof for both. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Dec 5 23:09:13 CET 2010 on sn-devel-104
2010-12-04Fix bug #3185 - testparm exits 0 if it can read the config file regardless ↵Holger Hetterich1-1/+1
of errors Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Dec 4 02:30:00 CET 2010 on sn-devel-104
2010-11-24lib/debug Add clarifying commentsAndrew Bartlett1-2/+2
2010-11-20waf:lib/util - add missing dependency on tallocMatthias Dieter Wallnöfer1-1/+1
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Nov 20 23:35:48 CET 2010 on sn-devel-104
2010-11-15Add attribute macros for Heimdal to useAndrew Bartlett1-0/+12
Heimdal uses HEIMDAL_NORETURN_ATTRIBUTE and HEIMDAL_PRINTF_ATTRIBUTE, and we need to provide a link between these and Samba's function attribute handling. Andrew Bartlett
2010-11-12unix_privs: Add missing dependency on libreplace.Jelmer Vernooij1-0/+1
2010-11-04debug: fixed default debug settingsAndrew Tridgell2-1/+7
this fixes -d in our command line tools (eg. samba-tool) Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Nov 4 01:48:15 UTC 2010 on sn-devel-104
2010-11-03lib/util/charset/charconv: clarify comments in next_codepoint_convenience_ext()Michael Adam1-5/+8
Give the unicod U+<hexnumber> notation of the codepoints referred to in the comments. Also reformat the comments some.
2010-11-03lib/util/charset/util_unistr: clarify the comment header for strlen_m().Michael Adam1-5/+6
2010-11-03lib/util/charset/util_unistr: add strlen_m_ext_term() - variant of ↵Michael Adam2-0/+12
strlen_m_ext() counting terminator
2010-11-03lib/util/charset/util_unistr: add strlen_m_ext that takes input and output ↵Michael Adam2-10/+51
charset The function calculates the number of units (8 or 16-bit, depending on the destination charset), that would be needed to convert the input string which is expected to be in in src_charset encoding to the dst_charset (which should be a unicode charset).
2010-11-03lib/charcnv/util_unistr: add next_codepoint_ext() that accepts input charset.Michael Adam2-0/+8
next_codepoint() takes as string in CH_UNIX encoding and returns the unicode codepoint of the next (possibly multibyte) character of the input string. The new next_codepoint_ext() function adds the encoding of the input string as a parameter. next_codepoint() now only calls next_codepoint_ext() with CH_UNIX als src_charset argument.
2010-11-03lib/charset/charcnv: rename a parameter of next_codepoint_convenience_ext() ↵Michael Adam1-5/+5
for clarity
2010-11-03lib/charset/charcnv: add next_codepoint_convenience_ext() that accepts input ↵Michael Adam2-11/+37
charset. next_codepoint_convenience() takes as string in CH_UNIX encoding and returns the unicode codepoint of the next (possibly multibyte) character of the input string. The new next_codepoint_convenience_ext() function adds the encoding of the input string as a parameter. next_codepoint_convenience() now only calls next_codepoint_convenience_ext() with CH_UNIX als src_charset argument.
2010-11-03util/charset: remove a duplicate comment.Michael Adam1-5/+0
This seems to have been copied twice from source3/ code.
2010-11-02debug Explain the behaviour of setup_logging() more clearlyAndrew Bartlett1-1/+7
2010-11-02lib/debug Use vdprintf rather than manually allocateAndrew Bartlett1-5/+1
This allows the system to use whatever buffers it wants for the string rather than assuming we need to malloc() it. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Nov 2 00:18:43 UTC 2010 on sn-devel-104
2010-11-01lib/util Remove setup_logging_stdout()Andrew Bartlett2-15/+1
This API is no longer required now that we don't attempt to build ndrdump with the s3 build system, and because the s3 debug system will soon have the same setup_logging() API. Andrew Bartlett
2010-10-31build: check that if we provide -liconv we can build shared libsMatthieu Patou1-0/+6
On Solaris with sun studio compiling an executable with -liconv even if there is no libiconv.so or libiconv.a will work but not for a shared lib. This problem leads to build problem as the linker won't be able to find libiconv when building shared lib as liconv is wrongly specified
2010-10-31s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij9-464/+0
The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-26lib/util: remove useless ../lib/util/mutex.*Stefan Metzmacher4-143/+2
Only the disabled process_thread.c registers uses the register fn, all other functions are not used anywhere. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Oct 26 23:29:46 UTC 2010 on sn-devel-104
2010-10-26waf: Remove lib prefix from libraries manually.Jelmer Vernooij1-1/+1
2010-10-25ldb:gendb_* calls: support a "NULL" resultset parameterMatthias Dieter Wallnöfer1-4/+5
This is useful for "samdb_search_count" where only the amount of entries matters.
2010-10-24Add dump_data_cb()Volker Lendecke2-21/+48
2010-10-24Add print_asc_cb()Volker Lendecke2-3/+24
2010-10-24s4: Rename LIBSAMBA-* to libsamba-*Jelmer Vernooij1-1/+1
2010-10-23s4: Rename UID_WRAPPER to uid_wrapper.Jelmer Vernooij1-2/+1
Only link to uid_wrapper when it is enabled.
2010-10-23s4: Rename WRAP_XATTR to wrap_xattr.Jelmer Vernooij1-7/+7
2010-10-23lib/util: Add tevent WERROR wrappersKai Blin3-2/+126
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sat Oct 23 07:35:28 UTC 2010 on sn-devel-104
2010-10-22asn1_tests: Implement negative unit-tests for ber_write_OID_String()Kamen Mazdrashki1-0/+22
2010-10-22asn1: ber_write_OID_String() to be more picky about supplied OIDKamen Mazdrashki1-0/+5
Now function will check for invalid OID handling cases where: - sub-identifier has invalid characters (non-digit) - 'dot' separator found on unexpected place. For instance '.' at start or end of the OID. Two '.' in a row.
2010-10-21lib: make WRAP_XATTR a private libraryAndrew Tridgell1-6/+7
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21s4-waf: removed the XATTR and SASL aliasesAndrew Tridgell1-1/+1
these were hangovers from the old build system names Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21s4:lib/util/charset/iconv.c - remove a distinction which can never happenMatthias Dieter Wallnöfer1-4/+1
"ret->cd_direct" is never set before. It is set in the "if" upperwards but then the function is terminated with "return".
2010-10-20s3: Don't use talloc_autofree_context in map_fileVolker Lendecke1-1/+1
2010-10-20asn1_tests.c: Make test data static constKamen Mazdrashki1-6/+6
2010-10-20lib/util/asn1.c: comment spellingKamen Mazdrashki1-1/+1
2010-10-17Revert "s4:remove "util_ldb" submodule and integrate the three gendb_* calls ↵Matthias Dieter Wallnöfer3-0/+148
in "dsdb/common/util.c"" This reverts commit 8a2ce5c47cee499f90b125ebde83de5f9f1a9aa0. Jelmer pointed out that these are also in use by other LDB databases - not only SAMDB ones. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Oct 17 13:37:16 UTC 2010 on sn-devel-104
2010-10-17s4:remove "util_ldb" submodule and integrate the three gendb_* calls in ↵Matthias Dieter Wallnöfer3-150/+0
"dsdb/common/util.c" They're only in use by SAMDB code. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Oct 17 09:40:13 UTC 2010 on sn-devel-104
2010-10-17s4:lib/util/util_ldb.c - remove unused "gendb_add_ldif" callMatthias Dieter Wallnöfer1-17/+0
2010-10-17s4:"wrap_casefold" - move it to "ldb_wrap.c" since it's only used thereMatthias Dieter Wallnöfer1-5/+0
2010-10-12lib/debug Add DEBUGC and DEBUGADDC as dummiesAndrew Bartlett1-0/+4
This allows code that needs to also compile against the source3 debug code to compile in source4. Andrew Bartlett
2010-10-11util: Fix installation path of tevent_ntstatus.h, tevent_unix.h (bug 7720).Jelmer Vernooij1-0/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Oct 11 09:24:56 UTC 2010 on sn-devel-104
2010-10-10util: Link headers to correct subsystem, fix formatting.Jelmer Vernooij1-12/+12
2010-10-06idtree: fix right shift of signed ints, crash on large ids on AIXRusty Russell1-1/+1
Right-shifting signed integers in undefined; indeed it seems that on AIX with their compiler, doing a 30-bit shift on (INT_MAX-200) gives 0, not 1 as we might expect. The obvious fix is to make id and oid unsigned: l (level count) is also logically unsigned. (Note: Samba doesn't generally get to ids > 1 billion, but ctdb does) Reported-by: Chris Cowan <cc@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@samba.org> Autobuild-Date: Wed Oct 6 08:31:09 UTC 2010 on sn-devel-104
2010-10-04lib/util/asn1: let asn1_peek_full_tag() return an error if we fail to parse ↵Stefan Metzmacher1-1/+13
tag hdr/len metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Oct 4 14:46:40 UTC 2010 on sn-devel-104
2010-10-02s3: Fix a 64-bit BUGVolker Lendecke1-1/+1
Quick explanation why this is a problem: It is not safe to pass a pointer to a uint32_t into a routine that expects a size_t *. The routine that this pointer is passed to has no chance to find out that in reality it was passed a pointer to a uint32_t. On platforms where sizeof(size_t)==8, we get a nice overwrite of a stack area that should not be overwritten. As this happens over an over again: Does someone know a means to make gcc stop with an error in this case? Volker
2010-10-01samba: share select wrappers.Günther Deschner4-2/+242
Guenther
2010-09-29util: added BINARY_ARRAY_SEARCH_V()Andrew Tridgell1-0/+16
this is used to search an array of values