Michael Adam [Fri, 14 Oct 2011 12:05:09 +0000 (14:05 +0200)]
libreplace: add a missing "eval" to the AC_VERIFY_C_PROTOTYPE macro
Without this eval, upon test success the corresponding actions
(like defining corresponding variables) are not taken.
Found by Timur I. Bakeyev, and based on his patch for 3.5.
(cherry picked from commit
0ef506d4f31d206c300e4f3f326edac2b60bdc15)
David Disseldorp [Mon, 3 Jun 2013 11:00:31 +0000 (13:00 +0200)]
Bug 8997: change libreplace GPL source to LGPL
libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.
The following copyright holders have agreed to the GPL->LGPL change:
lib/replace/getifaddrs.c
Copyright (C) Andrew Tridgell 1998
Copyright (C) Jeremy Allison 2007
Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
lib/replace/test/getifaddrs.c
lib/replace/socket.c
* Copyright (C) Michael Adam <obnox@samba.org> 2008
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
8a6743e4edcdff1c7860d150720483f19f3b33bb)
Jeremy Allison [Mon, 14 Jan 2013 23:22:11 +0000 (15:22 -0800)]
tevent: Fix bug 9550 - sigprocmask does not work on FreeBSD to stop further signals in a signal handler
Mask off signals the correct way from the signal handler.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 15 12:13:43 CET 2013 on sn-devel-104
Jeremy Allison [Mon, 14 Jan 2013 23:21:52 +0000 (15:21 -0800)]
lib/replace: Include sys/ucontext.h if available.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jeremy Allison [Tue, 15 Jan 2013 18:16:27 +0000 (10:16 -0800)]
lib/replace: Add ucontext configure autoconf checks.
Signed-off-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Mon, 14 Jan 2013 23:06:12 +0000 (15:06 -0800)]
lib/replace: Add missing check for sys/wait.h
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Sat, 12 Jan 2013 15:08:07 +0000 (16:08 +0100)]
Fix bug 9548: Correctly detect O_DIRECT
Tsukasa Hamano [Thu, 6 Dec 2012 21:01:33 +0000 (13:01 -0800)]
Fix bug #9471 - SEGV when using second vfs module.
Don't use default_classname_table when we obviously shoud be using
classname_table.
Reviewed by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Dec 7 17:51:50 CET 2012 on sn-devel-104
(cherry picked from commit
16d725b4f5ed77db865e2a3c27ae0eb4accca5a8)
(cherry picked from commit
25eb1af07cc09e5e019a0702c60a763cc3266196)
Stefan Metzmacher [Fri, 9 Nov 2012 07:59:36 +0000 (08:59 +0100)]
lib/addns: don't depend on the order in resp->answers[]
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
eecc1d294256210ee8c2f6ab79d21b835258a6d4)
The last 2 patches address bug #9402 - lib/addns doesn't work samba4 with a
bind9 server.
Stefan Metzmacher [Fri, 9 Nov 2012 07:55:40 +0000 (08:55 +0100)]
lib/addns: remove pointless check for resp->num_additionals != 1
We never use resp->additionals, so there's no reason to check.
This fixes dns updates against BIND9 (used in a Samba4 domain).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
b59c5db5f74f56c0536635a41ae51c389109ceb5)
Stefan Metzmacher [Tue, 13 Nov 2012 13:07:11 +0000 (14:07 +0100)]
lib/replace: replace all *printf function if we replace snprintf (bug #9390)
This fixes segfaults in log level = 10 on Solaris.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Nov 14 19:41:14 CET 2012 on sn-devel-104
(cherry picked from commit
a15da3625850d97b3da1b02308c870f820007c52)
Jelmer Vernooij [Sun, 13 May 2012 01:21:34 +0000 (03:21 +0200)]
libreplace: Fix symbol names for snprintf/asprintf/vasprintf.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun May 13 05:16:28 CEST 2012 on sn-devel-104
(cherry picked from commit
cf67da70c9a63c4dc63f287059321d6c36d1e19e)
Stefan Metzmacher [Fri, 2 Nov 2012 12:56:53 +0000 (13:56 +0100)]
lib/tsocket: optimize syscalls in tstream_readv_pdu_send()
Once we've got the first part of a pdu we try to optimize
readv calls for the rest of the pdu.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 2 Nov 2012 12:45:49 +0000 (13:45 +0100)]
lib/tsocket: disable the syscall optimization for recvfrom/readv by default
We only do the optimization on recvfrom/readv if the caller asked for it.
This is needed because in most cases we preferr to flush send
buffers before receiving incoming requests.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Matthieu Patou [Thu, 27 Sep 2012 08:22:57 +0000 (01:22 -0700)]
lib-addns: ensure that allocated buffer are pre set to 0 (bug #9259)
It avoid bugs when one of the buffer is supposed to contain a string
that is not null terminated (ie. label->label) and that we don't force
the last byte to 0.
(similar to commit
03c4dceaab82ca2c60c9ce0e09fddd071f98087b)
Joachim Schmitz [Mon, 17 Sep 2012 12:26:31 +0000 (05:26 -0700)]
libreplace: Bug 8107, Fix poll replacement to become a msleep replacement
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
7542b63188f7e73588c9abb40e36a910c87bc534)
Björn Jacke [Sun, 16 Sep 2012 00:21:39 +0000 (02:21 +0200)]
replace: add some includes for poll.h
See bug #8107
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sun Sep 16 04:05:08 CEST 2012 on sn-devel-104
(cherry picked from commit
520c9b0b0ae33e6e8fb78034cfff685f5491aab3)
(cherry picked from commit
ea96d79e21a549204a7f64307059ea877bfb9fd5)
Volker Lendecke [Mon, 8 Oct 2012 19:02:43 +0000 (12:02 -0700)]
tdb: Make tdb robust against improper CLEAR_IF_FIRST restart
When winbind is restarted, there is a potential crash in tdb. Following
situation: We are in a cluster with ctdb. A winbind child hangs
in a request to the DC. Cluster monitoring decides the node has a
problem. Cluster monitoring decides to kill ctdbd. winbind child
still hangs in a RPC request. winbind parent figures that ctdb is
dead and immediately commits suicide. winbind parent is restarted by
cluster management, overwriting gencache.tdb with CLEAR_IF_FIRST. The
CLEAR_IF_FIRST logic as implemented now will not see that a child still
has the tdb open, only the parent holds the ACTIVE_LOCK due to performance
reasons. During the CLEAR_IF_FIRST logic is done, there is a very small
window where we ftruncate(tfd, 0) the file and re-write a proper header
without a lock. When during this small window the winbind child comes
back, wanting to store something into gencache.tdb, that winbind child
will crash with a SIGBUS.
Sounds unlikely? See:
[2012/09/29 07:02:31.871607, 0] lib/util.c:1183(smb_panic)
PANIC (pid
1814517): internal error
[2012/09/29 07:02:31.877596, 0] lib/util.c:1287(log_stack_trace)
BACKTRACE: 35 stack frames:
#0 winbindd(log_stack_trace+0x1a) [0x7feb7d4ca18a]
#1 winbindd(smb_panic+0x2b) [0x7feb7d4ca25b]
#2 winbindd(+0x1a3cc4) [0x7feb7d4bacc4]
#3 /lib64/libc.so.6(+0x32900) [0x7feb7a929900]
#4 /lib64/libc.so.6(memcpy+0x35) [0x7feb7a97f355]
#5 /usr/lib64/libtdb.so.1(+0x6e76) [0x7feb7b0b0e76]
#6 /usr/lib64/libtdb.so.1(+0x3d37) [0x7feb7b0add37]
#7 /usr/lib64/libtdb.so.1(+0x863d) [0x7feb7b0b263d]
#8 /usr/lib64/libtdb.so.1(+0x8700) [0x7feb7b0b2700]
#9 /usr/lib64/libtdb.so.1(+0x2505) [0x7feb7b0ac505]
#10 /usr/lib64/libtdb.so.1(+0x25b7) [0x7feb7b0ac5b7]
#11 /usr/lib64/libtdb.so.1(tdb_fetch+0x13) [0x7feb7b0ac633]
#12 winbindd(gencache_set_data_blob+0x259) [0x7feb7d4d8449]
#13 winbindd(gencache_set+0x53) [0x7feb7d4d85b3]
#14 winbindd(gencache_del+0x5e) [0x7feb7d4d879e]
#15 winbindd(saf_delete+0x93) [0x7feb7d54b693]
#16 winbindd(+0xe507e) [0x7feb7d3fc07e]
#17 winbindd(+0xe85e5) [0x7feb7d3ff5e5]
#18 winbindd(+0xe65be) [0x7feb7d3fd5be]
#19 winbindd(+0xe7562) [0x7feb7d3fe562]
#20 winbindd(init_dc_connection+0x2e) [0x7feb7d3fe5be]
#21 winbindd(+0xe75d9) [0x7feb7d3fe5d9]
#22 winbindd(cm_connect_netlogon+0x58) [0x7feb7d3fe658]
#23 winbindd(_wbint_PingDc+0x61) [0x7feb7d410991]
#24 winbindd(+0x103175) [0x7feb7d41a175]
#25 winbindd(winbindd_dual_ndrcmd+0xb7) [0x7feb7d4107d7]
#26 winbindd(+0xf8609) [0x7feb7d40f609]
#27 winbindd(+0xf9075) [0x7feb7d410075]
#28 winbindd(tevent_common_loop_immediate+0xe8) [0x7feb7d4db198]
#29 winbindd(run_events_poll+0x3c) [0x7feb7d4d93fc]
#30 winbindd(+0x1c2b52) [0x7feb7d4d9b52]
#31 winbindd(_tevent_loop_once+0x90) [0x7feb7d4d9f60]
#32 winbindd(main+0x7b3) [0x7feb7d3e7aa3]
#33 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7feb7a915cdd]
#34 winbindd(+0xce2a9) [0x7feb7d3e52a9]
This is in a winbind child, logfiles surrounding indicate the parent
was restarted.
This patch takes all chain locks around the CLEAR_IF_FIRST introduced
tdb_new_database.
Rusty Russell [Mon, 8 Oct 2012 18:56:47 +0000 (11:56 -0700)]
tdb: Make robust against shrinking tdbs
When probing for a size change (eg. just before tdb_expand, tdb_check,
tdb_rescue) we call tdb_oob(tdb, tdb->map_size, 1, 1). Unfortunately
this does nothing if the tdb has actually shrunk, which as Volker
demonstrated, can actually happen if a "longlived" parent crashes.
So move the map/update size/remap before the limit check.
Jura Sasek [Tue, 24 Jul 2012 18:58:58 +0000 (20:58 +0200)]
Fix bug #9037 - Name clash in MD5 cause...
... the "net ads join" fails on T4 (sun4v) systems on Solaris 10.
Jeremy Allison [Thu, 31 May 2012 19:19:53 +0000 (21:19 +0200)]
Fix bug #8627: Crash bug in dns_create_probe.
Fix crash bug in dns_create_probe when dns_create_update fails.
Joseph Tam [Thu, 19 Apr 2012 18:46:16 +0000 (11:46 -0700)]
Fix bug #8877 - Syslog broken owing to mistyping of debug_settings.syslog.
Setting "syslog only = yes" did not divert log messages to syslog. The test in
lib/util/debug.c:Debug1():747
if( syslog_level < state.settings.syslog )
produces wrong results since .syslog is typed "bool" rather than "int".
The attached patch fixes this by typing this field correctly as "int".
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 20 00:06:12 CEST 2012 on sn-devel-104
(cherry picked from commit
00d5f32025bf13285ab3f8ffae914107c9eca275)
Signed-off-by: Jeremy Allison <jra@samba.org>
Ira Cooper [Sat, 4 Feb 2012 00:47:18 +0000 (16:47 -0800)]
s3-popt: Fix configure.developer builds on Solaris.
alloca.h needs to be included, or the build complains the implicit
definition of alloca.
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb 4 03:27:42 CET 2012 on sn-devel-104
(cherry picked from commit
74ca6d1ddb1c5a4fbe9ddb29566878efe1761897)
Fix bug #8743 (configure.developer build is broken).
Ira Cooper [Tue, 31 Jan 2012 20:15:36 +0000 (12:15 -0800)]
Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104
(cherry picked from commit
a1901b55cfa658f39a33d0ea120641f56453fe4e)
Andrew Bartlett [Mon, 9 May 2011 15:43:45 +0000 (17:43 +0200)]
lib/util/ Fix crash bug caused by gfree_debug()
The issue is that we should reset the debug_num_classes to 0 when we
un-initialise the debug system.
Andrew Bartlett
(cherry picked from commit
5db0cd55d4db9cc71f32dc0097e2f014c22967bc)
Fix bug #8623 (Crash when trying to browse samba printers).
Volker Lendecke [Thu, 1 Sep 2011 14:55:03 +0000 (16:55 +0200)]
Fix bug 8433, segfault in iconv.c
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Sep 1 18:25:34 CEST 2011 on sn-devel-104
(cherry picked from commit
1d4de78f567e908e0acc218630fceb0884b07d65)
Volker Lendecke [Mon, 22 Aug 2011 12:16:26 +0000 (14:16 +0200)]
s3: Fix bug 8385
Poll and select behave differently regarding error handling. When doing the
connect(2), we can not rely on poll telling us both readability and writability
upon error. Just always try a second connect(2). At least on Linux it returns 0
when it succeeded.
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Aug 25 19:39:12 CEST 2011 on sn-devel-104
(cherry picked from commit
50e30afa608dfdeae8a260730ead9761ed424dad)
Andrew Tridgell [Thu, 4 Aug 2011 02:07:19 +0000 (12:07 +1000)]
talloc: check block count aftter references test
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
73677875b46251f59b66c9713f1decc89bd2ea3e)
The last 7 patches address bug #8384 (Windows XP clients seem to crash smbd
process every once in a while).
Andrew Tridgell [Fri, 29 Jul 2011 01:57:07 +0000 (11:57 +1000)]
talloc: added test suite for talloc_free_children()
this tests the fix from Simo
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Jul 29 11:30:13 CEST 2011 on sn-devel-104
(cherry picked from commit
d004fd0b53fb6f3ae64f0e24cf51f4471d434574)
Jelmer Vernooij [Sun, 24 Apr 2011 00:39:14 +0000 (02:39 +0200)]
Fix license info for talloc in manpage.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Apr 24 03:27:54 CEST 2011 on sn-devel-104
(cherry picked from commit
fb05e82c99f0779bd44371a2bdafdd7147448dd5)
Matthias Dieter Wallnöfer [Thu, 24 Mar 2011 08:41:19 +0000 (09:41 +0100)]
talloc - improve doxygen comment of "talloc_move"
Express better that this should be a pointer of a pointer.
Reviewed-by: Tridge
(cherry picked from commit
6723e90d524c8e73f19c06b3ff28867a1a89b14b)
Matthias Dieter Wallnöfer [Thu, 31 Mar 2011 19:32:51 +0000 (21:32 +0200)]
talloc - some documentation changes
- Fix some typos
- Document better the differences in the behaviour between talloc 1.X and 2.X.
Previously this seemed a bit spongy to me.
Reviewed-by: Jelmer + Tridge
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Apr 4 11:05:42 CEST 2011 on sn-devel-104
(cherry picked from commit
513574afd759bcb3832374d3ae170f1ed0b0062b)
Simo Sorce [Wed, 27 Jul 2011 16:02:35 +0000 (12:02 -0400)]
talloc: preserve context name on talloc_free_children()
Otherwise tc->name will end up pointing to garbage when it is not
set to a const but rather to a string allocate as child of the context itself.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
(cherry picked from commit
52182a528117c4dd9624f64b34a873c0903ad70a)
Andrew Tridgell [Mon, 8 Aug 2011 08:24:32 +0000 (18:24 +1000)]
talloc: ensure the sibling linked list remains valid during a free
This ensures that the sibling list of a pointer doesn't become invalid
during a free operation. It is an alternative fix to the fix in
6f51a1f45bf4de062cce7a562477e8140630a53d, and avoids the problem of
trying to calculate the parent pointer early
This should fix the subtle spoolss talloc bug that Simo found
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Aug 9 01:53:17 CEST 2011 on sn-devel-104
(cherry picked from commit
cf986f200804ce873b43c1ecf2d5e1bd08eb8a25)
Herb Lewis [Thu, 2 Jun 2011 17:10:39 +0000 (10:10 -0700)]
Fix warning messages on Freebsd 4.6.2.
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
f0901792324425804592ac7032e3853b4d4c7829)
Fix bug #8365 (backport compiler warnings).
Jeremy Allison [Mon, 1 Aug 2011 18:49:10 +0000 (11:49 -0700)]
Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
Make SA_RESETHAND conditional on its existance.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Aug 1 22:03:45 CEST 2011 on sn-devel-104
(cherry picked from commit
0c67efdd68b9808542c090b9fd9920e4e37d85d0)
Günther Deschner [Fri, 10 Jun 2011 13:00:10 +0000 (15:00 +0200)]
lib/util/wrap_xattr.h: fix licence/copyright
Guenther
(cherry picked from commit
d228fc35f38b77877f0fd07b415df87d4ccdb812)
Günther Deschner [Fri, 10 Jun 2011 12:59:58 +0000 (14:59 +0200)]
lib/util/util_tdb.h: fix licence/copyright
Guenther
(cherry picked from commit
eaa400216570403e67f7f06db509ce90fba02c13)
Günther Deschner [Fri, 10 Jun 2011 12:59:48 +0000 (14:59 +0200)]
lib/util/util_ldb.h: fix licence/copyright
Guenther
(cherry picked from commit
4fe4487cd9391cac813ab94d7002eac6dc722f4c)
Günther Deschner [Fri, 10 Jun 2011 12:59:35 +0000 (14:59 +0200)]
lib/util/time.h: fix licence/copyright
Guenther
(cherry picked from commit
74610109ac3140713140038d10df644024796907)
Günther Deschner [Fri, 10 Jun 2011 12:59:23 +0000 (14:59 +0200)]
lib/util/data_blob.h: fix licence/copyright
Guenther
(cherry picked from commit
a602cb2a0a0bc19121232444117486d8286e0af9)
Karolin Seeger [Tue, 7 Jun 2011 17:52:06 +0000 (19:52 +0200)]
Revert "Fix bug 8196 - Many (newer) header files don't have copyright / GPL header comments."
This reverts commit
6df3ff20620b3262ff232a478312c61a207ed4ff.
Jeremy Allison [Mon, 6 Jun 2011 23:25:08 +0000 (16:25 -0700)]
Fix bug 8196 - Many (newer) header files don't have copyright / GPL header comments.
Add missing GPL headers and (C) statements.
Jeremy Allison [Fri, 3 Jun 2011 17:22:44 +0000 (10:22 -0700)]
Fix bug #8197 - winbind does not properly detect when a DC connection is dead.
Only waiting for writability doesn't get fd errors back with poll.
So always begin by selecting for readability, and if we get it then
see if bytes were available to read or it really is an error condition.
If bytes were available, remove the select on read as we know we
will retrieve the error when we've finished writing and start
reading the reply (or the write will timeout or fail).
Metze and Volker please check.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Jun 6 21:53:16 CEST 2011 on sn-devel-104
(cherry picked from commit
0efcc94fb834aeb03e8edc3034aa0cdeefdc0985)
Jeremy Allison [Fri, 3 Jun 2011 19:31:11 +0000 (12:31 -0700)]
Fix the poll() backend to correctly respond to POLLHUP|POLLERR returns on a fd selected for TEVENT_FD_WRITE only.
Don't trigger the write handler and remove the POLLOUT flag for this fd. Report errors on TEVENT_FD_READ requests only.
Metze please check !
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jun 3 22:53:52 CEST 2011 on sn-devel-104
(cherry picked from commit
dbcdf3e39c359241b743a9455ae695e14a30caa9)
Björn Jacke [Tue, 31 May 2011 07:47:17 +0000 (09:47 +0200)]
replace: remove waring if IOV_MAX is not defined
as discussed on samba-techincal we currelty don't rely on it and we don't want
to flood this warning message during compile.
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 31 18:36:53 CEST 2011 on sn-devel-104
(cherry picked from commit
65f0800a34270ff0c779c9f3feb63b02d3ec800f)
Fix bug #7998 (fails to build on Hurd because of undefined IOV_MAX or
UIO_MAXIOV).
Samuel Thibault [Fri, 3 Jun 2011 18:34:16 +0000 (20:34 +0200)]
Fix bug #7998.
(fails to build on Hurd because of undefined IOV_MAX or
UIO_MAXIOV)
Jeremy Allison [Tue, 24 May 2011 19:47:31 +0000 (12:47 -0700)]
Fix our asn.1 parser to handle negative numbers.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue May 24 22:57:16 CEST 2011 on sn-devel-104
(cherry picked from commit
e719dfd4dc178f001a5f804fb1ac4e587574415f)
Fix bug #8163 (asn.1 library does not correctly read negative integers).
Jeremy Allison [Thu, 19 May 2011 19:32:15 +0000 (12:32 -0700)]
Fix bug 8153 found when building on an IPv6-only system by Kai Blin.
When building on IPv6-only, doing:
hints.ai_family = AF_INET;
getaddrinfo("0.0.0.0", NULL, &hints, &ppres)
fails as AF_INET is unavailable on an IPv6-only system. This
causes us to fallback to our replacement getaddrinfo code
which is IPv4-only.
As we're only trying to detect a specific AIX bug here,
broaden the tests to find that bug, and also test for
working getaddrinfo in an IPv6-only safe way.
Stefan Metzmacher [Tue, 17 May 2011 06:50:45 +0000 (08:50 +0200)]
talloc: splitout _talloc_free_children_internal()
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 17 10:49:13 CEST 2011 on sn-devel-104
(cherry picked from commit
df2cb2f672569e5d113fe2e77fdc1ee16c8b646d)
The last 9 patches address bug #8140 (talloc: valgrind false positives and other
backports).
Stefan Metzmacher [Fri, 8 Apr 2011 10:30:46 +0000 (12:30 +0200)]
talloc: fixed a use after free error in talloc_free_children()
This is similar to commit
6f51a1f45bf4de062cce7a562477e8140630a53d.
metze
(cherry picked from commit
38633c9f0b7f86673f08903999583ad5b62c3548)
Stefan Metzmacher [Fri, 8 Apr 2011 10:27:05 +0000 (12:27 +0200)]
talloc: use _talloc_free_internal() in talloc_free_children()
metze
(cherry picked from commit
f3b855d2ff9576715afe50d75678829c6bc0842d)
Stefan Metzmacher [Mon, 16 May 2011 17:25:47 +0000 (19:25 +0200)]
talloc: test talloc_steal out of a talloc_pool
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 17 09:43:01 CEST 2011 on sn-devel-104
(cherry picked from commit
37b2130ed9612a7334888ecd2fee26b0b45ac271)
Stefan Metzmacher [Tue, 17 May 2011 06:20:13 +0000 (08:20 +0200)]
talloc: add memset() calls to test_pool()
This way we the pool based valgrind code.
metze
(cherry picked from commit
16cc52cf70a9918843f9761baf483338c80bf1d0)
Stefan Metzmacher [Tue, 17 May 2011 06:19:04 +0000 (08:19 +0200)]
talloc: setup the new 'tc' before TC_UNDEFINE_GROW_CHUNK() _talloc_realloc()
metze
(cherry picked from commit
c281f2fc1a359d0d3b91b94438f11bb7c88170b5)
Stefan Metzmacher [Mon, 16 May 2011 18:15:59 +0000 (20:15 +0200)]
talloc: make really sure only optimize realloc if there's only one pool chunk
*talloc_pool_objectcount(pool_tc) == 2 doesn't mean the one of the objects
is the pool itself! So we better check for == 1 and calculate the chunk count.
metze
(cherry picked from commit
7102105c8954627dc30a851327cf2642ac0783d5)
Stefan Metzmacher [Mon, 16 May 2011 18:23:13 +0000 (20:23 +0200)]
talloc: make use of _talloc_free_poolmem() in _talloc_realloc()
This should follow the same logic...
metze
(cherry picked from commit
14b662ee4f278764b9dfd620851e908d29f29fc4)
Stefan Metzmacher [Mon, 16 May 2011 17:06:07 +0000 (19:06 +0200)]
talloc: split the handling of FLAG_POOL/FLAG_POOLMEM in _talloc_free_internal
The optimization of the object_count == 1 case should only happen
for when we're not destroying the pool itself. And it should only
happen if the pool itself is still valid.
If the pool isn't valid (it has TALLOC_FLAG_FREE),
object_count == 1 does not mean that the pool is the last object,
which can happen if you use talloc_steal/move() on memory
from the pool and then free the pool itself.
Thanks to Volker for noticing this!
metze
(cherry picked from commit
2d514be1ed3b8245157a0a51186ec7f9db828202)
Andrew Bartlett [Wed, 4 May 2011 00:28:15 +0000 (10:28 +1000)]
lib/util Move source3 tdb_wrap_open() into the common code.
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in
the top level build, these options are not available for these
databases. However, having two different tdb_wrap lists is a worse
fate, so this will do for now.
Andrew Bartlett
(cherry picked from commit
14750139639b3531e57a3ca3f9e481d6e458dc06)
Andrew Bartlett [Mon, 2 May 2011 05:23:08 +0000 (15:23 +1000)]
lib/util Move more network utility functions from source3 into lib/util
This will help with the merge of the interfaces layer.
Andrew Bartlett
(cherry picked from commit
fbea52f74a80268446f45936a0cf40400aba8565)
Andreas Schneider [Thu, 14 Apr 2011 09:59:57 +0000 (11:59 +0200)]
libsmbconf: Define a doxygen group for libsmbconf.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:54:11 +0000 (11:54 +0200)]
libsmbconf: Document smbconf_transaction_cancel().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:53:25 +0000 (11:53 +0200)]
libsmbconf: Document smbconf_transaction_commit().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:52:30 +0000 (11:52 +0200)]
libsmbconf: Document smbconf_transaction_start().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:50:05 +0000 (11:50 +0200)]
libsmbconf: Document smbconf_delete_global_includes().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:49:24 +0000 (11:49 +0200)]
libsmbconf: Document smbconf_delete_includes().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:48:15 +0000 (11:48 +0200)]
libsmbconf: Document smbconf_set_global_includes().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:47:41 +0000 (11:47 +0200)]
libsmbconf: Document smbconf_set_includes().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:45:14 +0000 (11:45 +0200)]
libsmbconf: Document smbconf_get_global_includes().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:44:22 +0000 (11:44 +0200)]
libsmbconf: Document smbconf_get_includes().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:38:31 +0000 (11:38 +0200)]
libsmbconf: Document smbconf_delete_global_parameter().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:37:59 +0000 (11:37 +0200)]
libsmbconf: Document smbconf_delete_parameter().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:36:36 +0000 (11:36 +0200)]
libsmbconf: Document smbconf_get_global_parameter().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:35:11 +0000 (11:35 +0200)]
libsmbconf: Document smbconf_get_parameter().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:32:06 +0000 (11:32 +0200)]
libsmbconf: Document smbconf_set_global_parameter().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:31:17 +0000 (11:31 +0200)]
libsmbconf: Document smbconf_set_parameter().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:28:00 +0000 (11:28 +0200)]
libsmbconf: Document smbconf_delete_share().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:27:03 +0000 (11:27 +0200)]
libsmbconf: Document smbconf_get_share().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:25:07 +0000 (11:25 +0200)]
libsmbconf: Document smbconf_create_share().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:23:56 +0000 (11:23 +0200)]
libsmbconf: Document smbconf_share_exists().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:22:25 +0000 (11:22 +0200)]
libsmbconf: Document smbconf_get_share_names().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:19:36 +0000 (11:19 +0200)]
libsmbconf: Document smbconf_get_config().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:13:49 +0000 (11:13 +0200)]
libsmbconf: Document smbconf_drop().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:12:27 +0000 (11:12 +0200)]
libsmbconf: Document smbconf_changed().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:05:09 +0000 (11:05 +0200)]
libsmbconf: Document smbconf_shutdown().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:04:15 +0000 (11:04 +0200)]
libsmbconf: Document smbconf_is_writeable().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 14 Apr 2011 09:02:49 +0000 (11:02 +0200)]
libsmbconf: Document smbconf_backend_requires_messaging().
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 15:43:10 +0000 (17:43 +0200)]
libsmbconf: Convert smbconf_get_config() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 15:24:13 +0000 (17:24 +0200)]
libsmbconf: Convert smbconf_transaction_*() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 14:01:22 +0000 (16:01 +0200)]
libsmbconf: Convert smbconf_delete_includes() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 13:14:52 +0000 (15:14 +0200)]
libsmbconf: Convert smbconf_set_includes() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 12:52:52 +0000 (14:52 +0200)]
libsmbconf: Convert smbconf_get_includes() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 12:20:32 +0000 (14:20 +0200)]
libsmbconf: Convert smbconf_delete_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 11:50:53 +0000 (13:50 +0200)]
libsmbconf: Convert smbconf_get_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 11:23:26 +0000 (13:23 +0200)]
libsmbconf: Convert smbconf_set_parameter() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Mon, 11 Apr 2011 09:39:03 +0000 (11:39 +0200)]
libsmbconf: Convert smbconf_delete_share() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 8 Apr 2011 15:20:35 +0000 (17:20 +0200)]
libsmbconf: Convert smbconf_get_share() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 8 Apr 2011 13:48:01 +0000 (15:48 +0200)]
libsmbconf: Convert smbconf_create_share() to smbErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 8 Apr 2011 12:19:15 +0000 (14:19 +0200)]
libsmbconf: Convert smbconf_get_share_names() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 8 Apr 2011 08:40:02 +0000 (10:40 +0200)]
libsmbconf: Convert smbconf_drop() to sbcErr.
Signed-off-by: Michael Adam <obnox@samba.org>