[SCM] Samba Shared Repository - branch v4-2-test updated

Karolin Seeger kseeger at samba.org
Fri Nov 7 15:24:07 MST 2014


The branch, v4-2-test has been updated
       via  f2cb16e s3:smbd: fix file corruption using "write cache size != 0"
       via  a7085ff s3: nmbd: Ensure NetBIOS names are only 15 characters stored.
       via  ce6b7c8 WHATSNEW: Mention smbclient archival improvements
       via  b2b76b8 autobuild: check whether ctdbd has been installed in the samba-ctdb target
       via  3bd42c0 build: adapt comments for the clustering choice
       via  9c6e0fd build: further simplify --with-cluster-support case in configure
       via  80a51bb autobuild: adapt samba-ctdb target does not need a separate ctdb build any more
       via  2522be0 ctdb: Rename CTDB_VERSION to CTDB_PROTOCOL
       via  f0c6853 build: Simplify check for building with ctdb
       via  0f19c13 build: Remove configure checks for ctdb headers
       via  1528ae0 ctdb: Rename ctdb socket variable from CTDB_PATH to CTDB_SOCKET
       via  6a5ce20 build: Remove configure option --with-ctdb-dir
       via  65df9df build: Remove checks for ctdb features
       via  42f0859 build: Remove configure option --enable-old-ctdb
       via  43c3851 ctdb-logging: Add missing newline when logging to file
       via  18405d4 build: Hook CTDB into top level build using --with-cluster-support
       via  6423a2b ctdb-build: Make some steps conditional on standalone build
       via  874ac87 ctdb-build: Rename define BINDIR to CTDB_HELPER_BINDIR
       via  525bee6 ctdb-build: Fix handling of public headers
       via  3ca8895 ctdb-build: Change from ctdb-util to samba-util
       via  a75db09 ctdb-build: Add generation of Samba-style version.h
       via  bf70856 ctdb-build: Move generation of ctdb_version.h earlier
       via  06b0dea ctdb-logging: Update to use Samba style debug.h/debug.c
       via  2f59dd9 ctdb-logging: Change LogLevel to DEBUGLEVEL
       via  01c8b6f ctdb-tests: Make the fake log timestamp string easy to modify
       via  d5e0a0c ctdb-logging: Remove log ringbuffer
       via  412fc6e lib/util: Use charset_compat.h if SAMBA_UTIL_CORE_ONLY
       via  0a9dc8d lib/util: Factor out subsystem samba-util-core from samba-util
       via  37e8478 lib/util: Clean up includes for util.c
       via  1e76601 lib/util: Clean up includes for fault.c
       via  e1479e0 lib/util: Clean up includes for substitute.c
       via  000f583 lib/util: Replace an SMB_ASSERT()
       via  b9d0aa6 lib/util: Clean up includes for signal.c
       via  71be3ed lib/util: Clean up includes for time.[ch]
       via  8d0900a lib/util: Clean up includes for data_blob.[ch]
       via  c540f7d lib/util: Clean up includes for xfile.[ch]
       via  dd558ff lib/util: Clean up includes for blocking.c
      from  e7a90aa s3:locking: remove dead code from brl_get_locks_readonly()

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-2-test


- Log -----------------------------------------------------------------
commit f2cb16e496ce4f753e46525e485120a87fdfd297
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 6 09:23:46 2014 +0100

    s3:smbd: fix file corruption using "write cache size != 0"
    
    A client can:
    - open a handle (h1)
    - write some data to h1.
    - open a 2nd handle h2 (downgrades both handles to level II)
    - try to read the data on h2 (this gets old data)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10921
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Thu Nov  6 13:09:38 CET 2014 on sn-devel-104
    
    (cherry picked from commit fbe40d21c8e0f5bc87635e71fb828dfc5479a1ff)
    
    Autobuild-User(v4-2-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-2-test): Fri Nov  7 23:23:31 CET 2014 on sn-devel-104

commit a7085ff72d8aff64d2c01d31737a72eaa35540e6
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 31 11:01:26 2014 -0700

    s3: nmbd: Ensure NetBIOS names are only 15 characters stored.
    
    This screws up if the name is greater than MAX_NETBIOSNAME_LEN-1 in the
    unix charset, but less than or equal to MAX_NETBIOSNAME_LEN-1 in the DOS
    charset, but this is so old we have to live with that.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10920
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    (cherry picked from commit 7467f6e72cba214eeca75c34e9d9fba354c7ef31)
    Signed-off-by: Andreas Schneider <asn at samba.org>

commit ce6b7c8812cf2dab3deba44b9b3e3e79d36a99e4
Author: David Disseldorp <ddiss at samba.org>
Date:   Thu Nov 6 16:49:22 2014 +0100

    WHATSNEW: Mention smbclient archival improvements
    
    Aurélien Aptel implemented this feature for Google Summer of Code 2013.
    
    Cc: Aurélien Aptel <aurelien.aptel at gmail.com>
    Signed-off-by: David Disseldorp <ddiss at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b2b76b8eed3edc7ba5eb44c5c52bdfaac32374de
Author: Michael Adam <obnox at samba.org>
Date:   Sat Oct 25 18:01:30 2014 +0200

    autobuild: check whether ctdbd has been installed in the samba-ctdb target
    
    An intermediate test until we have full runtime-tests.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Tue Oct 28 08:05:40 CET 2014 on sn-devel-104
    
    (cherry picked from commit bf07a6b79e525a2aba71e07c4e13f2b2cb06b12f)
    
    The last 34 patches address bug #10892 (CTDB not integrated into top-level Samba
    build).

commit 3bd42c0eb1d0e03ca02219d054d29399e857a495
Author: Michael Adam <obnox at samba.org>
Date:   Fri Oct 24 17:55:17 2014 +0200

    build: adapt comments for the clustering choice
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit a72ca5a200c6321f3e3a42761dc3d661dacd5021)

commit 9c6e0fd67af3c486ba0c5e0999f4b28d9c1ba897
Author: Michael Adam <obnox at samba.org>
Date:   Fri Oct 24 17:53:08 2014 +0200

    build: further simplify --with-cluster-support case in configure
    
    includes were only built for the ctdb checks and they are now
    gone because we are building against included ctdb.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit bf98630f0a44597e61cdfc735ab73d862643007b)

commit 80a51bbe66b1c50d737f9db1ce5fef45b6365959
Author: Michael Adam <obnox at samba.org>
Date:   Fri Oct 24 17:42:51 2014 +0200

    autobuild: adapt samba-ctdb target does not need a separate ctdb build any more
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit eeebbe73125967943d95b6e03cbf695d3d219bc0)

commit 2522be0eb648cc752b6fd43a870bdc01ea3f49dd
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Tue Oct 21 11:53:29 2014 +1100

    ctdb: Rename CTDB_VERSION to CTDB_PROTOCOL
    
    CTDB_VERSION really is the ctdb protocol version.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit a54db687acc14351613738d93a4e99ceaa2c6759)

commit f0c685391fc683c7ec63246b167b59f2be84899e
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Oct 10 14:29:51 2014 +1100

    build: Simplify check for building with ctdb
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 69c0c43d55c93b82b2e398d5c61009fd347170bf)

commit 0f19c13ca33c1dcd7ed77271cb6c9746fd919199
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Oct 10 14:25:34 2014 +1100

    build: Remove configure checks for ctdb headers
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit e67c4b977a52d1744f4da8296bbcd7c213cbe92a)

commit 1528ae046be1600db8ab1ec91bc5c6bff7774b51
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Oct 10 12:02:26 2014 +1100

    ctdb: Rename ctdb socket variable from CTDB_PATH to CTDB_SOCKET
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 0d5ecaa2e38b55e981cb2770a945d14ab1d98589)

commit 6a5ce20d461054dc7eff2fc469a91d9e6d1208f2
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Oct 10 11:42:05 2014 +1100

    build: Remove configure option --with-ctdb-dir
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 9933028a657f01d7ff9db5fca19887f5e0523299)

commit 65df9df2a316b8edf711f8c98b9d136c9286b7cc
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Oct 10 10:54:15 2014 +1100

    build: Remove checks for ctdb features
    
    Since we are always building with integrated CTDB, there is no need for
    these checks.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 18100b80b9c62833df22638828336294c9740ae0)

commit 42f0859a77ba979857407a86a9ad497b9d6a0ba6
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Oct 10 10:59:06 2014 +1100

    build: Remove configure option --enable-old-ctdb
    
    CTDB source is now part of Samba tree and to enable clustering smbd
    should be built against included CTDB.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 5e7ab5ce38689a2dd1e921abf58af346b730a843)

commit 43c3851b67a7babe6f7a6dc7d83bc12c127b9861
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Oct 15 20:04:45 2014 +1100

    ctdb-logging: Add missing newline when logging to file
    
    This got lost with the transition to the new Samba debug code.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    (cherry picked from commit 96106e085a3a8bab51c8b14e85ba1a817d5fa55b)

commit 18405d44385b2e759b3977e73b91e8957b1a4421
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 25 14:05:48 2014 +1000

    build: Hook CTDB into top level build using --with-cluster-support
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Wed Oct  8 09:42:08 CEST 2014 on sn-devel-104
    
    (cherry picked from commit e94422a8acf4a812ed19ddd63b42789df49a3f00)

commit 6423a2b7bcd56843aef0ca5c1d7f907a890cdef8
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 25 13:46:00 2014 +1000

    ctdb-build: Make some steps conditional on standalone build
    
    CTDB's current wscript assumes that it is only used as part of a
    standalone build.  However, it will soon be part of a unified build so
    make some steps conditional.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit d568be69891da3944df2de8629e7e64bc480ad86)

commit 874ac871d1537505aff00aac5064cf2fc43d2b08
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Sep 26 15:42:34 2014 +1000

    ctdb-build: Rename define BINDIR to CTDB_HELPER_BINDIR
    
    This avoids a clash with Samba's BINDIR and also makes it easier to
    move the helpers to somewhere else (e.g. libexec) in the future.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 6b98ddc54fe20367a60601c4b430c73408e7e1c5)

commit 525bee671cca3c79f5fb7b74d80f5d4c7255715c
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Aug 29 21:17:30 2014 +1000

    ctdb-build: Fix handling of public headers
    
    Add the header munging, add/package ctdb_version.h, create
    directory include/public.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Mon Oct  6 14:56:07 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 88b24858d887278f4787081dacff2409259fcf42)

commit 3ca88950d33dfa2975dc8955b6485b19ff2dbe37
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Aug 15 16:41:57 2014 +1000

    ctdb-build: Change from ctdb-util to samba-util
    
    Remove local lib/util and lib/tdb-wrap. Update wscript, packaging and
    includes.h.
    
    The only potentially surprising thing here is a fake samba-util
    subsystem that just depends on samba-util-core.  As explained in a
    comment:
    
      When a combined build is implemented, CTDB will wanted to build
      against samba-util rather than samba-util-core.  Similarly, other
      Samba subsystems expect samba-util.  So, for a standalone build,
      just define a fake samba-util subsystem that pulls in
      samba-util-core.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 59c30257064518aae117784f02ba73bc3221bec6)

commit a75db09c02e229507e6558dd94c9f36e07e7e074
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 25 13:28:30 2014 +1000

    ctdb-build: Add generation of Samba-style version.h
    
    This is needed by fault.c.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 43266be94552fe0c364e12d3c44fb54e453c123a)

commit bf708567105b0d1ba3e6a564cd6cabb7a1b84d7d
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 25 13:21:12 2014 +1000

    ctdb-build: Move generation of ctdb_version.h earlier
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit ba3e2ecf6728ecb83afbaccaed35d19e4e562806)

commit 06b0deaf072239895e748f8d5f687c788cead6e2
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Aug 19 12:15:31 2014 +1000

    ctdb-logging: Update to use Samba style debug.h/debug.c
    
    Samba's debug subsystem has changed a lot, so CTDB's logging needs
    to be rewritten to be compatible.
    
    The new debug.h/debug.c can't just be pulled in because it has some
    extra dependencies into Samba's lib/util.  For now, to support the
    smallest possible patch, implement a minimal subset of Samba's
    debug.[ch] that just supports the DEBUG_CALLBACK logtype.
    
    Define a callback for each logging method.
    
    Check later to see if debug_extra (or similar) can somehow be
    implemented using debug classes.
    
    The timestamp on CTDB CLI tool and test program DEBUG() output goes
    away, so update the unit test code to cope.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit b4589b954e1090a934fafd3f8e3c2cf1ed785c61)

commit 2f59dd9893767d777893fde4053afe0b8ff587be
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 24 17:12:56 2014 +1000

    ctdb-logging: Change LogLevel to DEBUGLEVEL
    
    For compatibility with current Samba debug.[ch].
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 3105737c4b38b3cb4f9408cfc82cf8b49bc3fb2e)

commit 01c8b6feb5275a766e5fcee52ed7e4ab69bdf612
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 24 17:07:12 2014 +1000

    ctdb-tests: Make the fake log timestamp string easy to modify
    
    Use a variable to allow easy change of this string in case future
    logging changes modify the timestamp format or do not support
    timestamping.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 1c8c0be6f97f74169c0b46be4df2245aa631186a)

commit d5e0a0c917694245022f530f97a2f3345515d1ab
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Aug 8 12:51:03 2014 +1000

    ctdb-logging: Remove log ringbuffer
    
    As far as we know, nobody uses this and it just complicates the
    logging subsystem.
    
    Remove all ringbuffer code and documentation.  Update the local
    daemons startup code correspondingly.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit b544073653a5b54ba8ec2621c7314136656cfaeb)

commit 412fc6e33cef264c4091387d807381e35573ad5c
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 20:26:24 2014 +1000

    lib/util: Use charset_compat.h if SAMBA_UTIL_CORE_ONLY
    
    When doing a CTDB standalone build we don't want to use dynconfig,
    since this introduces a lot of unwanted complexity.  To avoid this,
    either:
    
    * charset needs to be nobbled to avoid loading the case tables, since
      this depends on dynconfig; or
    
    * charset needs to be avoid completely, so some functions need to be
      replaced with their ASCII counterparts.
    
    The 2nd options seems more honest and less error-prone.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit c12aa0c444555f2c8051492083abba69fb94586f)

commit 0a9dc8dcf0b0cb2c52df80e8b38ec463151fac6d
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Aug 15 16:00:32 2014 +1000

    lib/util: Factor out subsystem samba-util-core from samba-util
    
    samba-util depends on Samba-specific code.  Exclude this code from
    samba-util-core.  When told to, via SAMBA_UTIL_CORE_ONLY, only build
    samba-util-core and dependencies.  When SAMBA_UTIL_CORE_ONLY is not
    defined then the behaviour should be unchanged.
    
    Standalone builds of CTDB will be done against samba-util-core to
    avoid pulling in Samba-specific code.
    
    An alternative would be to remove the Samba-dependent code from
    samba-util.  However, some of it is used by OpenChange.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 1fd4556917df5d7e2aff4997ff7e5b57f2569b40)

commit 37e8478887bfae9173c03bfb26b13627cbeb5397
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 18:28:53 2014 +1000

    lib/util: Clean up includes for util.c
    
    Allows standalone compiles without external includes.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit db15cc5388efdb0803bd2f785f8b6eee7f46ecbf)

commit 1e766017296a65dadf251632afd392327f53c866
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 19:43:27 2014 +1000

    lib/util: Clean up includes for fault.c
    
    Add fault.h.  Allows standalone compiles without external includes.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 8dac190ee1bc0e7f6d17eeca097f027fcaf584ed)

commit e1479e073af9bdd01b475ac2f60bb2b9745df55e
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 20:38:52 2014 +1000

    lib/util: Clean up includes for substitute.c
    
    Add substitute.h.  Allows standalone compiles without external
    includes.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit d92940819f4162985a70f6b2c79032f75f9fce49)

commit 000f5834cf66563243b45cba96213cf62f36ee77
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 24 04:41:25 2014 +1000

    lib/util: Replace an SMB_ASSERT()
    
    Avoid a cyclic dependency.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 2426130c90b216d131330e896daf7302cc198b4a)

commit b9d0aa6714f50056bef03818f60126fa78507664
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 19:57:52 2014 +1000

    lib/util: Clean up includes for signal.c
    
    Add signal.h.  Allows standalone compiles without external includes.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b69edfed7db299e53e95bcb26cc2899ddd3adb28)

commit 71be3ed60a7f1eaad65f9e6ec9607db453362d00
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 19:38:18 2014 +1000

    lib/util: Clean up includes for time.[ch]
    
    Allows standalone compile without external includes.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit fd9f0c27e71cdda833e9dd24f0eb87ad524e73cf)

commit 8d0900a3dcdbc3876e7488721e1ea87b18cea6b2
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 19:31:23 2014 +1000

    lib/util: Clean up includes for data_blob.[ch]
    
    Allows standalone compile without external includes.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 1f0e5cb38c6d444d33b7736d43a32439cdf04d81)

commit c540f7dd8077d18d7e501bfa08c882ec3adfc3aa
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 19:21:42 2014 +1000

    lib/util: Clean up includes for xfile.[ch]
    
    The include files added to xfile.h are already included
    unconditionally elsewhere (replace.h, samba_util.h, ...) so Samba
    can't be built without them.
    
    To minimise dependencies, only include specific util headers instead
    of samba_util.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 2d7dfe3d68c39f11afdece3281f9fbca0b48fb3f)

commit dd558fff6cc6888d372e153cfa00109d479a1061
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 22 18:14:53 2014 +1000

    lib/util: Clean up includes for blocking.c
    
    Add blocking.h.  Allows standalone compile without external
    includes.h.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 3d6675fd1ee32ba0795f7f09f42a1b005ba5e621)

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                                       |  12 +-
 ctdb/client/ctdb_client.c                          |   6 +-
 ctdb/common/cmdline.c                              |   8 +-
 ctdb/common/ctdb_fork.c                            |  15 +-
 ctdb/common/ctdb_logging.c                         | 151 ------
 ctdb/config/ctdbd_wrapper                          |   1 -
 ctdb/configure.rpm                                 |   2 +-
 ctdb/doc/ctdb.1.xml                                |  38 --
 ctdb/doc/ctdbd.1.xml                               |  19 -
 ctdb/doc/ctdbd.conf.5.xml                          |  10 -
 ctdb/ib/ibwrapper_test.c                           |   6 +-
 ctdb/include/ctdb_logging.h                        |   6 -
 ctdb/include/ctdb_private.h                        |  12 -
 ctdb/include/ctdb_protocol.h                       |  10 +-
 ctdb/include/internal/includes.h                   |  12 +-
 {include => ctdb/include}/public/README.txt        |   0
 ctdb/lib/tdb_wrap/tdb_wrap.c                       | 106 ----
 ctdb/lib/tdb_wrap/tdb_wrap.h                       |  39 --
 ctdb/lib/tdb_wrap/wscript_build                    |   7 -
 ctdb/lib/util/debug.c                              | 135 -----
 ctdb/lib/util/debug.h                              |  30 --
 ctdb/lib/util/dlinklist.h                          | 181 -------
 ctdb/lib/util/fault.c                              | 235 ---------
 ctdb/lib/util/idtree.c                             | 387 --------------
 ctdb/lib/util/signal.c                             | 144 ------
 ctdb/lib/util/substitute.c                         | 167 ------
 ctdb/lib/util/util.c                               |  52 --
 ctdb/lib/util/util.h                               | 565 ---------------------
 ctdb/lib/util/util_file.c                          | 120 -----
 ctdb/lib/util/util_time.c                          | 102 ----
 ctdb/lib/util/wscript_build                        |   9 -
 ctdb/packaging/RPM/ctdb.spec.in                    |   3 +-
 ctdb/server/ctdb_control.c                         |  11 +-
 ctdb/server/ctdb_daemon.c                          |   6 +-
 ctdb/server/ctdb_lock.c                            |   2 +-
 ctdb/server/ctdb_logging.c                         | 125 +----
 ctdb/server/ctdb_recoverd.c                        |  54 +-
 ctdb/server/ctdbd.c                                |   1 -
 ctdb/server/eventscript.c                          |   2 +-
 ctdb/tcp/tcp_io.c                                  |   2 +-
 ctdb/tests/scripts/unit.sh                         |   1 +
 ctdb/tests/simple/scripts/local_daemons.bash       |   2 +-
 ctdb/tests/src/ctdb_functest.c                     |   4 +-
 ctdb/tests/src/ctdb_porting_tests.c                |   2 +-
 ctdb/tests/src/ctdb_takeover_tests.c               |   4 +-
 ctdb/tests/takeover/det.001.sh                     |  14 +-
 ctdb/tests/takeover/det.002.sh                     |   8 +-
 ctdb/tests/takeover/det.003.sh                     |   2 +-
 ctdb/tests/takeover/lcp2.004.sh                    |  12 +-
 ctdb/tests/takeover/lcp2.005.sh                    | 334 ++++++------
 ctdb/tests/takeover/lcp2.023.sh                    | 132 ++---
 ctdb/tests/takeover/lcp2.024.sh                    |  18 +-
 ctdb/tests/takeover/lcp2.029.sh                    |   6 +-
 ctdb/tests/takeover/lcp2.031.sh                    | 196 +++----
 ctdb/tests/takeover/nondet.001.sh                  |  12 +-
 ctdb/tests/takeover/nondet.002.sh                  |   6 +-
 ctdb/tests/tool/func.parse_nodestring.003.sh       |   2 +-
 ctdb/tests/tool/stubby.getcapabilities.003.sh      |   2 +-
 ctdb/tests/tool/stubby.listnodes.001.sh            |   2 +-
 ctdb/tests/tool/stubby.lvsmaster.002.sh            |   2 +-
 ctdb/tests/tool/stubby.natgwlist.009.sh            |   8 +-
 ctdb/tests/tool/stubby.xpnn.003.sh                 |   2 +-
 ctdb/tools/ctdb.c                                  | 127 +----
 ctdb/utils/pmda/pmda_ctdb.c                        |   2 +-
 ctdb/wscript                                       | 104 +++-
 lib/util/blocking.c                                |   3 +-
 libcli/smb/smb_util.h => lib/util/blocking.h       |  21 +-
 lib/util/charset_compat.h                          |   9 +
 lib/util/data_blob.c                               |   4 +-
 lib/util/data_blob.h                               |   1 +
 lib/util/fault.c                                   |   8 +-
 lib/util/{util_pw.h => fault.h}                    |  46 +-
 lib/util/samba_util.h                              |  95 +---
 lib/util/signal.c                                  |   4 +-
 .../headers/test_headers.c => lib/util/signal.h    |  46 +-
 lib/util/substitute.c                              |  15 +-
 lib/util/substitute.h                              |  56 ++
 lib/util/time.c                                    |   6 +-
 lib/util/time.h                                    |   4 +
 lib/util/util.c                                    |   7 +-
 lib/util/wscript_build                             | 173 ++++---
 lib/util/xfile.c                                   |   3 +-
 lib/util/xfile.h                                   |   6 +
 script/autobuild.py                                |   8 +-
 source3/lib/cluster_support.c                      |  46 +-
 source3/lib/ctdb_conn.c                            |   8 +-
 source3/lib/ctdbd_conn.c                           |  30 +-
 source3/lib/dbwrap/dbwrap_ctdb.c                   |  11 -
 source3/lib/util_names.c                           |  10 +-
 source3/smbd/oplock.c                              |   3 +
 source3/torture/test_ctdbconn.c                    |   4 -
 source3/wscript                                    | 309 +----------
 wscript                                            |   3 +
 wscript_build                                      |   2 +
 94 files changed, 865 insertions(+), 3873 deletions(-)
 copy {include => ctdb/include}/public/README.txt (100%)
 delete mode 100644 ctdb/lib/tdb_wrap/tdb_wrap.c
 delete mode 100644 ctdb/lib/tdb_wrap/tdb_wrap.h
 delete mode 100755 ctdb/lib/tdb_wrap/wscript_build
 delete mode 100644 ctdb/lib/util/debug.c
 delete mode 100644 ctdb/lib/util/debug.h
 delete mode 100644 ctdb/lib/util/dlinklist.h
 delete mode 100644 ctdb/lib/util/fault.c
 delete mode 100644 ctdb/lib/util/idtree.c
 delete mode 100644 ctdb/lib/util/signal.c
 delete mode 100644 ctdb/lib/util/substitute.c
 delete mode 100644 ctdb/lib/util/util.c
 delete mode 100644 ctdb/lib/util/util.h
 delete mode 100644 ctdb/lib/util/util_file.c
 delete mode 100644 ctdb/lib/util/util_time.c
 delete mode 100755 ctdb/lib/util/wscript_build
 copy libcli/smb/smb_util.h => lib/util/blocking.h (65%)
 create mode 100644 lib/util/charset_compat.h
 copy lib/util/{util_pw.h => fault.h} (50%)
 copy testsuite/headers/test_headers.c => lib/util/signal.h (50%)
 create mode 100644 lib/util/substitute.h


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index b1d8ee3..84ad200 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -246,7 +246,7 @@ The module does not provide complete WORM functions, like some archiving
 products do! It is not audit-proof, because the WORM function is only
 available on the client side, when accessing a share through SMB! If
 the same folder is shared by other services like NFS, the access only
-depents on the underlaying filesystem ACLs. Equally if you access the
+depends on the underlying filesystem ACLs. Equally if you access the
 content directly on the server.
 
 For additional information, see
@@ -266,6 +266,16 @@ access with Netatalk 3.
 The modules behaviour is fully configurable, please refer to the
 manpage vfs_fruit for further details.
 
+smbclient archival improvements
+===============================
+
+Archive creation and extraction support in smbclient has been rewritten
+to use libarchive. This fixes a number of outstanding bugs in Samba's
+previous custom tar implementation and also adds support for the
+extraction of zipped archives.
+smbclient archive support can be enabled or disabled at build time with
+corresponding --with[out]-libarchive configure parameters.
+
 
 ######################################################################
 Changes
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 7d629db..07b17d0 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -54,7 +54,7 @@ struct ctdb_req_header *_ctdbd_allocate_pkt(struct ctdb_context *ctdb,
 	hdr->length       = length;
 	hdr->operation    = operation;
 	hdr->ctdb_magic   = CTDB_MAGIC;
-	hdr->ctdb_version = CTDB_VERSION;
+	hdr->ctdb_version = CTDB_PROTOCOL;
 	hdr->srcnode      = ctdb->pnn;
 	if (ctdb->vnn_map) {
 		hdr->generation = ctdb->vnn_map->generation;
@@ -216,7 +216,7 @@ void ctdb_client_read_cb(uint8_t *data, size_t cnt, void *args)
 		goto done;
 	}
 
-	if (hdr->ctdb_version != CTDB_VERSION) {
+	if (hdr->ctdb_version != CTDB_PROTOCOL) {
 		ctdb_set_error(ctdb, "Bad CTDB version 0x%x rejected in client\n", hdr->ctdb_version);
 		goto done;
 	}
@@ -3375,7 +3375,7 @@ struct ctdb_context *ctdb_init(struct event_context *ev)
 	ctdb->lastid = INT_MAX-200;
 	CTDB_NO_MEMORY_NULL(ctdb, ctdb->idr);
 
-	ret = ctdb_set_socketname(ctdb, CTDB_PATH);
+	ret = ctdb_set_socketname(ctdb, CTDB_SOCKET);
 	if (ret != 0) {
 		DEBUG(DEBUG_ERR,(__location__ " ctdb_set_socketname failed.\n"));
 		talloc_free(ctdb);
diff --git a/ctdb/common/cmdline.c b/ctdb/common/cmdline.c
index ebe68e4..ab2b45e 100644
--- a/ctdb/common/cmdline.c
+++ b/ctdb/common/cmdline.c
@@ -97,9 +97,9 @@ struct ctdb_context *ctdb_cmdline_init(struct event_context *ev)
 
 	/* Set the debug level */
 	if (isalpha(ctdb_cmdline.debuglevel[0]) || ctdb_cmdline.debuglevel[0] == '-') { 
-		LogLevel = get_debug_by_desc(ctdb_cmdline.debuglevel);
+		DEBUGLEVEL = get_debug_by_desc(ctdb_cmdline.debuglevel);
 	} else {
-		LogLevel = strtol(ctdb_cmdline.debuglevel, NULL, 0);
+		DEBUGLEVEL = strtol(ctdb_cmdline.debuglevel, NULL, 0);
 	}
 
 	/* set up the tree to store server ids */
@@ -148,9 +148,9 @@ struct ctdb_context *ctdb_cmdline_client(struct tevent_context *ev,
 
 	/* Set the debug level */
 	if (isalpha(ctdb_cmdline.debuglevel[0]) || ctdb_cmdline.debuglevel[0] == '-') { 
-		LogLevel = get_debug_by_desc(ctdb_cmdline.debuglevel);
+		DEBUGLEVEL = get_debug_by_desc(ctdb_cmdline.debuglevel);
 	} else {
-		LogLevel = strtol(ctdb_cmdline.debuglevel, NULL, 0);
+		DEBUGLEVEL = strtol(ctdb_cmdline.debuglevel, NULL, 0);
 	}
 
 	ret = ctdb_socket_connect(ctdb);
diff --git a/ctdb/common/ctdb_fork.c b/ctdb/common/ctdb_fork.c
index d7eef76..8d38150 100644
--- a/ctdb/common/ctdb_fork.c
+++ b/ctdb/common/ctdb_fork.c
@@ -54,7 +54,7 @@ void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid)
  * This function forks a child process and drops the realtime 
  * scheduler for the child process.
  */
-pid_t ctdb_fork_no_free_ringbuffer(struct ctdb_context *ctdb)
+pid_t ctdb_fork(struct ctdb_context *ctdb)
 {
 	pid_t pid;
 
@@ -95,19 +95,6 @@ pid_t ctdb_fork_no_free_ringbuffer(struct ctdb_context *ctdb)
 	return pid;
 }
 
-pid_t ctdb_fork(struct ctdb_context *ctdb)
-{
-	pid_t pid;
-
-	pid = ctdb_fork_no_free_ringbuffer(ctdb);
-	if (pid == 0) {
-		ctdb_log_ringbuffer_free();
-	}
-
-	return pid;
-}
-
-
 static void ctdb_sigchld_handler(struct tevent_context *ev,
 	struct tevent_signal *te, int signum, int count,
 	void *dont_care, 
diff --git a/ctdb/common/ctdb_logging.c b/ctdb/common/ctdb_logging.c
index 5390156..9b5103a 100644
--- a/ctdb/common/ctdb_logging.c
+++ b/ctdb/common/ctdb_logging.c
@@ -23,159 +23,8 @@
 #include "../include/ctdb_private.h"
 #include "../include/ctdb_client.h"
 
-int LogLevel = DEBUG_NOTICE;
-int this_log_level = 0;
 const char *debug_extra = "";
 
-int log_ringbuf_size;
-
-#define MAX_LOG_SIZE 128
-
-static int first_entry = 0;
-static int ringbuf_count = 0;
-
-struct ctdb_log_entry {
-	int32_t level;
-	struct timeval t;
-	char message[MAX_LOG_SIZE];
-};
-
-
-static struct ctdb_log_entry *log_entries;
-
-/*
- * this function logs all messages for all levels to a ringbuffer
- */
-static void log_ringbuffer_v(const char *format, va_list ap)
-{
-	int ret;
-	int next_entry;
-
-	if (log_entries == NULL && log_ringbuf_size != 0) {
-		/* Hope this works. We cant log anything if it doesnt anyway */
-		log_entries = malloc(sizeof(struct ctdb_log_entry) * log_ringbuf_size);
-	}
-	if (log_entries == NULL) {
-		return;
-	}
-
-	next_entry = (first_entry + ringbuf_count) % log_ringbuf_size;
-
-	if (ringbuf_count > 0 && first_entry == next_entry) {
-		first_entry = (first_entry + 1) % log_ringbuf_size;
-	}
-
-	log_entries[next_entry].message[0] = '\0';
-
-	ret = vsnprintf(&log_entries[next_entry].message[0], MAX_LOG_SIZE, format, ap);
-	if (ret == -1) {
-		return;
-	}
-	/* Log messages longer than MAX_LOG_SIZE are truncated to MAX_LOG_SIZE-1
-	 * bytes.  In that case, add a newline.
-	 */
-	if (ret >= MAX_LOG_SIZE) {
-		log_entries[next_entry].message[MAX_LOG_SIZE-2] = '\n';
-	}
-
-	log_entries[next_entry].level = this_log_level;
-	log_entries[next_entry].t = timeval_current();
-
-	if (ringbuf_count < log_ringbuf_size) {
-		ringbuf_count++;
-	}
-}
-
-void log_ringbuffer(const char *format, ...)
-{
-	va_list ap;
-
-	va_start(ap, format);
-	log_ringbuffer_v(format, ap);
-	va_end(ap);
-}
-
-void ctdb_log_ringbuffer_free(void)
-{
-	if (log_entries != NULL) {
-		free(log_entries);
-		log_entries = NULL;
-	}
-	log_ringbuf_size = 0;
-}
-
-TDB_DATA ctdb_log_ringbuffer_collect_log(TALLOC_CTX *mem_ctx,
-					 enum debug_level max_level)
-{
-	TDB_DATA data;
-	FILE *f;
-	long fsize;
-	int tmp_entry;
-	struct tm *tm;
-	char tbuf[100];
-	int i;
-
-	DEBUG(DEBUG_ERR,("Marshalling %d log entries\n", ringbuf_count));
-
-	/* dump to a file, then send the file as a blob */
-	f = tmpfile();
-	if (f == NULL) {
-		DEBUG(DEBUG_ERR,(__location__ " Unable to open tmpfile - %s\n",
-				 strerror(errno)));
-		return tdb_null;
-	}
-
-	for (i=0; i<ringbuf_count; i++) {
-		tmp_entry = (first_entry + i) % log_ringbuf_size;
-
-		if (log_entries[tmp_entry].level > max_level) {
-		 	continue;
-		}
-
-		tm = localtime(&log_entries[tmp_entry].t.tv_sec);
-		strftime(tbuf, sizeof(tbuf)-1,"%Y/%m/%d %H:%M:%S", tm);
-
-		if (log_entries[tmp_entry].message[0] != '\0') {
-			fprintf(f, "%s:%s %s", tbuf,
-				get_debug_by_level(log_entries[tmp_entry].level),
-				log_entries[tmp_entry].message);
-		}
-	}
-
-	fsize = ftell(f);
-	if (fsize < 0) {
-		fclose(f);
-		DEBUG(DEBUG_ERR, ("Cannot get file size for log entries\n"));
-		return tdb_null;
-	}
-	rewind(f);
-	data.dptr = talloc_size(NULL, fsize);
-	if (data.dptr == NULL) {
-		fclose(f);
-		DEBUG(DEBUG_ERR, (__location__ " Memory allocation error\n"));
-		return tdb_null;
-	}
-	data.dsize = fread(data.dptr, 1, fsize, f);
-	fclose(f);
-
-	DEBUG(DEBUG_ERR,("Marshalling log entries into a blob of %d bytes\n", (int)data.dsize));
-
-	return data;
-}
-
-void ctdb_clear_log(struct ctdb_context *ctdb)
-{
-	first_entry = 0;
-	ringbuf_count  = 0;
-}
-
-int32_t ctdb_control_clear_log(struct ctdb_context *ctdb)
-{
-	ctdb_clear_log(ctdb);
-
-	return 0;
-}
-
 struct debug_levels debug_levels[] = {
 	{DEBUG_EMERG,	"EMERG"},
 	{DEBUG_ALERT,	"ALERT"},
diff --git a/ctdb/config/ctdbd_wrapper b/ctdb/config/ctdbd_wrapper
index cbde6ba..c2c5c1a 100755
--- a/ctdb/config/ctdbd_wrapper
+++ b/ctdb/config/ctdbd_wrapper
@@ -129,7 +129,6 @@ build_ctdb_options ()
     maybe_set "--no-lmaster"             "$CTDB_CAPABILITY_LMASTER"   "no"
     maybe_set "--lvs --single-public-ip" "$CTDB_LVS_PUBLIC_IP"
     maybe_set "--script-log-level"       "$CTDB_SCRIPT_LOG_LEVEL"
-    maybe_set "--log-ringbuf-size"       "$CTDB_LOG_RINGBUF_SIZE"
     maybe_set "--syslog"                 "$CTDB_SYSLOG"               "yes"
     maybe_set "--max-persistent-check-errors" "$CTDB_MAX_PERSISTENT_CHECK_ERRORS"
 }
diff --git a/ctdb/configure.rpm b/ctdb/configure.rpm
index 32e6673..ff7eace 100755
--- a/ctdb/configure.rpm
+++ b/ctdb/configure.rpm
@@ -7,7 +7,7 @@ else
 fi
 
 CFLAGS="-Wall -g -D_GNU_SOURCE" ./configure \
-	--builtin-libraries=replace,popt \
+	--builtin-libraries=replace,popt,samba-debug,socket-blocking,tdb-wrap \
 	--bundled-libraries=!talloc,!tevent,!tdb \
 	--minimum-library-version=talloc:2.0.8,tdb:1.2.11,tevent:0.9.16 \
 	--prefix=/usr \
diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index 87840cd..efa5d85 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -1185,44 +1185,6 @@ dbid:0xb775fff6 name:secrets.tdb path:/var/ctdb/persistent/secrets.tdb.0 PERSIST
     </refsect2>
 
     <refsect2>
-      <title>getlog [<parameter>LEVEL</parameter>] [recoverd]</title>
-      <para>
-	In addition to the normal logging to a log file, CTDB also
-	keeps a in-memory ringbuffer containing the most recent log
-	entries for all log levels (except DEBUG).
-      </para>
-      <para>
-	This is useful since it allows for keeping continuous logs to a file
-	at a reasonable non-verbose level, but shortly after an incident has
-	occured, a much more detailed log can be pulled from memory. This
-	can allow you to avoid having to reproduce an issue due to the
-	on-disk logs being of insufficient detail.
-      </para>
-      <para>
-	This command extracts all messages of level or lower log level
-	from memory and prints it to the screen.  The level is not
-	specified it defaults to NOTICE.
-      </para>
-      <para>
-	By default, logs are extracted from the main CTDB daemon.  If
-	the recoverd option is given then logs are extracted from the
-	recovery daemon.
-      </para>
-    </refsect2>
-
-    <refsect2>
-      <title>clearlog [recoverd]</title>
-      <para>
-	This command clears the in-memory logging ringbuffer.
-      </para>
-      <para>
-	By default, logs are cleared in the main CTDB daemon.  If the
-	recoverd option is given then logs are cleared in the recovery
-	daemon.
-      </para>
-    </refsect2>
-
-    <refsect2>
       <title>setdbreadonly <parameter>DB</parameter></title>
       <para>
 	This command will enable the read-only record support for a
diff --git a/ctdb/doc/ctdbd.1.xml b/ctdb/doc/ctdbd.1.xml
index ab222bc..20f2d8b 100644
--- a/ctdb/doc/ctdbd.1.xml
+++ b/ctdb/doc/ctdbd.1.xml
@@ -137,25 +137,6 @@
       </varlistentry>
 
       <varlistentry>
-	<term>--log-ringbuf-size=<parameter>NUM</parameter></term>
-	<listitem>
-	  <para>
-	    Set the size of the log ringbuffer to NUM entries.
-	  </para>
-	  <para>
-	    CTDB uses an in-memory ringbuffer containing NUM most
-	    recent log entries for all log levels (except DEBUG).  The
-	    ringbugger can be useful for extracting detailed logs even
-	    if some entries are not logged to the regular logs.
-	  </para>
-	  <para>
-	    Use the <command>ctdb getlog</command> command to retrieve
-	    log entries from the ringbuffer.
-	  </para>
-	</listitem>
-      </varlistentry>
-
-      <varlistentry>
 	<term>--lvs</term>
 	<listitem>
 	  <para>
diff --git a/ctdb/doc/ctdbd.conf.5.xml b/ctdb/doc/ctdbd.conf.5.xml
index 149aa62..e316abb 100644
--- a/ctdb/doc/ctdbd.conf.5.xml
+++ b/ctdb/doc/ctdbd.conf.5.xml
@@ -231,16 +231,6 @@
       </varlistentry>
 
       <varlistentry>
-	<term>CTDB_LOG_RINGBUF_SIZE=<parameter>NUM</parameter></term>
-	<listitem>
-	  <para>
-	    Default is 0.  Corresponds to
-	    <option>--log-ringbuf-size</option>.
-	  </para>
-	</listitem>
-      </varlistentry>
-
-      <varlistentry>
 	<term>CTDB_LVS_PUBLIC_IP=<parameter>IPADDR</parameter></term>
 	<listitem>
 	  <para>
diff --git a/ctdb/ib/ibwrapper_test.c b/ctdb/ib/ibwrapper_test.c
index 48162c3..397fdf1 100644
--- a/ctdb/ib/ibwrapper_test.c
+++ b/ctdb/ib/ibwrapper_test.c
@@ -537,7 +537,7 @@ void ibwtest_usage(struct ibwtest_ctx *tcx, char *name)
 	printf("\t-n number of messages to send [default %d]\n", tcx->nmsg);
 	printf("\t-l usec time to sleep in the main loop [default %d]\n", tcx->sleep_usec);
 	printf("\t-v max variable msg size in bytes [default %d], 0=don't send var. size\n", tcx->maxsize);
-	printf("\t-d LogLevel [default %d]\n", LogLevel);	
+	printf("\t-d LogLevel [default %d]\n", DEBUGLEVEL);
 	printf("Press ctrl+C to stop the program.\n");
 }
 
@@ -553,7 +553,7 @@ int main(int argc, char *argv[])
 	memset(tcx, 0, sizeof(struct ibwtest_ctx));
 	tcx->nsec = 0;
 	tcx->nmsg = 1000;
-	LogLevel = 0;
+	DEBUGLEVEL = 0;
 
 	/* here is the only case we can't avoid using global... */
 	testctx = tcx;
@@ -592,7 +592,7 @@ int main(int argc, char *argv[])
 			tcx->maxsize = (unsigned int)atoi(optarg);
 			break;
 		case 'd':
-			LogLevel = atoi(optarg);
+			DEBUGLEVEL = atoi(optarg);
 			break;
 		default:
 			fprintf(stderr, "ERROR: unknown option -%c\n", (char)op);
diff --git a/ctdb/include/ctdb_logging.h b/ctdb/include/ctdb_logging.h
index 710864e..c0c0266 100644
--- a/ctdb/include/ctdb_logging.h
+++ b/ctdb/include/ctdb_logging.h
@@ -20,8 +20,6 @@
 #ifndef _CTDB_LOGGING_H_
 #define _CTDB_LOGGING_H_
 
-extern int LogLevel;
-extern int this_log_level;
 extern const char *debug_extra;
 
 enum debug_level {
@@ -35,8 +33,4 @@ enum debug_level {
 	DEBUG_DEBUG   =  4,
 };
 
-#define DEBUGLVL(lvl) ((lvl) <= LogLevel)
-#define DEBUG(lvl, x) do { this_log_level = (lvl); if ((lvl) < DEBUG_DEBUG) { log_ringbuffer x; } if ((lvl) <= LogLevel) { do_debug x; }} while (0)
-#define DEBUGADD(lvl, x) do { if ((lvl) <= LogLevel) { this_log_level = (lvl); do_debug_add x; }} while (0)
-
 #endif /* _CTDB_LOGGING_H_ */
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 02602e1..3b6bdc7 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -1096,7 +1096,6 @@ void reset_scheduler(void);
 struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb);
 void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid);
 pid_t ctdb_fork(struct ctdb_context *ctdb);
-pid_t ctdb_fork_no_free_ringbuffer(struct ctdb_context *ctdb);
 void ctdb_set_child_info(TALLOC_CTX *mem_ctx, const char *child_name_fmt, ...);
 bool ctdb_is_child_process(void);
 int ctdb_kill(struct ctdb_context *ctdb, pid_t pid, int signum);
@@ -1459,17 +1458,6 @@ struct ctdb_get_log_addr {
 	int32_t level;
 };
 
-extern int log_ringbuf_size;
-
-enum debug_level;
-TDB_DATA ctdb_log_ringbuffer_collect_log(TALLOC_CTX *mem_ctx,
-					 enum debug_level max_level);
-void ctdb_collect_log(struct ctdb_context *ctdb, struct ctdb_get_log_addr *log_addr);
-void ctdb_clear_log(struct ctdb_context *ctdb);
-int32_t ctdb_control_get_log(struct ctdb_context *ctdb, TDB_DATA addr);
-int32_t ctdb_control_clear_log(struct ctdb_context *ctdb);
-void ctdb_log_ringbuffer_free(void);
-
 struct ctdb_log_state *ctdb_vfork_with_logging(TALLOC_CTX *mem_ctx,
 					       struct ctdb_context *ctdb,
 					       const char *log_prefix,
diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h
index 629c91c..725e426 100644
--- a/ctdb/include/ctdb_protocol.h
+++ b/ctdb/include/ctdb_protocol.h
@@ -22,9 +22,9 @@
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list