Re[2]: [Samba] [samba 3.0.28a,1) PANIC: tdb_reopen_all failed
Hello, Saturday, May 10, 2008, 4:30:47 PM, somebody wrote: VL On Sat, May 10, 2008 at 03:39:19PM +0200, Gilles wrote: Hello I got a bunch of PANIC messages this morning on a FreeBSD 6.3 host, and had to restart Samba: [2008/05/10 10:28:51, 0] lib/util.c:smb_panic(1633) PANIC (pid 43086): tdb_reopen_all failed. [2008/05/10 10:28:51, 0] lib/util.c:log_stack_trace(1737) BACKTRACE: 3 stack frames: #0 0x8220341 smb_panic+73 at /usr/local/sbin/smbd #1 0x82b9389 main+4773 at /usr/local/sbin/smbd #2 0x8086b8e _start+118 at /usr/local/sbin/smbd [2008/05/10 10:28:51, 0] lib/fault.c:dump_core(181) dumping core in /var/log/samba/cores/smbd [2008/05/10 10:29:59, 0] lib/util_tdb.c:tdb_log(664) tdb(/var/db/samba/locking.tdb): tdb_reopen: open failed (No such file or directory) VL Is it possible that a cronjob is kicking in deleting VL /var/db/samba/locking.tdb? VL Volker I'm not sure about cause of the the problem, but I can write more. When system (FreeBSD) is closed unexpectedly tdb files are corrupted. After boot samba tries to start, but because of corrupted tdb files it is impossible :( Samba version 3.0.28a a tries to start, generates PANIC message, runs a lot of smbd/nmbd processes and eats system resources. System is not available from network, access to console is needed. Older samba - I'm not sure, but I think prior to to 3.0.25a, for example 3.0.24 - tries to start, generates panic message and doesn't work, but system is stable. Fast solution: kill all smbd and nmbd processes, delete all tdb files from /var/db/samba/ directory, start samba ... should be ok. After next unexpected system restart problem can back :( As I remember older samba port (3.0.24) doesn't need manual remove of tdb files. Command /usr/local/etc/rc.d/samba restart is enough. Temporary solution: find old port, version 3.0.24 is OK, compile and install. I found old ports in iso images of previous version of FreeBSD. Is it possible to check tdb files before samba start and make an action (delete or repair the files) before start? How to do it? -- Best regards, Marcinmailto:[EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] winbind, mod_auth_pam, and plaintext passwords
We have a working samba file server using winbind to authenticate with a Win2003 server in native mode. [2008/05/10 18:22:54, 5] nsswitch/winbindd_cm.c:set_dc_type_and_flags(1651) set_dc_type_and_flags: domain STARTREK is in native mode. [2008/05/10 18:22:54, 5] nsswitch/winbindd_cm.c:set_dc_type_and_flags(1654) set_dc_type_and_flags: domain STARTREK is running active directory. I now want to allow the apache web server (running on the same machine as samba) to utilize winbind to authenticate users with domain credentials. I have installed and configured apache with mod_auth_pam. When I access a protected website I get a login box but it doesn't allow me to login with my domain user/pass. The apache log gives the following error: [Sat May 10 22:47:20 2008] [error] [client 192.168.1.48] PAM: user 'matt.humrick' - not authenticated: User not known to the underlying authentication module This along with an strace of apache shows that winbind is being used via mod_auth_pam for authentication with no obvious errors. Tcpdump also shows packets being exchanged between winbind and the AD Windows server. The following error appears in the winbind log: [2008/05/10 22:39:09, 6] nsswitch/winbindd.c:new_connection(628) accepted socket 19 [2008/05/10 22:39:09, 10] nsswitch/winbindd.c:process_request(314) process_request: request fn INTERFACE_VERSION [2008/05/10 22:39:09, 3] nsswitch/winbindd_misc.c:winbindd_interface_version(491) [31171]: request interface version [2008/05/10 22:39:09, 10] nsswitch/winbindd.c:process_request(314) process_request: request fn WINBINDD_PRIV_PIPE_DIR [2008/05/10 22:39:09, 3] nsswitch/winbindd_misc.c:winbindd_priv_pipe_dir(524) [31171]: request location of privileged pipe [2008/05/10 22:39:09, 10] nsswitch/winbindd.c:process_request(314) process_request: request fn PAM_AUTH [2008/05/10 22:39:09, 3] nsswitch/winbindd_pam.c:winbindd_pam_auth(751) [31171]: pam auth matt.humrick [2008/05/10 22:39:09, 5] nsswitch/winbindd_pam.c:winbindd_pam_auth(764) Plain text authentication for matt.humrick returned NT_STATUS_NO_SUCH_USER (PAM: 10) I get a similar plaintext authentication error with wbinfo -a: wbinfo -a matt.humrick%x plaintext password authentication failed error code was NT_STATUS_ACCESS_DENIED (0xc022) error messsage was: Access denied Could not authenticate user matt.humrick%x with plaintext password challenge/response password authentication succeeded So, challenge/response authentication succeeded but plaintext authentication fails. This appears to be a configuration issue to me. Obviously apache gives a plaintext user/pass to winbind vs. the challenge/response method used by an WinXP client (which is working fine). What do I need to do to allow apache to authenticate with winbind? I've read through the smb.conf man page and looked at several settings relating to plaintext passwords. However, I'm a bit confused as to when these settings should be used and whether they will break the existing functionality between the WinXP clients, winbind, and Win2003 AD server. Thanks, Matt -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] guide for setting ACL's ?
hi all can anyone point me to a guide outlining setting samba ACL's -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Re[2]: [samba 3.0.28a,1) PANIC: tdb_reopen_all failed
On Sun, 11 May 2008 22:09:07 +0200, Marcin Kucharczyk [EMAIL PROTECTED] wrote: When system (FreeBSD) is closed unexpectedly tdb files are corrupted. After boot samba tries to start, but because of corrupted tdb files it is impossible :( Thanks. I thought about this, but the server didn't reboot. Restarting Samba did the trick, but I'm concerned about this error occuring again. I wish I could downgrade to the n-1 version of the Ports collection. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-1515-g5268649
The branch, v4-0-test has been updated via 5268649b7ef60a2caae9cdf66dfeaf6d2037aba3 (commit) via 9ba5962addc0ef2e0d01329ab8178b3f51659e75 (commit) from 43c18ba5cf0f709c4a7bd686d5e6bf613227b61d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit 5268649b7ef60a2caae9cdf66dfeaf6d2037aba3 Author: Jelmer Vernooij [EMAIL PROTECTED] Date: Sun May 11 14:32:06 2008 +0200 Remove python extension from upgrade script. commit 9ba5962addc0ef2e0d01329ab8178b3f51659e75 Author: Jelmer Vernooij [EMAIL PROTECTED] Date: Sun May 11 14:08:31 2008 +0200 Properly support sentinels for binary init functions. This should fix the build. --- Summary of changes: source/build/smb_build/input.pm |2 ++ source/selftest/samba4_tests.sh |2 +- source/setup/{upgrade.py = upgrade} |0 3 files changed, 3 insertions(+), 1 deletions(-) rename source/setup/{upgrade.py = upgrade} (100%) Changeset truncated at 500 lines: diff --git a/source/build/smb_build/input.pm b/source/build/smb_build/input.pm index 34b4445..7028d2a 100644 --- a/source/build/smb_build/input.pm +++ b/source/build/smb_build/input.pm @@ -170,6 +170,8 @@ sub check_binary($$) return if ($bin-{ENABLE} ne YES); ($bin-{BINARY} = (lc $bin-{NAME})) if not defined($bin-{BINARY}); + unless (defined($bin-{INIT_FUNCTION_SENTINEL})) { $bin-{INIT_FUNCTION_SENTINEL} = NULL; } + unless (defined($bin-{INIT_FUNCTION_TYPE})) { $bin-{INIT_FUNCTION_TYPE} = NTSTATUS (*) (void); } $bin-{OUTPUT_TYPE} = [BINARY]; add_libreplace($bin); diff --git a/source/selftest/samba4_tests.sh b/source/selftest/samba4_tests.sh index 725fde2..9c7e939 100755 --- a/source/selftest/samba4_tests.sh +++ b/source/selftest/samba4_tests.sh @@ -351,7 +351,7 @@ plantest winreg.python dc $SUBUNITRUN -U\$USERNAME%\$PASSWORD samba.tests.dcer plantest ldap.python dc $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN plantest blackbox.samba3dump none $PYTHON scripting/bin/samba3dump $samba4srcdir/../testdata/samba3 rm -rf $PREFIX/upgrade -plantest blackbox.upgrade none $PYTHON setup/upgrade.py $CONFIGURATION --targetdir=$PREFIX/upgrade ../testdata/samba3 ../testdata/samba3/smb.conf +plantest blackbox.upgrade none $PYTHON setup/upgrade $CONFIGURATION --targetdir=$PREFIX/upgrade ../testdata/samba3 ../testdata/samba3/smb.conf rm -rf $PREFIX/provision mkdir $PREFIX/provision plantest blackbox.provision.py none PYTHON=$PYTHON $samba4srcdir/setup/tests/blackbox_provision.sh $PREFIX/provision $CONFIGURATION diff --git a/source/setup/upgrade.py b/source/setup/upgrade similarity index 100% rename from source/setup/upgrade.py rename to source/setup/upgrade -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-1516-gf123190
The branch, v4-0-test has been updated via f123190fb49302968a231639848023a72dfdf2bc (commit) from 5268649b7ef60a2caae9cdf66dfeaf6d2037aba3 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit f123190fb49302968a231639848023a72dfdf2bc Author: Jelmer Vernooij [EMAIL PROTECTED] Date: Sun May 11 15:15:27 2008 +0200 Remove obsolete provisioning library. --- Summary of changes: source/scripting/libjs/provision.js | 1254 --- 1 files changed, 0 insertions(+), 1254 deletions(-) delete mode 100644 source/scripting/libjs/provision.js Changeset truncated at 500 lines: diff --git a/source/scripting/libjs/provision.js b/source/scripting/libjs/provision.js deleted file mode 100644 index 51e2785..000 --- a/source/scripting/libjs/provision.js +++ /dev/null @@ -1,1254 +0,0 @@ -/* - backend code for provisioning a Samba4 server - Copyright Andrew Tridgell 2005 - Released under the GNU GPL version 3 or later -*/ - -sys = sys_init(); - -/* - return true if the current install seems to be OK -*/ -function install_ok(session_info, credentials) -{ - var lp = loadparm_init(); - var ldb = ldb_init(); - ldb.session_info = session_info; - ldb.credentials = credentials; - if (lp.get(realm) == ) { - return false; - } - var ok = ldb.connect(lp.get(sam database)); - if (!ok) { - return false; - } - var res = ldb.search((cn=Administrator)); - if (res.error != 0 || res.msgs.length != 1) { - return false; - } - return true; -} - -/* - find a user or group from a list of possibilities -*/ -function findnss() -{ - var i; - assert(arguments.length = 2); - var nssfn = arguments[0]; - for (i=1;iarguments.length;i++) { - if (nssfn(arguments[i]) != undefined) { - return arguments[i]; - } - } - printf(Unable to find user/group for %s\n, arguments[1]); - assert(iarguments.length); -} - -/* - add a foreign security principle - */ -function add_foreign(ldb, subobj, sid, desc) -{ - var add = sprintf( -dn: CN=%s,CN=ForeignSecurityPrincipals,%s -objectClass: top -objectClass: foreignSecurityPrincipal -description: %s -, - sid, subobj.DOMAINDN, desc); - /* deliberately ignore errors from this, as the records may - already exist */ - ldb.add(add); -} - - -/* - setup a mapping between a sam name and a unix name - */ -function setup_name_mapping(info, ldb, sid, unixname) -{ - var attrs = new Array(dn); - var res = ldb.search(sprintf(objectSid=%s, sid), -info.subobj.DOMAINDN, ldb.SCOPE_SUBTREE, attrs); - if (res.error != 0 || res.msgs.length != 1) { - info.message(Failed to find record for objectSid %s\n, sid); - return false; - } - var mod = sprintf( -dn: %s -changetype: modify -replace: unixName -unixName: %s -, - res.msgs[0].dn, unixname); - var ok = ldb.modify(mod); - if (ok.error != 0) { - info.message(name mapping for %s failed - %s\n, -sid, ldb.errstring()); - return false; - } - return true; -} - -/* - return current time as a nt time string -*/ -function nttime() -{ - return + sys.nttime(); -} - -/* - return current time as a ldap time string -*/ -function ldaptime() -{ - return sys.ldaptime(sys.nttime()); -} - -/* - return a date string suitable for a dns zone serial number -*/ -function datestring() -{ - var t = sys.ntgmtime(sys.nttime()); - return sprintf(%04u%02u%02u%02u, - t.tm_year+1900, t.tm_mon+1, t.tm_mday, t.tm_hour); -} - -/* - return first host IP -*/ -function hostip() -{ - var list = sys.interfaces(); - return list[0]; -} - - -/* - return first part of hostname -*/ -function hostname() -{ - var s = split(., sys.hostname()); - return s[0]; -} - -/* the ldb is in bad shape, possibly due to being built from an - incompatible previous version of the code, so delete it - completely */ -function ldb_delete(info, ldb) -{ - info.message(Deleting + ldb.filename + \n); - var lp = loadparm_init(); - sys.unlink(sprintf(%s/%s, lp.get(private dir), ldb.filename)); - ldb.transaction_cancel(); - ldb.close(); - var ok = ldb.connect(ldb.filename); - ldb.transaction_start(); - assert(ok); -} - -/* - erase an ldb, removing all records -*/ -function ldb_erase(info, ldb) -{ - var res; - - /* delete the specials */ - ldb.del(@INDEXLIST); - ldb.del(@ATTRIBUTES); - ldb.del(@OPTIONS); -
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-1517-gef53ffb
The branch, v4-0-test has been updated via ef53ffbc24cc4959acb773f27e72e90b603e81d7 (commit) from f123190fb49302968a231639848023a72dfdf2bc (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit ef53ffbc24cc4959acb773f27e72e90b603e81d7 Author: Jelmer Vernooij [EMAIL PROTECTED] Date: Sun May 11 15:31:02 2008 +0200 Add extra include directories, hopefully fixes the build on aix53bf. --- Summary of changes: source/heimdal_build/config.mk |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/heimdal_build/config.mk b/source/heimdal_build/config.mk index 33d2edb..fc46381 100644 --- a/source/heimdal_build/config.mk +++ b/source/heimdal_build/config.mk @@ -175,7 +175,7 @@ HEIMDAL_GSSAPI_OBJ_FILES = \ ### # Start SUBSYSTEM HEIMDAL_KRB5 [SUBSYSTEM::HEIMDAL_KRB5] -CFLAGS = -Iheimdal_build -Iheimdal/lib/krb5 +CFLAGS = -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/lib/asn1 -Iheimdal/lib/com_err PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN HEIMDAL_PKINIT_ASN1 HEIMDAL_WIND PUBLIC_DEPENDENCIES = HEIMDAL_KRB5_ASN1 HEIMDAL_GLUE HEIMDAL_HX509 HEIMDAL_HCRYPTO # End SUBSYSTEM HEIMDAL_KRB5 -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha3-1518-g2e87661
The branch, v4-0-test has been updated via 2e8766145ad2e8c666ecdc6c39e97ba302b16e04 (commit) from ef53ffbc24cc4959acb773f27e72e90b603e81d7 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit 2e8766145ad2e8c666ecdc6c39e97ba302b16e04 Author: Jelmer Vernooij [EMAIL PROTECTED] Date: Sun May 11 15:37:09 2008 +0200 Fail earlier on if shared libs can't be built. --- Summary of changes: source/build/m4/check_ld.m4 | 34 +- 1 files changed, 5 insertions(+), 29 deletions(-) Changeset truncated at 500 lines: diff --git a/source/build/m4/check_ld.m4 b/source/build/m4/check_ld.m4 index 0d0742e..3a74ffc 100644 --- a/source/build/m4/check_ld.m4 +++ b/source/build/m4/check_ld.m4 @@ -151,36 +151,12 @@ if test $BLDSHARED = true; then ac_cv_shmod_works=yes rm -f shlib.${SHLIBEXT} shlib.o ]) - if test $ac_cv_shlib_works = no -o $ac_cv_shmod_works = no; then - BLDSHARED=false + if test $ac_cv_shlib_works = no; then + AC_MSG_ERROR(unable to build shared libraries) + fi + if test $ac_cv_shmod_works = no; then + AC_MSG_ERROR(unable to build shared modules) fi -fi - -if test $BLDSHARED != true; then - SHLD=shared-libraries-disabled - SHLD_FLAGS=shared-libraries-disabled - MDLD=shared-modules-disabled - MDLD_FLAGS=shared-modules-disabled - SHLIBEXT=shared_libraries_disabled - SONAMEFLAG=shared-libraries-disabled - PICFLAG= - AC_MSG_CHECKING([SHLD]) - AC_MSG_RESULT([$SHLD]) - AC_MSG_CHECKING([SHLD_FLAGS]) - AC_MSG_RESULT([$SHLD_FLAGS]) - - AC_MSG_CHECKING([MDLD]) - AC_MSG_RESULT([$MDLD]) - AC_MSG_CHECKING([MDLD_FLAGS]) - AC_MSG_RESULT([$MDLD_FLAGS]) - - AC_MSG_CHECKING([SHLIBEXT]) - AC_MSG_RESULT([$SHLIBEXT]) - AC_MSG_CHECKING([SONAMEFLAG]) - AC_MSG_RESULT([$SONAMEFLAG]) - - AC_MSG_CHECKING([PICFLAG]) - AC_MSG_RESULT([$PICFLAG]) fi AC_DEFINE_UNQUOTED(SHLIBEXT, $SHLIBEXT, [Shared library extension]) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre3-69-g0352113
The branch, v3-2-stable has been updated via 03521136ccb4d4a52c9c0373beed7df2485397a9 (commit) from 463f6d87c756bffa4cacf2bdbf55e47f6e88050a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable - Log - commit 03521136ccb4d4a52c9c0373beed7df2485397a9 Author: Michael Adam [EMAIL PROTECTED] Date: Sat May 10 00:13:11 2008 +0200 loadparm: Fix activation of registry globals in lp_load_*. This completes bba04a8fba6fd5cf62578733cfdabea590e8ff51: The reverted logic has to be put into the callers lp_load() and lp_load_initial_only() of lp_load_ex(), too. Silly bug. Michael (cherry picked from commit 8bab6d651f1cd0efe5aa1e7808b3f043602a3dfa) --- Summary of changes: source/param/loadparm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 09049db..b539684 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -8783,7 +8783,7 @@ bool lp_load(const char *pszFname, save_defaults, add_ipc, initialize_globals, - false); + true); } bool lp_load_initial_only(const char *pszFname) @@ -8793,7 +8793,7 @@ bool lp_load_initial_only(const char *pszFname) false, false, true, - true); + false); } /*** -- Samba Shared Repository
[SCM] CTDB repository - branch master updated - 423a2b0965ed6aaaf1dce8864a07ed93944bcf16
The branch, master has been updated via 423a2b0965ed6aaaf1dce8864a07ed93944bcf16 (commit) from 7c569720beb626617d800211faaf9029f0deb4cf (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log - commit 423a2b0965ed6aaaf1dce8864a07ed93944bcf16 Author: Ronnie Sahlberg [EMAIL PROTECTED] Date: Mon May 12 07:24:02 2008 +1000 Update to new release --- Summary of changes: packaging/RPM/ctdb.spec | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec index 689e70f..a62b91a 100644 --- a/packaging/RPM/ctdb.spec +++ b/packaging/RPM/ctdb.spec @@ -5,7 +5,7 @@ Vendor: Samba Team Packager: Samba Team [EMAIL PROTECTED] Name: ctdb Version: 1.0 -Release: 36 +Release: 37 Epoch: 0 License: GNU GPL version 3 Group: System Environment/Daemons @@ -120,6 +120,15 @@ fi %{_includedir}/ctdb_private.h %changelog +* Mon May 12 2008 : Version 1.0.37 + - When we shutdown ctdb we close the transport down before we run the + shutdown eventscripts. If ctdb decides to send a packet to a remote node + after we have shutdown the transport but before we have shutdown ctdbd + itself this could lead to a SEGV instead of a clean shutdown. Fix. + - When using the exportfs command to extract which NFS export directories + to monitor, exportfs violates the principle of least surprise and + sometimes report a single export line as two lines of text output + causing the monitoring to fail. * Fri May 9 2008 : Version 1.0.36 - fix a memory corruption bug that could cause the recovery daemon to crash. - fix a bug with distributing public ip addresses during recovery. -- CTDB repository
ldb-hs: Import work on Haskell bindings for LDB
Mon Nov 28 16:21:35 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Import work on Haskell bindings for LDB A ./LDB.chs A ./Makefile A ./test.hs Mon Nov 28 16:21:35 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Import work on Haskell bindings for LDB diff -rN -u old-ldb-hs/LDB.chs new-ldb-hs/LDB.chs --- old-ldb-hs/LDB.chs 1970-01-01 01:00:00.0 +0100 +++ new-ldb-hs/LDB.chs 2008-05-12 01:19:01.0 +0200 @@ -0,0 +1,121 @@ +{- + Haskell bindings for LDB + + Copyright (C) Jelmer Vernooij 2005 + + ** NOTE! The following LGPL license applies to the ldb + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-} +#include stdarg.h +#include stdint.h +#include stdlib.h +#include stdio.h +#include ../include/ldb.h + +module LDB (Element, Message, Context, connect, search, add, modify, delete, + rename, parseDn) +where + +import Foreign +import Foreign.Ptr +import Foreign.C.String +import Foreign.C.Types +import Monad + +{#context lib = ldb#} +{#context prefix = ldb#} + +{#enum ldb_changetype as Changetype {underscoreToCase}#} +{#enum ldb_scope as Scope {underscoreToCase}#} +{#enum ldb_debug_level as DebugLevel {underscoreToCase}#} + +-- Only used internally +{#pointer *ldb_message as LMessage newtype#} +{#pointer *ldb_dn as LDn newtype#} + +{#pointer *ldb_context as Context newtype#} + +data Element = Element { + name :: String, + value :: [String], + flags :: Int +} + +data Message = Message { + dn :: Dn, + elements :: [Element] +} + +-- Convert from LMessage to Message +fromLMessage :: LMessage - Message +fromLMessage = undefined -- FIXME + +toLMessage :: Message - LMessage +toLMessage = undefined -- FIXME + +data Dn = EmptyDn + | Child String String Dn + | Special String + +fromLDn :: LDn - Dn +fromLDn = undefined -- FIXME + +toLDn :: Dn - LDn +toLDn = undefined -- FIXME + +ldbException :: String +ldbException = An LDB error occurred + +connect :: String - [String] - IO Context +connect url opts = do + ctx - {#call unsafe ldb_init#} nullPtr + mem - newCString url + {#call unsafe ldb_connect#} ctx mem 0 undefined + free mem + return ctx + +search :: Context - Dn - Scope - String - [String] - IO [Message] +search ctx dn sc expr attrs = do + mem - newCString expr + {#call unsafe ldb_search#} ctx (toLDn dn) sc mem [] + free mem + return [] -- FIXME + +add :: Context - Message - IO () +add ctx msg = do + {#call unsafe ldb_add#} ctx $ toLMessage msg + return () + +modify :: Context - Message - IO () +modify ctx msg = do + {#call unsafe ldb_modify#} ctx $ toLMessage msg + return () + +delete :: Context - Dn - IO () +delete ctx dn = do + {#call unsafe ldb_delete#} ctx $ toLDn dn + return () + +rename :: Context - Dn - Dn - IO () +rename ctx od nd = do + {#call unsafe ldb_rename#} ctx (toLDn od) (toLDn nd) + return () + +parseDn :: String - LDn +parseDn s = do + return $ {#call ldb_dn_explode#} nullPtr $ withCString s diff -rN -u old-ldb-hs/Makefile new-ldb-hs/Makefile --- old-ldb-hs/Makefile 1970-01-01 01:00:00.0 +0100 +++ new-ldb-hs/Makefile 2008-05-12 01:19:01.0 +0200 @@ -0,0 +1,18 @@ +HC ?= ghc +HCFLAGS += -fglasgow-exts +C2HS = c2hs +C2HSFLAGS = -l + +all: LDB.hs + +%.o: %.hs + $(HC) $(HCFLAGS) -L. $ + +test: test.o LDB.o + $(HC) $(HCFLAGS) -L. $^ + +clean: + rm -f LDB.hs LDB.chi LDB.h *.hi *.o + +%.hs: %.chs + $(C2HS) $(C2HSFLAGS) $ diff -rN -u old-ldb-hs/test.hs new-ldb-hs/test.hs --- old-ldb-hs/test.hs 1970-01-01 01:00:00.0 +0100 +++ new-ldb-hs/test.hs 2008-05-12 01:19:01.0 +0200 @@ -0,0 +1,6 @@ +module Main +where +import LDB + +main :: IO () +main = putStr bla
ldb-hs: Properly convert some more C types
Mon Dec 5 15:15:15 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Properly convert some more C types M ./LDB.chs -7 +5 M ./ldb.pkg -1 +1 Mon Dec 5 15:15:15 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Properly convert some more C types diff -rN -u old-ldb-hs/LDB.chs new-ldb-hs/LDB.chs --- old-ldb-hs/LDB.chs 2008-05-12 01:19:03.0 +0200 +++ new-ldb-hs/LDB.chs 2008-05-12 01:19:03.0 +0200 @@ -31,10 +31,7 @@ rename, parseDn) where -import Foreign -import Foreign.Ptr -import Foreign.C.String -import Foreign.C.Types +import C2HS import Monad {#context lib = ldb#} @@ -107,10 +104,11 @@ search :: Context - Dn - Scope - String - [String] - IO [Message] search ctx dn sc expr attrs = do mem - newCString expr - lattrs - undefined - lmsg - undefined + lattrs - undefined --FIXME + pmsg - undefined -- FIXME ldn - toLDn dn - ret - {#call unsafe ldb_search#} ctx ldn (fromEnum sc) mem lattrs lmsg + ret - {#call unsafe ldb_search#} ctx ldn (cFromEnum sc) mem lattrs pmsg + lmsg - peekArray (cIntConv ret) pmsg free mem return $ map fromLMessage lmsg diff -rN -u old-ldb-hs/ldb.pkg new-ldb-hs/ldb.pkg --- old-ldb-hs/ldb.pkg 2008-05-12 01:19:03.0 +0200 +++ new-ldb-hs/ldb.pkg 2008-05-12 01:19:03.0 +0200 @@ -4,7 +4,7 @@ import_dirs = [${pkglibdir}/imports/ldb], source_dirs = [], library_dirs= [${pkglibdir}], - hs_libraries= [], + hs_libraries= [HSldb], extra_libraries = [ldb], include_dirs= [], c_includes = [ldb.h],
ldb-hs: Add haskell auxilary files
Mon Nov 28 21:44:16 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Add haskell auxilary files M ./LDB.chs -1 +1 A ./ldb.cabal A ./ldb.pkg Mon Nov 28 21:44:16 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Add haskell auxilary files diff -rN -u old-ldb-hs/ldb.cabal new-ldb-hs/ldb.cabal --- old-ldb-hs/ldb.cabal1970-01-01 01:00:00.0 +0100 +++ new-ldb-hs/ldb.cabal2008-05-12 01:19:02.0 +0200 @@ -0,0 +1,10 @@ +name: ldb +version: 1.0 +license: LGPL +license-file: COPYING +maintainer: [EMAIL PROTECTED] +stability: provisional +homepage: http://samba.org/~jelmer/ldb.hs +category: System +build-depends: +exposed-modules: ${modules} diff -rN -u old-ldb-hs/LDB.chs new-ldb-hs/LDB.chs --- old-ldb-hs/LDB.chs 2008-05-12 01:19:02.0 +0200 +++ new-ldb-hs/LDB.chs 2008-05-12 01:19:02.0 +0200 @@ -25,7 +25,7 @@ #include stdint.h #include stdlib.h #include stdio.h -#include ../include/ldb.h +#include ldb.h module LDB (Element, Message, Context, connect, search, add, modify, delete, rename, parseDn) diff -rN -u old-ldb-hs/ldb.pkg new-ldb-hs/ldb.pkg --- old-ldb-hs/ldb.pkg 1970-01-01 01:00:00.0 +0100 +++ new-ldb-hs/ldb.pkg 2008-05-12 01:19:02.0 +0200 @@ -0,0 +1,15 @@ +Package { + name= ldb, + auto= True, + import_dirs = [${pkglibdir}/imports/ldb], + source_dirs = [], + library_dirs= [${pkglibdir}], + hs_libraries= [], + extra_libraries = [ldb], + include_dirs= [], + c_includes = [ldb.h], + package_deps= [], -- talloc? + extra_ghc_opts = [], + extra_cc_opts = [], + extra_ld_opts = [] +}
ldb-hs: Remove use of deprecated cabal modules
Mon May 12 01:11:37 CEST 2008 Jelmer Vernooij [EMAIL PROTECTED] * Remove use of deprecated cabal modules M ./Setup.hs -2 +1 Mon May 12 01:11:37 CEST 2008 Jelmer Vernooij [EMAIL PROTECTED] * Remove use of deprecated cabal modules diff -rN -u old-ldb-hs/Setup.hs new-ldb-hs/Setup.hs --- old-ldb-hs/Setup.hs 2008-05-12 01:19:23.0 +0200 +++ new-ldb-hs/Setup.hs 2008-05-12 01:19:23.0 +0200 @@ -6,7 +6,6 @@ import Distribution.PackageDescription -- for the argument types of the `postInst' hook -import Distribution.Setup import Distribution.Simple.LocalBuildInfo -main = defaultMainWithHooks defaultUserHooks +main = defaultMain
ldb-hs: Use cabal build system rather then make
Mon Nov 28 22:04:27 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Use cabal build system rather then make R ./Makefile A ./Setup.hs M ./ldb.cabal -10 +14 Mon Nov 28 22:04:27 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Use cabal build system rather then make diff -rN -u old-ldb-hs/ldb.cabal new-ldb-hs/ldb.cabal --- old-ldb-hs/ldb.cabal2008-05-12 01:19:02.0 +0200 +++ new-ldb-hs/ldb.cabal2008-05-12 01:19:02.0 +0200 @@ -1,10 +1,14 @@ -name: ldb -version: 1.0 -license: LGPL -license-file: COPYING -maintainer: [EMAIL PROTECTED] -stability: provisional -homepage: http://samba.org/~jelmer/ldb.hs -category: System -build-depends: -exposed-modules: ${modules} +Name: ldb +Version: 1.0 +License: LGPL +License-File: COPYING +Maintainer: [EMAIL PROTECTED] +Copyright: Copyright (c) 2005 Jelmer Vernooij +Stability: provisional +Homepage: http://samba.org/~jelmer/ldb.hs +Exposed-modules: LDB +Synopsis: Haskell bindings to LDB +Category: Database Library +Build-Depends: base, haskell98 +Extensions:ForeignFunctionInterface +Ghc-Options: -O diff -rN -u old-ldb-hs/Makefile new-ldb-hs/Makefile --- old-ldb-hs/Makefile 2008-05-12 01:19:02.0 +0200 +++ new-ldb-hs/Makefile 1970-01-01 01:00:00.0 +0100 @@ -1,18 +0,0 @@ -HC ?= ghc -HCFLAGS += -fglasgow-exts -C2HS = c2hs -C2HSFLAGS = -l - -all: LDB.hs - -%.o: %.hs - $(HC) $(HCFLAGS) -L. $ - -test: test.o LDB.o - $(HC) $(HCFLAGS) -L. $^ - -clean: - rm -f LDB.hs LDB.chi LDB.h *.hi *.o - -%.hs: %.chs - $(C2HS) $(C2HSFLAGS) $ diff -rN -u old-ldb-hs/Setup.hs new-ldb-hs/Setup.hs --- old-ldb-hs/Setup.hs 1970-01-01 01:00:00.0 +0100 +++ new-ldb-hs/Setup.hs 2008-05-12 01:19:02.0 +0200 @@ -0,0 +1,12 @@ +#!/usr/bin/env runhaskell + +import System (system, ExitCode) + +import Distribution.Simple +import Distribution.PackageDescription + +-- for the argument types of the `postInst' hook +import Distribution.Setup +import Distribution.Simple.LocalBuildInfo + +main = defaultMainWithHooks defaultUserHooks
ldb-hs: Add some show and parse functions
Tue Nov 29 17:16:46 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Add some show and parse functions M ./LDB.chs -15 +37 Tue Nov 29 17:16:46 CET 2005 Jelmer Vernooij [EMAIL PROTECTED] * Add some show and parse functions diff -rN -u old-ldb-hs/LDB.chs new-ldb-hs/LDB.chs --- old-ldb-hs/LDB.chs 2008-05-12 01:19:02.0 +0200 +++ new-ldb-hs/LDB.chs 2008-05-12 01:19:02.0 +0200 @@ -62,21 +62,36 @@ } -- Convert from LMessage to Message -fromLMessage :: LMessage - Message +fromLMessage :: LMessage - IO Message fromLMessage = undefined -- FIXME -toLMessage :: Message - LMessage +toLMessage :: Message - IO LMessage toLMessage = undefined -- FIXME data Dn = EmptyDn | Child String String Dn | Special String -fromLDn :: LDn - Dn +instance Show Dn where + show (Special n) = @ ++ n + show (EmptyDn) = + show (Child n v p) = n ++ = ++ v ++, ++ (show p) + +fromLDn :: LDn - IO Dn fromLDn = undefined -- FIXME -toLDn :: Dn - LDn -toLDn = undefined -- FIXME +toLDn :: Dn - IO LDn +toLDn (EmptyDn) = do {#call ldb_dn_new#} nullPtr +toLDn (Child n v p) = do + name - newCString n + value - newCString v + parent - toLDn p + dn - {#call ldb_dn_build_child#} nullPtr name value parent + free name + free value + return dn +toLDn (Special n) = do + withCString n $ {#call ldb_dn_explode#} nullPtr ldbException :: String ldbException = An LDB error occurred @@ -85,37 +100,44 @@ connect url opts = do ctx - {#call unsafe ldb_init#} nullPtr mem - newCString url - {#call unsafe ldb_connect#} ctx mem 0 undefined + {#call unsafe ldb_connect#} ctx mem 0 undefined --FIXME free mem return ctx search :: Context - Dn - Scope - String - [String] - IO [Message] search ctx dn sc expr attrs = do mem - newCString expr - {#call unsafe ldb_search#} ctx (toLDn dn) sc mem [] + lattrs - undefined + lmsg - undefined + ldn - toLDn dn + ret - {#call unsafe ldb_search#} ctx ldn (fromEnum sc) mem lattrs lmsg free mem - return [] -- FIXME + return $ map fromLMessage lmsg add :: Context - Message - IO () add ctx msg = do - {#call unsafe ldb_add#} ctx $ toLMessage msg + lmsg - toLMessage msg + ret - {#call unsafe ldb_add#} ctx lmsg return () modify :: Context - Message - IO () modify ctx msg = do - {#call unsafe ldb_modify#} ctx $ toLMessage msg + lmsg - toLMessage msg + ret - {#call unsafe ldb_modify#} ctx lmsg return () delete :: Context - Dn - IO () delete ctx dn = do - {#call unsafe ldb_delete#} ctx $ toLDn dn + ldn - toLDn dn + ret - {#call unsafe ldb_delete#} ctx ldn return () rename :: Context - Dn - Dn - IO () rename ctx od nd = do - {#call unsafe ldb_rename#} ctx (toLDn od) (toLDn nd) + oldn - toLDn od + nldn - toLDn nd + ret - {#call unsafe ldb_rename#} ctx oldn nldn return () -parseDn :: String - LDn -parseDn s = do - return $ {#call ldb_dn_explode#} nullPtr $ withCString s +parseDn :: String - Dn +parseDn s = undefined -- FIXME
ldb-hs: Update license to LGPLv3 or later
Mon May 12 01:21:45 CEST 2008 Jelmer Vernooij [EMAIL PROTECTED] * Update license to LGPLv3 or later M ./COPYING -471 +126 M ./LDB.chs -1 +1 M ./ldb.cabal -1 +1 M ./tests/official.hs -1 +1 Mon May 12 01:21:45 CEST 2008 Jelmer Vernooij [EMAIL PROTECTED] * Update license to LGPLv3 or later diff -rN -u old-ldb-hs/COPYING new-ldb-hs/COPYING --- old-ldb-hs/COPYING 2008-05-12 01:25:02.0 +0200 +++ new-ldb-hs/COPYING 2008-05-12 01:25:02.0 +0200 @@ -1,510 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - -Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the Lesser General Public License
Build status as of Mon May 12 00:00:03 2008
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2008-05-11 00:00:41.0 + +++ /home/build/master/cache/broken_results.txt 2008-05-12 00:00:47.0 + @@ -1,22 +1,22 @@ -Build status as of Sun May 11 00:00:02 2008 +Build status as of Mon May 12 00:00:03 2008 Build counts: Tree Total Broken Panic build_farm 0 0 0 -ccache 32 7 0 +ccache 31 8 0 ctdb 0 0 0 distcc 1 0 0 -ldb 32 12 0 -libreplace 31 10 0 -lorikeet-heimdal 27 24 0 -pidl 18 14 0 +ldb 31 12 0 +libreplace 30 10 0 +lorikeet-heimdal 27 23 0 +pidl 17 13 0 ppp 11 0 0 -rsync32 13 0 +rsync31 13 0 samba-docs 0 0 0 samba-gtk4 4 0 samba_3_2_test 31 19 0 -samba_4_0_test 30 29 0 -smb-build30 5 0 -talloc 32 6 0 -tdb 32 12 0 +samba_4_0_test 29 23 1 +smb-build29 5 0 +talloc 31 6 0 +tdb 31 12 0
ldb-hs: Use cabal to find ldb compile/link flags
Mon May 12 02:13:46 CEST 2008 Jelmer Vernooij [EMAIL PROTECTED] * Use cabal to find ldb compile/link flags M ./ldb.cabal -1 +2 Mon May 12 02:13:46 CEST 2008 Jelmer Vernooij [EMAIL PROTECTED] * Use cabal to find ldb compile/link flags diff -rN -u old-ldb-hs/ldb.cabal new-ldb-hs/ldb.cabal --- old-ldb-hs/ldb.cabal2008-05-12 02:15:26.0 +0200 +++ new-ldb-hs/ldb.cabal2008-05-12 02:15:26.0 +0200 @@ -10,5 +10,6 @@ Homepage: http://samba.org/~jelmer/ldb-hs Exposed-modules: LDB Category: Database Library -Build-Depends: base, haskell98, c2hs +Build-Depends: base, haskell98 +pkgconfig-depends: ldb Extensions:ForeignFunctionInterface
[SCM] CTDB repository - branch master updated - 8d6ecf47318188448d934ab76e40da7e4cece67d
The branch, master has been updated via 8d6ecf47318188448d934ab76e40da7e4cece67d (commit) from 423a2b0965ed6aaaf1dce8864a07ed93944bcf16 (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log - commit 8d6ecf47318188448d934ab76e40da7e4cece67d Author: Ronnie Sahlberg [EMAIL PROTECTED] Date: Mon May 12 13:37:31 2008 +1000 Try to use tdb transactions when updating a record and record header inside the ctdb daemon. If a transaction could be started, do safe transaction store when updating the record inside the daemon. If the transaction could not be started (maybe another samba process has a lock on the database?) then just do a normal store instead (instead of blocking the ctdb daemon). The client can signal ctdb that updates to this database should, if possible, be done using safe transactions by specifying the TDB_NOSYNC flag when attaching to the database. The TDB flags are passed to ctdb in the srvid field of the control header when attaching using the CTDB_CONTROL_DB_ATTACH_PERSISTENT. Currently, samba3.2 does not yet tell ctdbd to handle any persistent databases using safe transactions. If samba3.2 wants a particular persistent database to be handled using safe transactions inside the ctdbd daemon, it should pass TDB_NOSYNC as the flags to the call to attach to a persistent database in ctdbd_db_attach() it currently specifies 0 as the srvid --- Summary of changes: common/ctdb_ltdb.c| 26 +- include/ctdb_private.h|3 ++- server/ctdb_control.c |4 ++-- server/ctdb_ltdb_server.c | 13 - 4 files changed, 41 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/common/ctdb_ltdb.c b/common/ctdb_ltdb.c index e8a334a..a3df65e 100644 --- a/common/ctdb_ltdb.c +++ b/common/ctdb_ltdb.c @@ -150,7 +150,31 @@ int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key, memcpy(rec.dptr, header, sizeof(*header)); memcpy(rec.dptr + sizeof(*header), data.dptr, data.dsize); - ret = tdb_store(ctdb_db-ltdb-tdb, key, rec, TDB_REPLACE); + /* if this is a persistent database without NOSYNC then we + will do this via a transaction */ + if (ctdb_db-persistent !(ctdb_db-client_tdb_flags TDB_NOSYNC)) { + bool transaction_started = true; + + ret = tdb_transaction_start(ctdb_db-ltdb-tdb); + if (ret != 0) { + transaction_started = false; + DEBUG(DEBUG_NOTICE, (Failed to start local transaction\n)); + } + ret = tdb_store(ctdb_db-ltdb-tdb, key, rec, TDB_REPLACE); + if (ret != 0) { + if (transaction_started) { + tdb_transaction_cancel(ctdb_db-ltdb-tdb); + } + goto failed; + } + if (transaction_started) { + ret = tdb_transaction_commit(ctdb_db-ltdb-tdb); + } + } else { + ret = tdb_store(ctdb_db-ltdb-tdb, key, rec, TDB_REPLACE); + } + +failed: talloc_free(rec.dptr); return ret; diff --git a/include/ctdb_private.h b/include/ctdb_private.h index d31b148..bc8bde3 100644 --- a/include/ctdb_private.h +++ b/include/ctdb_private.h @@ -410,6 +410,7 @@ struct ctdb_db_context { struct ctdb_registered_call *calls; /* list of registered calls */ uint32_t seqnum; struct timed_event *te; + uint32_t client_tdb_flags; }; @@ -921,7 +922,7 @@ int ctdb_daemon_send_control(struct ctdb_context *ctdb, uint32_t destnode, void *private_data); int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata, - TDB_DATA *outdata, bool persistent); + TDB_DATA *outdata, uint64_t tdb_flags, bool persistent); int ctdb_daemon_set_call(struct ctdb_context *ctdb, uint32_t db_id, ctdb_fn_t fn, int id); diff --git a/server/ctdb_control.c b/server/ctdb_control.c index 6a2a9ce..7d55413 100644 --- a/server/ctdb_control.c +++ b/server/ctdb_control.c @@ -206,10 +206,10 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb, } case CTDB_CONTROL_DB_ATTACH: - return ctdb_control_db_attach(ctdb, indata, outdata, false); + return ctdb_control_db_attach(ctdb, indata, outdata, srvid, false); case CTDB_CONTROL_DB_ATTACH_PERSISTENT: - return ctdb_control_db_attach(ctdb, indata, outdata, true); + return ctdb_control_db_attach(ctdb, indata, outdata, srvid, true); case CTDB_CONTROL_SET_CALL: {