ira/third_party.git
6 years agolib/replace: replace all *printf function if we replace snprintf (bug #9390) v3-5-stable
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)

The last 5 patches address bug #9390 - Solaris printf doesn't allow %s, NULL.
(cherry picked from commit 05f151c041e407514c1b35619b2f2454aa4d614b)

6 years agolibreplace: Fix symbol names for snprintf/asprintf/vasprintf.
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)
(cherry picked from commit 27405fb8cfaa56f3a39cdcd2fd635fd37af629f9)

6 years agolibreplace: fixed declaration of dprintf() on FreeBSD (cherry picked from commit...
Andrew Tridgell [Tue, 23 Mar 2010 18:06:25 +0000 (05:06 +1100)]
libreplace: fixed declaration of dprintf() on FreeBSD (cherry picked from commit a599319d0a389ff0c31dae8068cd7a78352aa9e7)
(cherry picked from commit fa16d0e4c2329fad8edde5a5e8d626a90caba6d9)

6 years agolibreplace: added replacements for dprintf() and vdprintf()
Andrew Tridgell [Thu, 11 Feb 2010 09:18:50 +0000 (20:18 +1100)]
libreplace: added replacements for dprintf() and vdprintf()

these are very useful for writing files with formatted writes

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit d6fb64c51244529388b1f79ba8220ff608e1e4de)
(cherry picked from commit 4bf8dc438318e06ee96dc1b6084dddd8700739e7)

6 years agolibreplace: some systems don't have memmem()
Andrew Tridgell [Fri, 1 Jan 2010 23:01:11 +0000 (10:01 +1100)]
libreplace: some systems don't have memmem()

added rep_memmem() and a testsuite
(cherry picked from commit fef3c910da421e890925e5e61275fc457da87f6e)
(cherry picked from commit 42057793ebb3ccdc4e63f59753bca8dd677e9748)

7 years agoFix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_sig
Jeremy Allison [Tue, 2 Aug 2011 18:49:46 +0000 (20:49 +0200)]
Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_sig

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)
(cherry picked from commit 490986add9d5e80b24e90dbfe3e3ef23ce5584a0)

7 years agolibreplace: include sys/file.h only when available
Björn Jacke [Sun, 30 May 2010 19:52:39 +0000 (21:52 +0200)]
libreplace: include sys/file.h only when available

thanks to Joachim Schmitz <schmitz@hp.com>. This fixes #7460.
(cherry picked from commit a33b6032beb45f7ba07432899236fccb133a6dfc)

8 years agoFix our asn.1 parser to handle negative numbers.
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).
(cherry picked from commit 859d13141cd831488b60e413f7141514ae4464b5)
(cherry picked from commit d210395a50b5d5043bdcfb75f670f8abab91f974)

8 years agotdb_expand: limit the expansion with huge records
Simo Sorce [Mon, 18 Apr 2011 12:45:11 +0000 (22:15 +0930)]
tdb_expand: limit the expansion with huge records

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.

Fix bug #7610 (winbindd_cache.tdb grows too large when scaled).
(cherry picked from commit c8ba5d41f3c2ab25cb9b9d0fa78b4f884d4b9721)

8 years agoFix bso#3185, return false when EOF is encountered in param name.
Holger Hetterich [Sat, 4 Dec 2010 17:18:50 +0000 (18:18 +0100)]
Fix bso#3185, return false when EOF is encountered in param name.
(cherry picked from commit a9664633c667f6d02f33b951805882258604ff1c)

8 years agoFix denial of service - memory corruption.
Jeremy Allison [Sun, 27 Feb 2011 16:58:06 +0000 (17:58 +0100)]
Fix denial of service - memory corruption.

CVE-2011-0719

Fix bug #7949 (DoS in Winbind and smbd with many file descriptors open).

All current released versions of Samba are vulnerable to
a denial of service caused by memory corruption. Range
checks on file descriptors being used in the FD_SET macro
were not present allowing stack corruption. This can cause
the Samba code to crash or to loop attempting to select
on a bad file descriptor set.

A connection to a file share, or a local account is needed
to exploit this problem, either authenticated or unauthenticated
(guest connection).

Currently we do not believe this flaw is exploitable
beyond a crash or causing the code to loop, but on the
advice of our security reviewers we are releasing fixes
in case an exploit is discovered at a later date.

8 years agos3: Fix the charset_pull routine
Volker Lendecke [Mon, 6 Sep 2010 13:13:48 +0000 (15:13 +0200)]
s3: Fix the charset_pull routine

In the push routine we do the SVAL, so we should do the SSVAL here.

Fix bug #7531 (3.5.3 unusable on solaris 10).
(cherry picked from commit 73a7100a21a50873d09cef7a100ed75c4095863f)

9 years agolib/replace: make sure IPV6_V6ONLY is available for IPv6 support
Stefan Metzmacher [Sat, 24 Apr 2010 11:07:50 +0000 (13:07 +0200)]
lib/replace: make sure IPV6_V6ONLY is available for IPv6 support

We rely on IPV6_V6ONLY being supported. See bug #7196.

metze
(cherry picked from commit 41cd6f992829c45c890f5daf78eb3019633f3620)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ae0ee660a5666b18ffaa43bebbe6808781a82c37)

9 years agolib/replace: add replacement for IPV6_V6ONLY on linux systems with broken headers
Stefan Metzmacher [Sat, 24 Apr 2010 17:02:22 +0000 (19:02 +0200)]
lib/replace: add replacement for IPV6_V6ONLY on linux systems with broken headers

This is needed on SLES8. See bug 7196.

metze
(cherry picked from commit e06cf3950252a46486aa046a4552ed6ebff175b3)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 15b509b4b03a2c19caf4abfe475666f0720b4441)

9 years agotsocket_bsd: Always use a real length for the sa_socklen, and keep it around
Andrew Bartlett [Wed, 7 Apr 2010 00:42:37 +0000 (10:42 +1000)]
tsocket_bsd: Always use a real length for the sa_socklen, and keep it around

The previous code assumed the OS would happily accept sizeof(struct
sockaddr_storage).  It seems some versions of Solaris do not like
this.

Andrew Bartlett
(cherry picked from commit f1aa4c34bf0bd7d42627024af333963b741babea)

Fix for bug #7354.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 109e407554c55a602b0c184eb7eec2ed1833b68b)

9 years agotsocket: only copy the specific part of sockaddr*
Stefan Metzmacher [Wed, 23 Dec 2009 18:34:32 +0000 (19:34 +0100)]
tsocket: only copy the specific part of sockaddr*

This makes sure we fill the unspefic bytes with 0
and have zero termination for sockaddr_un.

metze
(cherry picked from commit 17c804a67593cdb4d8646b5be6b50fddf56b3e27)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e96605da78f1a0afbaf3b0aedaf7a4730d64d3a5)

9 years agotsocket: allow AF_UNIX sockaddrs smaller than sizeof(sockaddr_un)
Stefan Metzmacher [Wed, 23 Dec 2009 18:31:41 +0000 (19:31 +0100)]
tsocket: allow AF_UNIX sockaddrs smaller than sizeof(sockaddr_un)

This is needed as getpeername() truncates the length to 2 if the
peer socket has no name.

metze
(cherry picked from commit 4784c8c3bea98592486ca973d57c99671eb68cb2)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e9f7d271e2a96d5dbce63bc454c68930cbc52d62)

9 years agotsocket: Improve the tsocket_address_bsd_sockaddr documentation.
Andreas Schneider [Thu, 25 Feb 2010 13:32:39 +0000 (14:32 +0100)]
tsocket: Improve the tsocket_address_bsd_sockaddr documentation.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 1983256c70cf07b8c8afddd024ee5fd2522ee83c)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 672b1c8f9d090b294f89bc322320d65375670660)

9 years agoSpelling fixes for tsocket API documentation.
Brad Hards [Sun, 21 Feb 2010 05:34:22 +0000 (16:34 +1100)]
Spelling fixes for tsocket API documentation.

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
(cherry picked from commit 319d3bf9d93ddfc1afbfb0c759f6d91906f915c1)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3ebaa433c1d223147b649ac50540fda733c5380e)

9 years agotsocket: Fix the description of tstream_writev_queue_send/recv (cherry picked from...
Kai Blin [Thu, 28 Jan 2010 10:16:24 +0000 (11:16 +0100)]
tsocket: Fix the description of tstream_writev_queue_send/recv (cherry picked from commit 88099bcc93fabebe3d4548f8a5aa26b585886a1c)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 5f8cb2a49e94f29da85dd62237a5f8967c44d826)

9 years agotsocket: Fix description for tstream_readv_pdu_queue_send/recv (cherry picked from...
Kai Blin [Thu, 28 Jan 2010 10:11:33 +0000 (11:11 +0100)]
tsocket: Fix description for tstream_readv_pdu_queue_send/recv (cherry picked from commit 9184f524f0e5fe828b723200182969e0e3e8685d)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 89abb42c9b1697a5b3727cfeed8e32da44732980)

9 years agotsocket: Added complete doxygen documentation.
Andreas Schneider [Wed, 16 Dec 2009 12:26:48 +0000 (13:26 +0100)]
tsocket: Added complete doxygen documentation.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 574f77f89e78997844dd6e993f9bf53476555026)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 75ed29b8b72113302dafaf2ecb149a8b52b2206d)

9 years agotsocket: Added doxygen config file.
Andreas Schneider [Mon, 21 Dec 2009 11:44:00 +0000 (12:44 +0100)]
tsocket: Added doxygen config file.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 04f3f27f7e7a4e7ae3584fe9b7ed7c5f5d556ec7)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 8810302313831195645fc83145cf930b4f5bd983)

9 years agolib/util: move TIME_T_MIN/MAX defines into header file (cherry picked from commit...
Björn Jacke [Wed, 6 Jan 2010 23:40:09 +0000 (00:40 +0100)]
lib/util: move TIME_T_MIN/MAX defines into header file (cherry picked from commit 571ee54b791b93ad46e09ed563ef4a5582dcf0c8)
(cherry picked from commit 42d89dbd9407fcdef989387208dd8cae8472a6e8)

9 years agos3: signals are processed twice in child.
Bo Yang [Tue, 9 Feb 2010 09:02:20 +0000 (17:02 +0800)]
s3: signals are processed twice in child.

Signed-off-by: Bo Yang <boyang@samba.org>
(cherry picked from commit 8c8bb51de1ac2baa46ac0736fae12c034288e5d4)

Fix bug #7206 (duplicate signal handler, signals are processed twice in child
process).
(cherry picked from commit 3d10185c518608c332d41e2814e49cfce47d02e6)

9 years agos3: Add tdb_data_equal (cherry picked from commit ebc08b9938a4d266be16ca7e06d27813952...
Volker Lendecke [Thu, 3 Dec 2009 17:43:49 +0000 (18:43 +0100)]
s3: Add tdb_data_equal (cherry picked from commit ebc08b9938a4d266be16ca7e06d27813952cd00f)
(cherry picked from commit 3f64cba12aea87ad57bd52547f7dc312cd9e8636)

9 years agotalloc_stack: reset stackframe pointers to NULL
Stefan Metzmacher [Mon, 15 Mar 2010 13:39:11 +0000 (14:39 +0100)]
talloc_stack: reset stackframe pointers to NULL

This makes it easier to debug the code in future.

metze
(cherry picked from commit d23581b4d7a4936002c1d2d748836aead9215120)
(cherry picked from commit 29eb47bdaf9a80e819c30e4c1fac9d07040d32bc)

9 years agotalloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
Stefan Metzmacher [Mon, 15 Mar 2010 13:32:52 +0000 (14:32 +0100)]
talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]

In smbd there's a small gab between TALLOC_FREE(frame); before
we call smbd_parent_loop() where we don't have a valid talloc stackframe.

smbd_parent_loop() calls talloc_stackframe() only within the while(1) loop.
As DEBUG(2,("waiting for connections")) uses talloc_tos() to construct
the time header for the debug message we crash on some systems.

metze
(cherry picked from commit 10ed809a1a31be50ce09142eb99b3a243ae8b940)
(cherry picked from commit 0c0e54cbb967150b91b3d83fb75c8c971875cb21)

9 years agotsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()
Stefan Metzmacher [Wed, 17 Feb 2010 18:11:11 +0000 (19:11 +0100)]
tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()

metze
(cherry picked from commit c42d9c4ec410e205091784cd97cbceb5572609d8)
(cherry picked from commit d68c7db67dc8f87be8a924d1b2b66379fc52b723)

9 years agoFix commit d07cd37b993d3c9beded20323174633b806196b5
Jeremy Allison [Wed, 17 Feb 2010 17:24:34 +0000 (09:24 -0800)]
Fix commit d07cd37b993d3c9beded20323174633b806196b5

Which was:

    tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD

Metze, this has to have been wrong - you are throwing away the talloc_realloc
pointer returned. Also no error checking. Please review.

Thank goodness for gcc warnings :-).

Jeremy.
(cherry picked from commit 936828de71023d90aaec6c1dba84052246bbad11)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ba85facc2ce212d52140086f876eb4915b40bf22)

9 years agotsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD
Stefan Metzmacher [Wed, 17 Feb 2010 12:53:02 +0000 (13:53 +0100)]
tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD

metze
(cherry picked from commit d07cd37b993d3c9beded20323174633b806196b5)
(cherry picked from commit b9e7200f933480bce20219f0294364288be3a5df)

9 years agotsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets
Stefan Metzmacher [Wed, 17 Feb 2010 08:33:18 +0000 (09:33 +0100)]
tsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets

Some system already have this as default. It's easier
to behave the same way on all systems and handle ipv6
and ipv4 sockets separate.

metze
(cherry picked from commit 1ffcb991a900b78c9175f6b093839fe96b1bd7d9)
(cherry picked from commit d1dfa2e92fea3dc54771c4b1a6e3c06ee478b54f)

9 years agotsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if...
Stefan Metzmacher [Wed, 17 Feb 2010 07:49:28 +0000 (08:49 +0100)]
tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if the local address is any

metze
(cherry picked from commit 8a0949dfc8d2ecf577dfc5ef38496421101b734e)
(cherry picked from commit b4a5c3325a272c97658aaede1f1c659260524789)

9 years agotsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connec...
Stefan Metzmacher [Wed, 17 Feb 2010 07:45:58 +0000 (08:45 +0100)]
tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connect_send()

This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX
sockets. Also some platforms require exact values for AF_INET and AF_INET6.

metze
(cherry picked from commit 6637b2f4b06fcee1e8e1b1782dd96e3273f8caac)
(cherry picked from commit c84c467be347384ab1ceb7d74147fef364678235)

9 years agotsocket/bsd: fix do_bind logic for AF_INET
Stefan Metzmacher [Wed, 17 Feb 2010 07:42:22 +0000 (08:42 +0100)]
tsocket/bsd: fix do_bind logic for AF_INET

We want the explicit bind() when we don't use the any address.

metze
(cherry picked from commit 135543b4c300e2fc31ee4165ce630644e1aef455)
(cherry picked from commit fc63303b07b09f6d6855284f4e0080972fe424f7)

9 years agosocket_wrapper: also ignore AF_INET6 in swrap_setsockopt()
Stefan Metzmacher [Wed, 17 Feb 2010 08:43:00 +0000 (09:43 +0100)]
socket_wrapper: also ignore AF_INET6 in swrap_setsockopt()

metze
(cherry picked from commit 0b3e950731fe72a258a631e39ca1304d54663536)
(cherry picked from commit 6aa09416ad5f27e3db679765657b67e54dde5fd9)

9 years agotdb: raise version to 1.2.1
Simo Sorce [Sat, 6 Feb 2010 15:48:39 +0000 (10:48 -0500)]
tdb: raise version to 1.2.1

after recent fixes we need to raise the version to 1.2.1 so that
we can require also the right patched version.

Original commit was 70534adee10fc6f5bba2d9304668dc6508e5de5a in master.
source4/min_versions.m4 was copied from the master branch.
(cherry picked from commit 70128dded977498ef5a693214053192f13c93c6b)

9 years agoutil: added binsearch.h for binary array searches
Andrew Tridgell [Thu, 10 Dec 2009 03:35:24 +0000 (14:35 +1100)]
util: added binsearch.h for binary array searches

This was moved from the schema_query code. It will now be used in more
than one place, so best to make it a library macro. I think there are
quite a few places that could benefit from this.
(cherry picked from commit 71943e8858943718affb6a3c0ded2127f07057f0)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 448b8f35d7a7cff73d35304673302178f593c9d0)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 6b24639c08b764eb0205c63674e80b303b2be2ac)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit dd7a09d2098fe0951f8dc716aba1bc9c7a485219)

9 years agotdb: fix an early release of the global lock that can cause data corruption
Volker Lendecke [Fri, 29 Jan 2010 17:21:09 +0000 (18:21 +0100)]
tdb: fix an early release of the global lock that can cause data corruption

There was a bug in tdb where the

                tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);

(ending the transaction-"mutex") was done before the

                        /* remove the recovery marker */

This means that when a transaction is committed there is a window where another
opener of the file sees the transaction marker while the transaction committer
is still fully functional and working on it. This led to transaction being
rolled back by that second opener of the file while transaction_commit() gave
no error to the caller.

This patch moves the F_UNLCK to after the recovery marker was removed, closing
this window.
(cherry picked from commit 531059696e17d1ee538310d81af309c107d08e3e)

Fix bug #7085.
(cherry picked from commit ad17c1ab08e15ebf1d3d3aac1e874e9602a15e75)

9 years agolib/popt: Fix typo in README.
Karolin Seeger [Mon, 25 Jan 2010 18:54:24 +0000 (19:54 +0100)]
lib/popt: Fix typo in README.

Karolin
(cherry picked from commit 463aa06442f1d6c7088c5d47f003b82e4293b70d)
(cherry picked from commit 007dbc57a954e3eea6db191b34f3be9ab3c4a9b6)

9 years agotdb: fix standalone 'make installdocs'
Stefan Metzmacher [Wed, 6 Jan 2010 13:39:43 +0000 (14:39 +0100)]
tdb: fix standalone 'make installdocs'

metze
(cherry picked from commit c01f443ebca5e0b6f65fe8b3ab031da51dce2e89)
(cherry picked from commit 6a1786aaf88bbc38eebbd489cfe582602bd034e2)

9 years agotdb: create symbol links to shared libraries see https://bugzilla.samba.org/show_bug...
Brian Lu [Thu, 17 Dec 2009 06:39:09 +0000 (14:39 +0800)]
tdb: create symbol links to shared libraries see https://bugzilla.samba.org/show_bug.cgi?id=6991 for details

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 0a3a6bb8f910df02cb429fdeacf0ab8d683e0b89)
(cherry picked from commit 3c5de3c3f8fb665a0e1e9c1982a6f98d8ae9a1ff)

9 years agotalloc: create symbol links to shared libraries see https://bugzilla.samba.org/show_b...
Brian Lu [Thu, 17 Dec 2009 06:48:59 +0000 (14:48 +0800)]
talloc: create symbol links to shared libraries see https://bugzilla.samba.org/show_bug.cgi?id=6991 for details

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit eff6022d51f578dfc48f1d66dd8ec1e860dfd7b3)
(cherry picked from commit d3e8baf29756c7af38841b290ad67eb06a474bb3)

9 years agotevent: create symbol links to shared libraries see https://bugzilla.samba.org/show_b...
Brian Lu [Thu, 17 Dec 2009 06:55:57 +0000 (14:55 +0800)]
tevent: create symbol links to shared libraries see https://bugzilla.samba.org/show_bug.cgi?id=6991 for details

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit f408d58d95f5ac10849742fdcdf7e6160196e8e0)
(cherry picked from commit b4f95b214cf7a328f2656fa81395566e9905ff6e)

9 years agotdb: Also build and install tdb manpages from standalone tdb.
Jelmer Vernooij [Sun, 20 Dec 2009 17:01:24 +0000 (18:01 +0100)]
tdb: Also build and install tdb manpages from standalone tdb.
(cherry picked from commit 0110990f01390c80b8db423ba7eed486883219de)

(Version changed to 3.5)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 2e0df7c8ee5615cb8b1ea3abe727ab59c4bf1f95)

9 years agoFix release script to work with recent git versions
Simo Sorce [Tue, 15 Dec 2009 14:17:25 +0000 (09:17 -0500)]
Fix release script to work with recent git versions
(cherry picked from commit 7f956869ff7a8e481afb9db0c52a0d74d809867a)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 6fa974ec35e7c83bbef05f21ee2a20100346ba57)

9 years agotalloc: Fix exports and increment talloc version
Simo Sorce [Wed, 14 Oct 2009 14:50:19 +0000 (10:50 -0400)]
talloc: Fix exports and increment talloc version
(cherry picked from commit 6618a062a19660a718074f6e6155339451b7a5b6)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit fdfe8da31be7f658c3a584eda20e3faeb2a19cac)

9 years agotalloc: Make abi checks in release script
Simo Sorce [Wed, 14 Oct 2009 14:57:17 +0000 (10:57 -0400)]
talloc: Make abi checks in release script

Make always sure the exports and signature files are up to date before
shipping a release.
(cherry picked from commit 8fb483b2964f1222c013df42ba8be544269da612)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit c751ceb929c5f025648aa4f3a5e746287eeee726)

9 years agotalloc: Move release script under /script too
Simo Sorce [Wed, 14 Oct 2009 14:55:11 +0000 (10:55 -0400)]
talloc: Move release script under /script too
(cherry picked from commit 8e6df560b74d7e9b94dd47625de56bc1dc0bc6d7)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit f4c910b78d475e6b83feb612425ec6b64f596d86)

9 years agotalloc: Change the way mksysms work
Simo Sorce [Wed, 14 Oct 2009 14:20:28 +0000 (10:20 -0400)]
talloc: Change the way mksysms work

Make sure we always have a sorted (per file) export file.
This way we can directly compare the real export and the check file w/o having
to further sort things.

Also return error code from abi_checks.sh if warnings were reported
(cherry picked from commit 2d6d6bcb5de87ce0dbce13ff6bc775b953438b75)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit fed2560341c6cbbeee512111f1cd7fb544c80c21)

9 years agoFix release script with newer versins of git
Simo Sorce [Mon, 7 Dec 2009 14:25:03 +0000 (09:25 -0500)]
Fix release script with newer versins of git
(cherry picked from commit 4334092cbae28181ba0d1cf2ac026961f2192972)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 636f199b4fc75275c1bd175d1b939b95ad144289)

9 years agotdb tools: Mostly cosmetic adaptions
Matthias Dieter Wallnöfer [Fri, 16 Oct 2009 17:02:02 +0000 (19:02 +0200)]
tdb tools: Mostly cosmetic adaptions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 9776cb03450d21da5d454e683bdba29793ba3f67)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 79be7337bda044637940b084a4480bd9a71e41b0)

9 years agotdb: change version to 1.2.0 after adding TDB_*ALLOW_NESTING
Stefan Metzmacher [Thu, 19 Nov 2009 08:49:03 +0000 (09:49 +0100)]
tdb: change version to 1.2.0 after adding TDB_*ALLOW_NESTING

metze
(cherry picked from commit 5ca0a4bfd6fdbb515835682a12f715283b46cb3e)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 57c5bd874666234419a976d0b4d8a68fda5cf9c5)

9 years agotdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behavior
Stefan Metzmacher [Thu, 19 Nov 2009 08:34:05 +0000 (09:34 +0100)]
tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behavior

We need to keep TDB_ALLOW_NESTING as default behavior,
so that existing code continues to work.

However we may change the default together with a major version
number change in future.

metze
(cherry picked from commit 3b9f19ed919fef2e88b2f92ae541e07bc7379cd1)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 1383e232cc7d20e64a04eb912d7d8a8ae5a5b5a9)

9 years agoNew attempt at TDB transaction nesting allow/disallow.
Ronnie Sahlberg [Mon, 25 May 2009 07:04:42 +0000 (17:04 +1000)]
New attempt at TDB transaction nesting allow/disallow.

Make the default be that transaction is not allowed and any attempt to create a nested transaction will fail with TDB_ERR_NESTING.

If an application can cope with transaction nesting and the implicit
semantics of tdb_transaction_commit(), it can enable transaction nesting
by using the TDB_ALLOW_NESTING flag.
(cherry picked from ctdb commit 3e49e41c21eb8c53084aa8cc7fd3557bdd8eb7b6)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 436b55db1ff238ec467b07a74b088f6fcfaf927c)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e6669e7f563f7be27ecb9872ea3ef148236dea3c)

9 years agotdb: always set tdb->tracefd to -1 to be safe on goto fail
Stefan Metzmacher [Thu, 19 Nov 2009 08:38:48 +0000 (09:38 +0100)]
tdb: always set tdb->tracefd to -1 to be safe on goto fail

metze
(cherry picked from commit 85449b7bcc4bd7948bea38b5514a02357950a002)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 2159f25dac59966cfa4cd627ddbb544e09d12a07)

9 years agotdb: update README a bit
Kirill Smelkov [Wed, 21 Oct 2009 17:18:58 +0000 (21:18 +0400)]
tdb: update README a bit

While studying tdb, I've noticed a couple of mismatches between readme
and actual code:

- tdb_open_ex changed it's log_fn argument to log_ctx
- there is now no tdb_update(), which it seems was transformed into
  non-exported tdb_update_hash()

There were other mismatches, but I don't remember them now, sorry.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 83de5c826313aa09c76131ae70550bd81b3521c5)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit d01b4d0dc8e5715fb4c9f691a2dc7c8653566cad)

9 years agotdb: add tests for double .close() in pytdb
Kirill Smelkov [Wed, 21 Oct 2009 17:18:57 +0000 (21:18 +0400)]
tdb: add tests for double .close() in pytdb

The reason I do it is that when using older python-tdb as shipped in
Debian Lenny, python interpreter crashes on this test:

    (gdb) bt
    #0  0xb7f8c424 in __kernel_vsyscall ()
    #1  0xb7df5640 in raise () from /lib/i686/cmov/libc.so.6
    #2  0xb7df7018 in abort () from /lib/i686/cmov/libc.so.6
    #3  0xb7e3234d in __libc_message () from /lib/i686/cmov/libc.so.6
    #4  0xb7e38624 in malloc_printerr () from /lib/i686/cmov/libc.so.6
    #5  0xb7e3a826 in free () from /lib/i686/cmov/libc.so.6
    #6  0xb7b39c84 in tdb_close () from /usr/lib/libtdb.so.1
    #7  0xb7b43e14 in ?? () from /var/lib/python-support/python2.5/_tdb.so
    #8  0x0a038d08 in ?? ()
    #9  0x00000000 in ?? ()

master's pytdb does not (we have a check for self->closed in obj_close()),
but still...

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 71a21393dd1bb61bded82b1581ac6d5bd3b0153c)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit c739d4c1f56dd8e137123468d13c05f52eeab8b9)

9 years agotdb: reset tdb->fd to -1 in tdb_close()
Kirill Smelkov [Wed, 21 Oct 2009 17:18:56 +0000 (21:18 +0400)]
tdb: reset tdb->fd to -1 in tdb_close()

So that erroneous double tdb_close() calls do not try to close() same
fd again. This is like SAFE_FREE() but for fd.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit b4424f8234a78a79fb2d71d46ca208b4f12e0f9e)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 4df5dc8c5387707fa0cd628907d68026f0251fb9)

9 years agotdb: fix typo in python's Tdb.get() docstring
Kirill Smelkov [Wed, 21 Oct 2009 17:18:55 +0000 (21:18 +0400)]
tdb: fix typo in python's Tdb.get() docstring

It's Tdb.get(), not Tdb.fetch().

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit cfed5f946de0992a594c189ee3c19cf98e59d380)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 701c5e5a2c14c7c1914a1acf73579b5f7867dc9a)

9 years agotdb: kill last bits from swig
Kirill Smelkov [Wed, 21 Oct 2009 17:18:54 +0000 (21:18 +0400)]
tdb: kill last bits from swig

We no longer use swig for pytdb, so there is no need for swig make
rules. Also pytdb.c header should be updated.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit ecbe5ebd8d1c44a478c613eb1cace0521142d0d3)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 4177155348900c10de3fe2c5799ed4cdc11f282c)

9 years agotsocket: Fixed tsocket_guide.txt asciidoc syntax.
Andreas Schneider [Tue, 15 Dec 2009 11:58:18 +0000 (12:58 +0100)]
tsocket: Fixed tsocket_guide.txt asciidoc syntax.
(cherry picked from commit a5bdab8b32768282270315f880f980d99ebb9a2e)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ccd782844fc794ad1c1db4205aab1958bfa552a9)

9 years agotsocket: Fixed documentation for tsocket_address_bsd_sockaddr().
Andreas Schneider [Tue, 15 Dec 2009 11:57:35 +0000 (12:57 +0100)]
tsocket: Fixed documentation for tsocket_address_bsd_sockaddr().
(cherry picked from commit e33ae22b87597f31caefd5466bb8e8f240405972)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 797accfd5fb0fdc4ddf69ed2dd71d7926b49cdca)

9 years agotsocket: Fixed typo in LGPL header.
Andreas Schneider [Tue, 15 Dec 2009 11:56:44 +0000 (12:56 +0100)]
tsocket: Fixed typo in LGPL header.
(cherry picked from commit ab04dd3be743806bf3c9cf9db4b5326ce0476bf5)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit d0c59bbb135ebeec71a4b11d41b3b4e5096857af)

9 years agotsocket: add tsocket_address_bsd_sockaddr() and tsocket_address_bsd_from_sockaddr()
Stefan Metzmacher [Wed, 4 Nov 2009 18:03:41 +0000 (19:03 +0100)]
tsocket: add tsocket_address_bsd_sockaddr() and tsocket_address_bsd_from_sockaddr()

metze
(cherry picked from commit edbf2caa6f8273227229cd8f1b293e95c6a6122d)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit d226fce23c122b515426659b8a9149a29b9e427c)

9 years agotevent: prefix types and defined with tevent_ and TEVENT_
Stefan Metzmacher [Sun, 20 Dec 2009 12:59:03 +0000 (13:59 +0100)]
tevent: prefix types and defined with tevent_ and TEVENT_

This fixes the build warnings on some build-farm hosts.

metze
(cherry picked from commit 4b7a6b1f8ff9ffe984612e1a303473d7a0865c0c)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 5a4f0e5e665870f34b5cc7e4f73ed88cf7bcd8c4)

9 years agoOutput %p as unsigned in snprintf replacement.
Peter Rosin [Sat, 19 Dec 2009 18:43:52 +0000 (19:43 +0100)]
Output %p as unsigned in snprintf replacement.
(cherry picked from commit 8aba573cd9cd1c1f10b8aa9363e0b6dad2933bef)

9 years agotdbtool: avoid using c++ reserved words.
Günther Deschner [Wed, 16 Dec 2009 23:13:23 +0000 (00:13 +0100)]
tdbtool: avoid using c++ reserved words.

Guenther
(cherry picked from commit a23084e1e89a44cf692f6e205263ee53371b80c9)
(cherry picked from commit 600b632d7bf04998e5078153553c48953475202b)

9 years agotalloc: Fix write behind memory block
Kamen Mazdrashki [Sat, 5 Dec 2009 19:44:15 +0000 (21:44 +0200)]
talloc: Fix write behind memory block

If ALWASY_REALLOC is defined and we are to 'shrink' memory block,
memcpy() will write outside memory just allocated.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
(cherry picked from commit 8efabcc8a5dcd83deed8ef8e17826a1d347e6d83)
(cherry picked from commit dd38f159860bc3d7a454992ce56ea3500e81aed4)

9 years agotevent: Fix a comment
Volker Lendecke [Thu, 26 Nov 2009 16:18:00 +0000 (17:18 +0100)]
tevent: Fix a comment
(cherry picked from commit dbef8410476bc1eaa8bd68f8996da97782e5b13f)

9 years agoutil: str_list_unique() bugfix
Kamen Mazdrashki [Fri, 13 Nov 2009 01:57:48 +0000 (03:57 +0200)]
util: str_list_unique() bugfix

j is actually the index of the last element in the list
size of the list though is j+1 <- to make room for the
terminating NULL element
(cherry picked from commit 5b75201dbb9f2e6799fd5c3eee8da6230caee96c)
(cherry picked from commit 8a5c8d559e6b34544a3cc0811d269d46bcad5182)

9 years agoutil: str_list_unique_2() test implementation
Kamen Mazdrashki [Fri, 13 Nov 2009 01:56:07 +0000 (03:56 +0200)]
util: str_list_unique_2() test implementation

Difference with previous test for str_list_unique() is
that this test allows number of elements and number
of duplicates to be supplied on command line using
--option="list_unique:count=47"
--option="list_unique:dups=7"
(cherry picked from commit b7839b73b10746c374ca2ed96eb152fa3a03e66a)
(cherry picked from commit c2a511b8c95a92676fbf0895d3a6fd627662ecb8)

9 years agolib/util Fix comments in rfc1738.c.
Andrew Bartlett [Mon, 2 Nov 2009 05:39:31 +0000 (16:39 +1100)]
lib/util Fix comments in rfc1738.c.

The Samba version does not use static buffers

Andrew Bartlett
(cherry picked from commit 5a8f21cb88e7579c12b3d97299f355bb64957a87)
(cherry picked from commit 0f4674c62cb5ed651221a06f05fe3985351e92db)

9 years agolib/util Use rfc1738.c from Squid for all our URL encode/decode needs.
Andrew Bartlett [Thu, 29 Oct 2009 21:58:34 +0000 (08:58 +1100)]
lib/util Use rfc1738.c from Squid for all our URL encode/decode needs.

Andrew Bartlett
(cherry picked from commit 7a290130bdeb411625f16451af3f2cfd25eeaf00)
(cherry picked from commit fa0f418baa628e63cf2b04e769c840eefa9aa61e)

9 years agolib/util Add rfc1738 escape/unescape code from Squid
Andrew Bartlett [Thu, 29 Oct 2009 06:09:49 +0000 (17:09 +1100)]
lib/util Add rfc1738 escape/unescape code from Squid

This is intended to replace our rfc1738_unescape(), and give us an
rfc1738_escape implementation (and hopefully is better tested and more
secure).

Andrew Bartlett
(cherry picked from commit 87195f55de771546ea74c0ab06d882f900588099)
(cherry picked from commit 4e4c75422f07447622d30192c93ffbd4a7874bc2)

9 years agotdb: Fix a C++ warning
Volker Lendecke [Fri, 6 Nov 2009 13:04:49 +0000 (14:04 +0100)]
tdb: Fix a C++ warning
(cherry picked from commit 06b7a09c02aa5345d675c04449d54f6c0f8c13d0)

9 years agotdr: teach TDR about uint1632 enums
Andrew Tridgell [Tue, 6 Oct 2009 19:39:03 +0000 (06:39 +1100)]
tdr: teach TDR about uint1632 enums

TDB doesn't have NDR64, but it needs to know how to map the new types
from pidl
(cherry picked from commit 1d0fb1e0fba3cf4d04d4602ed4e717912804e5de)
(cherry picked from commit eea15d8f117e07d3e121e087d23e50d94a7c6355)

9 years agotsocket: rewrite tsocket_guide.txt to reflect the current APIs
Stefan Metzmacher [Tue, 3 Nov 2009 17:06:17 +0000 (18:06 +0100)]
tsocket: rewrite tsocket_guide.txt to reflect the current APIs

metze
(cherry picked from commit 97a32035bec03b76b67cb7088a7be1b7b3b9ac48)
(cherry picked from commit bdd16229819f524078eb6cc3a8acf9c775985a20)

9 years agotsocket_bsd: return -1 and set errno to ENAMETOOLONG if the unix path is too long
Stefan Metzmacher [Tue, 3 Nov 2009 16:23:07 +0000 (17:23 +0100)]
tsocket_bsd: return -1 and set errno to ENAMETOOLONG if the unix path is too long

metze
(cherry picked from commit eb39f6694055267302580bbf6afa988c82c55fed)
(cherry picked from commit 31f1d6f658827519c5dc51a4e32f95931d01d0b7)

9 years agotsocket: remove prototype of non-existing tsocket_address_inet_set_broadcast()
Stefan Metzmacher [Tue, 3 Nov 2009 16:22:27 +0000 (17:22 +0100)]
tsocket: remove prototype of non-existing tsocket_address_inet_set_broadcast()

metze
(cherry picked from commit 9b5d1e9e355d3d04f03744e025c6685ca8ad12cd)
(cherry picked from commit 36801f06f389c2e5ecd7d53db1e38e601fa48160)

9 years agotdb: detect tdb store of identical records and skip
Andrew Tridgell [Fri, 23 Oct 2009 11:45:03 +0000 (22:45 +1100)]
tdb: detect tdb store of identical records and skip

This can help with ldb where we rewrite the index records
(cherry picked from commit 2466798cc4cb46e8689d43bae0403119266dbe9e)

9 years agotdb: rename 'struct list_struct' into 'struct tdb_record'
Stefan Metzmacher [Fri, 23 Oct 2009 11:51:03 +0000 (13:51 +0200)]
tdb: rename 'struct list_struct' into 'struct tdb_record'

metze
(cherry picked from commit 1f3ea8778ae8ef7d3333accaf3f1950637d19c98)

9 years agolib/tdb: make tdbtool use tdb_check() for "check" command
Rusty Russell [Wed, 21 Oct 2009 13:41:34 +0000 (00:11 +1030)]
lib/tdb: make tdbtool use tdb_check() for "check" command

Also, set logging function so we get more informative messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit d94a4d44ea644c82925c5901af491a35f0ba611d)

9 years agolib/tdb: add tdb_check()
Rusty Russell [Wed, 21 Oct 2009 13:40:34 +0000 (00:10 +1030)]
lib/tdb: add tdb_check()

ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
loops in their hash chains.  tdb_check() provides this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 2e6f7dfa793e0a5c46397dc18f65974c77a73b23)

9 years agolib/tdb: add -t (always use transactions) option to tdbtorture
Rusty Russell [Wed, 21 Oct 2009 13:40:54 +0000 (00:10 +1030)]
lib/tdb: add -t (always use transactions) option to tdbtorture

This means you can kill it at any time and expect no corruption.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 12da0557bc3346972d65eaf05a0c80ce0884c4e0)

9 years agolib/tdb: wean off TDB_ERRCODE.
Rusty Russell [Wed, 21 Oct 2009 13:39:43 +0000 (00:09 +1030)]
lib/tdb: wean off TDB_ERRCODE.

It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch.
In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in
the header is useless (the struct tdb_context isn't defined, so it's doubly useless).
Also, we should never set errno, as io.c was doing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 2b13c2108f8b746dbe866fc14dd5e6045b0d12ea)

9 years agolib/tdb: TDB_TRACE support (for developers)
Rusty Russell [Tue, 20 Oct 2009 01:49:41 +0000 (12:19 +1030)]
lib/tdb: TDB_TRACE support (for developers)

When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb operations is enabled.
This can be replayed using "replay_trace" from http://ccan.ozlabs.org/info/tdb.

The majority of this patch comes from moving internal functions to _<funcname> to
avoid double-tracing.  There should be no additional overhead for the normal (!TDB_TRACE)
case.

Note that the verbose traces compress really well with rzip.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 97973362b405e365b9249d95da02ebf3465bb4e1)

9 years agoutil: fixed place where we could look one byte past end of string
Andrew Tridgell [Thu, 22 Oct 2009 00:03:27 +0000 (11:03 +1100)]
util: fixed place where we could look one byte past end of string

We need to check the length before the value
(cherry picked from commit dcdec1663c1bba90ebe59abed0d0f70772f0eb64)

9 years agolib-util: check for too many combinations in generate_unique_strs()
Andrew Tridgell [Tue, 20 Oct 2009 00:34:49 +0000 (11:34 +1100)]
lib-util: check for too many combinations in generate_unique_strs()
(cherry picked from commit e94c54ff3c83d0d19e0157216632bc99d5f8d0e3)

9 years agotdb: fixed the intermittent failure of tdbtorture in the build farm
Andrew Tridgell [Mon, 19 Oct 2009 23:59:40 +0000 (10:59 +1100)]
tdb: fixed the intermittent failure of tdbtorture in the build farm

There was a race condition that caused the torture.tdb to be left in a
state that needed recovery. The torture code thought that any message
from the tdb code was an error, so the "recovered" message, which is a
TDB_DEBUG_TRACE message, marked the run as being an error when it
isn't.
(cherry picked from commit 7e75d3c4fa1a7a6d3c967d6f108df0ab2ffa02ad)

9 years agoutil: fixed generate_unique_strs() to be portable
Andrew Tridgell [Mon, 19 Oct 2009 11:47:45 +0000 (22:47 +1100)]
util: fixed generate_unique_strs() to be portable

'place' was going negative, and giving undefined results. The result
was duplicate names which gave errors in SMB2-DIR on PPC and other
systems.
(cherry picked from commit 72ae44918a6c8e0a11747441f2bbd5152022f98c)

9 years agoFix builds with external tdb
Simo Sorce [Sun, 11 Oct 2009 13:42:59 +0000 (09:42 -0400)]
Fix builds with external tdb

Make sure we do not reference our internal tdb directly.
Let configure define what tdb.h file to use so that builds that use an
extrenal tdb do not include 2 different versions of the tdb header.
(cherry picked from commit dce488bc35af7ec137b657448708914edf5df706)

9 years agoFix builds with external talloc
Simo Sorce [Fri, 9 Oct 2009 17:14:08 +0000 (13:14 -0400)]
Fix builds with external talloc

Make sure we do not reference our internal talloc directly.
Let configure define what talloc.h file to use so that builds that use an
extrenal talloc do not include 2 different versions of the talloc header.
(cherry picked from commit 030fbf28fc963065853c08015c34827656c29bfd)

9 years agolib/tdr: get rid of build warning when using TDR_ALLOC macro.
Günther Deschner [Thu, 1 Oct 2009 23:25:13 +0000 (01:25 +0200)]
lib/tdr: get rid of build warning when using TDR_ALLOC macro.

Guenther
(cherry picked from commit ab8a16c77f8222115493bbc295318a7d9ceb6d38)
(cherry picked from commit 804be72c085b3add97043149c78b767820d182f5)

9 years agoNULL is not a valid event context.
Jeremy Allison [Thu, 1 Oct 2009 23:18:33 +0000 (16:18 -0700)]
NULL is not a valid event context.
Jeremy.
(cherry picked from commit 2820dc529a04985b7223603e826f6b9905d2611b)

9 years agoMerge commit 'origin/v3-5-test' into v3-5-test
Karolin Seeger [Wed, 30 Sep 2009 12:36:06 +0000 (14:36 +0200)]
Merge commit 'origin/v3-5-test' into v3-5-test

Re-sync with current master branch as requested on samba-technical.

9 years agopidl: Avoid using talloc_free as function pointer, since it may be a
Jelmer Vernooij [Mon, 28 Sep 2009 13:03:17 +0000 (15:03 +0200)]
pidl: Avoid using talloc_free as function pointer, since it may be a
macro.

9 years agoparmlist: Add more tests.
Jelmer Vernooij [Sun, 27 Sep 2009 15:37:53 +0000 (17:37 +0200)]
parmlist: Add more tests.

9 years agoparmlist: Add basic tests for test_get_int().
Jelmer Vernooij [Sun, 27 Sep 2009 12:39:58 +0000 (14:39 +0200)]
parmlist: Add basic tests for test_get_int().

9 years agoutil/parmlist: Add some more comments.
Jelmer Vernooij [Sun, 27 Sep 2009 12:13:38 +0000 (14:13 +0200)]
util/parmlist: Add some more comments.