1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

390 Commits

Author SHA1 Message Date
Matthieu Patou
c4e795c6bf build: Cope with broken libiconv
library iconv needs mbrtowc but some system didn't provide it (ie.
HP-UX 11.0)

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Dec  8 23:19:19 CET 2010 on sn-devel-104
2010-12-08 23:19:19 +01:00
Andrew Tridgell
735c1cd2da s4-pkgconfig: add @LIB_RPATH@ to our link flags
this is only set when rpath is used on install. It ensures that
applications that link against Samba libraries get the rpath right

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Dec  8 12:46:00 CET 2010 on sn-devel-104
2010-12-08 12:46:00 +01:00
Matthias Dieter Wallnöfer
bd3e5804a4 Revert "lib/util:tests/time.c - "test_timestring" - fix it on Solaris"
This reverts commit 654e0102dd.
This should better be handled by the replace library.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Dec  6 12:17:31 CET 2010 on sn-devel-104
2010-12-06 12:17:31 +01:00
Matthias Dieter Wallnöfer
619a49c421 lib/util/fault.c - fix "pid_t" printf warning on Solaris
According to "http://www.ibm.com/developerworks/linux/library/l-solar/"
it's generally a 32bit "int" - therefore this cast should fit.
2010-12-06 11:28:59 +01:00
Rusty Russell
521e96ca75 idtree: fix overflow for v. large ids on allocation and removal
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
 2db1987f5a).

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-06 05:02:22 +01:00
Matthias Dieter Wallnöfer
654e0102dd lib/util:tests/time.c - "test_timestring" - fix it on Solaris
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-05 23:09:13 +01:00
Holger Hetterich
b8282a29f9 Fix bug #3185 - testparm exits 0 if it can read the config file regardless of errors
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec  4 02:30:00 CET 2010 on sn-devel-104
2010-12-04 02:30:00 +01:00
Andrew Bartlett
58920aab02 lib/debug Add clarifying comments 2010-11-24 08:37:04 +01:00
Matthias Dieter Wallnöfer
e8bae4c40a waf:lib/util - add missing dependency on talloc
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-20 23:35:48 +01:00
Andrew Bartlett
f20cf61080 Add attribute macros for Heimdal to use
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-15 01:25:06 +00:00
Jelmer Vernooij
7e8ea2ca34 unix_privs: Add missing dependency on libreplace. 2010-11-12 17:42:13 +00:00
Andrew Tridgell
cb9fba1ed3 debug: fixed default debug settings
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-04 01:48:15 +00:00
Michael Adam
50bdd93136 lib/util/charset/charconv: clarify comments in next_codepoint_convenience_ext()
Give the unicod U+<hexnumber> notation of the codepoints
referred to in the comments. Also reformat the comments some.
2010-11-03 22:45:20 +00:00
Michael Adam
c18b67235c lib/util/charset/util_unistr: clarify the comment header for strlen_m(). 2010-11-03 22:45:20 +00:00
Michael Adam
9b86df8ce8 lib/util/charset/util_unistr: add strlen_m_ext_term() - variant of strlen_m_ext() counting terminator 2010-11-03 22:45:20 +00:00
Michael Adam
82c8b31ebc lib/util/charset/util_unistr: add strlen_m_ext that takes input and output 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-03 22:45:20 +00:00
Michael Adam
72f8336865 lib/charcnv/util_unistr: add next_codepoint_ext() that accepts input charset.
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-03 22:45:20 +00:00
Michael Adam
7a2b03964c lib/charset/charcnv: rename a parameter of next_codepoint_convenience_ext() for clarity 2010-11-03 22:45:20 +00:00
Michael Adam
5829cb0a98 lib/charset/charcnv: add next_codepoint_convenience_ext() that accepts input 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-03 22:45:19 +00:00
Michael Adam
f14d84e2f2 util/charset: remove a duplicate comment.
This seems to have been copied twice from source3/ code.
2010-11-03 22:45:19 +00:00
Andrew Bartlett
db2a61ab26 debug Explain the behaviour of setup_logging() more clearly 2010-11-02 04:36:04 +00:00
Andrew Bartlett
4ae27891f8 lib/debug Use vdprintf rather than manually allocate
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-02 00:18:43 +00:00
Andrew Bartlett
e7eac0e391 lib/util Remove setup_logging_stdout()
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-11-01 23:34:06 +00:00
Matthieu Patou
9f0fb0261e build: check that if we provide -liconv we can build shared libs
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-31 18:51:54 +03:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
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-31 02:01:44 +00:00
Stefan Metzmacher
5bb7723803 lib/util: remove useless ../lib/util/mutex.*
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-26 23:29:46 +00:00
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Matthias Dieter Wallnöfer
fd7943bc80 ldb:gendb_* calls: support a "NULL" resultset parameter
This is useful for "samdb_search_count" where only the amount of entries
matters.
2010-10-25 18:58:20 +02:00
Volker Lendecke
0831807782 Add dump_data_cb() 2010-10-24 20:46:28 +00:00
Volker Lendecke
611bcfcb49 Add print_asc_cb() 2010-10-24 20:46:28 +00:00
Jelmer Vernooij
833480d3ad s4: Rename LIBSAMBA-* to libsamba-* 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
9757a0c54c s4: Rename UID_WRAPPER to uid_wrapper.
Only link to uid_wrapper when it is enabled.
2010-10-23 22:24:06 +00:00
Jelmer Vernooij
7b8549348a s4: Rename WRAP_XATTR to wrap_xattr. 2010-10-23 22:24:06 +00:00
Kai Blin
c320c1ab98 lib/util: Add tevent WERROR wrappers
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-23 07:35:28 +00:00
Kamen Mazdrashki
14cb61da8f asn1_tests: Implement negative unit-tests for ber_write_OID_String() 2010-10-22 01:48:58 +03:00
Kamen Mazdrashki
6b63ad6ff1 asn1: ber_write_OID_String() to be more picky about supplied OID
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-22 01:48:58 +03:00
Andrew Tridgell
1cbb6150a1 lib: make WRAP_XATTR a private library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:26 +11:00
Andrew Tridgell
3981399957 s4-waf: removed the XATTR and SASL aliases
these were hangovers from the old build system names

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:25 +11:00
Matthias Dieter Wallnöfer
4a33071e83 s4:lib/util/charset/iconv.c - remove a distinction which can never happen
"ret->cd_direct" is never set before. It is set in the "if" upperwards but
then the function is terminated with "return".
2010-10-21 08:28:50 +02:00
Volker Lendecke
62bea12c5d s3: Don't use talloc_autofree_context in map_file 2010-10-20 18:09:19 +02:00
Kamen Mazdrashki
099b0057be asn1_tests.c: Make test data static const 2010-10-20 13:12:17 +00:00
Kamen Mazdrashki
d057ca3e3f lib/util/asn1.c: comment spelling 2010-10-20 13:12:17 +00:00
Matthias Dieter Wallnöfer
a3f61dea40 Revert "s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "dsdb/common/util.c""
This reverts commit 8a2ce5c47c.

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-17 13:37:16 +00:00
Matthias Dieter Wallnöfer
8a2ce5c47c s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "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-17 09:40:13 +00:00
Matthias Dieter Wallnöfer
39bd4ce920 s4:lib/util/util_ldb.c - remove unused "gendb_add_ldif" call 2010-10-17 10:29:46 +02:00
Matthias Dieter Wallnöfer
be4a0d35ac s4:"wrap_casefold" - move it to "ldb_wrap.c" since it's only used there 2010-10-17 10:20:40 +02:00
Andrew Bartlett
d406e511a5 lib/debug Add DEBUGC and DEBUGADDC as dummies
This allows code that needs to also compile against the source3
debug code to compile in source4.

Andrew Bartlett
2010-10-12 02:54:16 +00:00
Jelmer Vernooij
ba02178e87 util: Fix installation path of tevent_ntstatus.h, tevent_unix.h (bug 7720).
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Oct 11 09:24:56 UTC 2010 on sn-devel-104
2010-10-11 09:24:56 +00:00
Jelmer Vernooij
904a6c3761 util: Link headers to correct subsystem, fix formatting. 2010-10-10 23:50:46 +02:00
Rusty Russell
2db1987f5a idtree: fix right shift of signed ints, crash on large ids on AIX
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-06 08:31:09 +00:00