obnox/samba-ctdb.git
15 years agos3:netlogon: implement _netr_LogonGetCapabilities() with NT_STATUS_NOT_IMPLEMENTED
Stefan Metzmacher [Mon, 16 Feb 2009 09:20:55 +0000 (10:20 +0100)]
s3:netlogon: implement _netr_LogonGetCapabilities() with NT_STATUS_NOT_IMPLEMENTED

This hopefully fixes bug #6100.

metze
(cherry picked from commit fe417b29bd23b7b935669993e0f01de4c7de2378)
(cherry picked from commit 2f858cb914842e9af1331477ec6eb9782dbd0cf5)
(cherry picked from commit 9edecdaa12fa42a356008b90710475ad9a1ae581)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agonetlogon.idl: add idl for netr_LogonGetCapabilities()
Stefan Metzmacher [Mon, 16 Feb 2009 09:42:43 +0000 (10:42 +0100)]
netlogon.idl: add idl for netr_LogonGetCapabilities()

metze
(cherry picked from commit 8339969ed39e4cf3577971869ef2fd127f1c3ae3)
(cherry picked from commit 5410134c70e3302c05b73109610c28dfa1a0dc69)
(cherry picked from commit 4a353efc45480d3de91f91f618135faf8eb0429e)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoProperly cast array length in print functions. (This used to be commit f321240fa91fa1...
Jelmer Vernooij [Mon, 21 Jul 2008 10:47:08 +0000 (12:47 +0200)]
Properly cast array length in print functions. (This used to be commit f321240fa91fa19c1131f119c42f64897d220682)
(cherry picked from commit 37a29ad53eae02a29fbb0bf14731487328150d23)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agopidl: add pidl in order to be able to regenerate librpc functions.
Günther Deschner [Tue, 17 Feb 2009 02:32:16 +0000 (03:32 +0100)]
pidl: add pidl in order to be able to regenerate librpc functions.

This is pidl as of 0c6ce977ffb8f53f546596b76c1e0858cc6a88ba.

Guenther
(cherry picked from commit bd53a095de3d221cab4a90a35cd018edd800f79a)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix bug 5920
Yasuma Takeda [Mon, 16 Feb 2009 13:07:37 +0000 (14:07 +0100)]
Fix bug 5920

The length of the memcpy was calculated wrong, r->out.return_authenticator is
a pointer
(cherry picked from commit cb9dd0f58d06a78b7724c3e0ec8f81512edc2d29)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoAttempt to fix bug #6099. According to Microsoft
Jeremy Allison [Mon, 16 Feb 2009 02:18:21 +0000 (18:18 -0800)]
Attempt to fix bug #6099. According to Microsoft
Windows 7 looks at the negotiate_flags
returned in this structure *even if the
call fails with access denied ! So in order
to allow Win7 to connect to a Samba NT style
PDC we set the flags before we know if it's
an error or not.
Jeremy.
(cherry picked from commit eb82149dc7f6bbcca85e8ef97f3e23952b438770)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3 vfs: Fix SMB_VFS_RECVFILE/SENDFILE macros
Tim Prouty [Sun, 15 Feb 2009 04:34:16 +0000 (20:34 -0800)]
s3 vfs: Fix SMB_VFS_RECVFILE/SENDFILE macros
(cherry picked from commit 0c4b1974a19d1ee78d3973808e9b854c19847a2b)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoOops. Fix the build (don't use 3.3 references in 3.2 :-).
Jeremy Allison [Sat, 14 Feb 2009 01:33:24 +0000 (17:33 -0800)]
Oops. Fix the build (don't use 3.3 references in 3.2 :-).
Jeremy.
(cherry picked from commit a7a3f335e3b867ca6c8d75a53262b15d7c75d7b1)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoEnable total anonymization in vfs_smb_traffic_analyzer, by mapping
Holger Hetterich [Sat, 14 Feb 2009 01:30:22 +0000 (17:30 -0800)]
Enable total anonymization in vfs_smb_traffic_analyzer, by mapping
any user names to the one given by anonymize_prefix, without
generating a hash number. This setting is optional and is compatible
with the module configuration format of Samba 3.3.
(cherry picked from commit 4b17cca0557a086c5722c221a6e282bad4a2b40a)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoParameterize in local.h the MAX_RPC_DATA_SIZE, and ensure
Jeremy Allison [Sat, 14 Feb 2009 00:06:29 +0000 (16:06 -0800)]
Parameterize in local.h the MAX_RPC_DATA_SIZE, and ensure
that "offered" read from the rpc packet in spoolss is under
that size. Tidyup from analysis from Veracode.
Jeremy.
(cherry picked from commit 3ac4c42e1e5be2f25ef4602efa2ac360d8b603ce)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoNoted by Vericode analysis. Correctly use chroot().
Jeremy Allison [Fri, 13 Feb 2009 23:06:13 +0000 (15:06 -0800)]
Noted by Vericode analysis. Correctly use chroot().
Jeremy.
(cherry picked from commit c604236558b0be1b8a8539c7823e22f8e5eea55b)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix Coverity IDs 879 and 880 (RESOURCE_LEAK, REVERSE_INULL)
Volker Lendecke [Fri, 13 Feb 2009 18:06:26 +0000 (10:06 -0800)]
Fix Coverity IDs 879 and 880 (RESOURCE_LEAK, REVERSE_INULL)
(cherry picked from commit f7dc45f72145f0bba40c4a2e1a3ac7e4a85fd9cd)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix Coverity ID 742 (RESOURCE_LEAK)
Volker Lendecke [Fri, 13 Feb 2009 17:58:48 +0000 (09:58 -0800)]
Fix Coverity ID 742 (RESOURCE_LEAK)
(cherry picked from commit eee6c3cd63c08f999c400d864dd7f7de68c03b85)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix Coverity ID 744
Volker Lendecke [Fri, 13 Feb 2009 17:53:56 +0000 (09:53 -0800)]
Fix Coverity ID 744

This was marked as a resource leak. This change makes the code a bit clearer
that we always free error_string.
(cherry picked from commit b03d45e6783e2706bd5d9c98a88ac07933e3adeb)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix Coverity ID 745 (RESOURCE_LEAK)
Volker Lendecke [Fri, 13 Feb 2009 10:18:31 +0000 (11:18 +0100)]
Fix Coverity ID 745 (RESOURCE_LEAK)
(cherry picked from commit 566f4e92390312feddedf16f2175139ef62ac45e)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix double free caused by incorrect talloc_steal usage.
Dan Sledz [Thu, 12 Feb 2009 20:01:16 +0000 (12:01 -0800)]
Fix double free caused by incorrect talloc_steal usage.
(cherry picked from commit 9aeca67cbeb1a04082b02d54150d042a7b5a241d)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix bug #6098 - When the DNS server is invalid, the ads_find_dc() does not work corre...
Yasuma Takeda [Wed, 11 Feb 2009 22:23:29 +0000 (14:23 -0800)]
Fix bug #6098 - When the DNS server is invalid, the ads_find_dc() does not work correctly with "security = domain"

1. If DNS server is invalid, the get_sorted_dc_list() is called with
realm(FQDN) and it fails.
2. On the next step, the get_sorted_dc_list() is called with realm(FQDN) again.

I think "again" is wrong place.
On the 2nd step, get_sorted_dc_list() should be called with realm(WORKGROUP).
(cherry picked from commit 2f3eafae83d036c5b35e5d7d11be6e29aaab7533)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agov3-2-ctdb: bump version number to 3.2.8_ctdb.57
Michael Adam [Tue, 24 Mar 2009 15:19:01 +0000 (16:19 +0100)]
v3-2-ctdb: bump version number to 3.2.8_ctdb.57

Michael

15 years agoAdd a vfs_preopen module to hide fs latencies
Volker Lendecke [Sun, 23 Nov 2008 07:01:33 +0000 (08:01 +0100)]
Add a vfs_preopen module to hide fs latencies

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agofixed a bug in message handling for code the change notify code
Andrew Tridgell [Tue, 10 Mar 2009 05:45:45 +0000 (16:45 +1100)]
fixed a bug in message handling for code the change notify code

The change notify code registered a separate message handler for each
tree connect. This registration uses the global messaging context.

The messaging code would consider a 2nd registration for the same
messaging type as being an 'update' of the handler, rather than a new
handler. It also would only call the first handler in the linked list
for a given message type when dispatching messages.

This patch changes the messaging code to allow for multiple
registrations of the same message type, and allow for multiple calls
to different messaging handler for one incoming message.

This fixes the problem with the test_notify_tcon() test that I
recently committed to the S4 smbtorture

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:dbwrap_ctdb_marshall_add: don't leak the ctdb_rec_data to the outside build_3.2.8_ctdb.56
Michael Adam [Wed, 4 Mar 2009 21:05:17 +0000 (22:05 +0100)]
s3:dbwrap_ctdb_marshall_add: don't leak the ctdb_rec_data to the outside

Michael

15 years agos3:smbconf: move smbconf_share_exists checks into backend
Michael Adam [Wed, 4 Mar 2009 21:02:07 +0000 (22:02 +0100)]
s3:smbconf: move smbconf_share_exists checks into backend

Michael

15 years agos3:net conf: reduce memory usage of "net conf import".
Michael Adam [Wed, 4 Mar 2009 20:46:32 +0000 (21:46 +0100)]
s3:net conf: reduce memory usage of "net conf import".

"net conf import" was wrapped in one big transaction.
This lead to MAX_TALLOC_SIZE being exceeded at roughly
1500 shares. This patch resolves that problem by
limiting the top level transactions in "net conf import"
to 100 shares.

Michael

15 years agoversion: raise ctdb vendor patch level to 56
Michael Adam [Wed, 4 Mar 2009 10:19:01 +0000 (11:19 +0100)]
version: raise ctdb vendor patch level to 56

Michael

15 years agoMake use of gpfs_get_real_filename optional
Volker Lendecke [Mon, 2 Mar 2009 13:56:01 +0000 (14:56 +0100)]
Make use of gpfs_get_real_filename optional

15 years agos3: Fix a memleak in dbwrap_rbt.
Michael Adam [Fri, 27 Feb 2009 14:28:52 +0000 (15:28 +0100)]
s3: Fix a memleak in dbwrap_rbt.

The SMB_MALLOC'ed rbt node data was not free'd on talloc free of
the db context. This is a quick fix using talloc instead of malloc
for allocation of the node data.

Since malloc was originally used for performance reasons, one
might want to reverse to malloc and create a talloc destructor
that walks the tree and frees all the node data if this talloc
approach proves to be too slow..

Michael

15 years agos3:smbconftort: don't use reserved words ('test:', 'failure:', 'success:')
Stefan Metzmacher [Fri, 30 Jan 2009 13:36:48 +0000 (14:36 +0100)]
s3:smbconftort: don't use reserved words ('test:', 'failure:', 'success:')

Temporary results printfs should not contain reserved subunit words.

metze

15 years agos3:libsmbconf: include smbconf headers with lib/smbconf prefix
Michael Adam [Wed, 21 Jan 2009 17:25:47 +0000 (18:25 +0100)]
s3:libsmbconf: include smbconf headers with lib/smbconf prefix

Michael

15 years agos3:libsmbconf: use talloc_free instead of TALLOC_FREE in txt backend
Michael Adam [Wed, 21 Jan 2009 16:14:56 +0000 (17:14 +0100)]
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in txt backend

Michael

15 years agos3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf_init
Michael Adam [Wed, 21 Jan 2009 16:12:50 +0000 (17:12 +0100)]
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf_init

Michael

15 years agos3:libsmbconf: use talloc_free instead of TALLOC_FREE in testsuite
Michael Adam [Wed, 21 Jan 2009 16:11:46 +0000 (17:11 +0100)]
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in testsuite

Michael

15 years agos3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf_util.c
Michael Adam [Wed, 21 Jan 2009 16:11:02 +0000 (17:11 +0100)]
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf_util.c

Michael

15 years agos3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf.c
Michael Adam [Wed, 21 Jan 2009 16:10:20 +0000 (17:10 +0100)]
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf.c

Michael

15 years agos3:libsmbconf: remove the init headers from smbconf.h
Michael Adam [Wed, 21 Jan 2009 15:59:09 +0000 (16:59 +0100)]
s3:libsmbconf: remove the init headers from smbconf.h

give the smbconf_init() dispatcher and the backends
(smbconf_reg and smbconf_txt) a header of their own each.

This allows to use the basic infrastructure and
single backends individually.

Michael

15 years agos3:libsmbconf: remove unused function smbconf_is_writeable_bystring()
Michael Adam [Wed, 21 Jan 2009 15:24:32 +0000 (16:24 +0100)]
s3:libsmbconf: remove unused function smbconf_is_writeable_bystring()

Michael

15 years agolibsmbconf: add utility function smbconf_is_writeable_bystring()
Michael Adam [Fri, 24 Oct 2008 08:36:29 +0000 (10:36 +0200)]
libsmbconf: add utility function smbconf_is_writeable_bystring()

This checks the writeability of a config source specified by the
config source name.

Michael

15 years agolibsmbconf: create text config in smbconftort
Michael Adam [Thu, 23 Oct 2008 22:00:20 +0000 (00:00 +0200)]
libsmbconf: create text config in smbconftort

Michael

15 years agolibsmbconf: return WERR_BADFILE when no path to text backend is provided.
Michael Adam [Thu, 23 Oct 2008 14:05:19 +0000 (16:05 +0200)]
libsmbconf: return WERR_BADFILE when no path to text backend is provided.

Michael

15 years agolibsmbconf: fall back to file backend when no valid backend was found
Michael Adam [Tue, 21 Oct 2008 21:20:57 +0000 (23:20 +0200)]
libsmbconf: fall back to file backend when no valid backend was found

Interpret the source string as a file name when it contains
a ':' sign but the initial part is not a known backend.
This might occur even implicitly when "%T" is used in an
include file name (even though this is not realistic..).

Michael

15 years agolibsmbconf: fix comment typo.
Michael Adam [Tue, 21 Oct 2008 21:20:31 +0000 (23:20 +0200)]
libsmbconf: fix comment typo.

Michael

15 years agolibsmbconf: remove unused define.
Michael Adam [Mon, 20 Oct 2008 14:10:54 +0000 (16:10 +0200)]
libsmbconf: remove unused define.

Michael

15 years agos3:registry: tighten the subkey loop in reg_deletekey_recursive()
Michael Adam [Thu, 26 Feb 2009 01:59:07 +0000 (02:59 +0100)]
s3:registry: tighten the subkey loop in reg_deletekey_recursive()

and loop from the end to the beginning so that we don't need
to rehash the subkeys...

This gets "net conf drop" with 2000 shares down to 14 seconds
on my box.

Michael

15 years agos3:registry: use delete_reg_subkey() in reg_deletekey()
Michael Adam [Thu, 26 Feb 2009 01:57:59 +0000 (02:57 +0100)]
s3:registry: use delete_reg_subkey() in reg_deletekey()

This further speeds up net conf drop.

Michael

15 years agos3:registry: implement delete_subkey in the smbconf backend
Michael Adam [Thu, 26 Feb 2009 01:56:50 +0000 (02:56 +0100)]
s3:registry: implement delete_subkey in the smbconf backend

delegating the call to the db backend

Michael

15 years agos3:registry: implement delete_subkey in the db backend
Michael Adam [Thu, 26 Feb 2009 01:56:00 +0000 (02:56 +0100)]
s3:registry: implement delete_subkey in the db backend

Michael

15 years agos3:registry: add a delete_subkey method to the backend ops.
Michael Adam [Thu, 26 Feb 2009 01:54:50 +0000 (02:54 +0100)]
s3:registry: add a delete_subkey method to the backend ops.

This is to provide a more atomic means of deleting a subkey of a key.

Michael

15 years agos3:registry: refactor deletion of various subkey lists out of regdb_store_keys()
Michael Adam [Thu, 26 Feb 2009 00:43:58 +0000 (01:43 +0100)]
s3:registry: refactor deletion of various subkey lists out of regdb_store_keys()

Micheal

15 years agos3:registry: streamline and cleanup regdb_set_secdesc() somewhat.
Michael Adam [Thu, 26 Feb 2009 00:22:03 +0000 (01:22 +0100)]
s3:registry: streamline and cleanup regdb_set_secdesc() somewhat.

Michael

15 years agos3:registry: refactor deletion of value/secdesc/subkey list tdb records out
Michael Adam [Thu, 26 Feb 2009 00:16:07 +0000 (01:16 +0100)]
s3:registry: refactor deletion of value/secdesc/subkey list tdb records out

of regdb_store_values().

Michael

15 years agos3:registry: streamline reg_deletekey() somewhat.
Michael Adam [Wed, 25 Feb 2009 22:13:07 +0000 (23:13 +0100)]
s3:registry: streamline reg_deletekey() somewhat.

use W_ERROR_... macros and separate assignments from checks

Michael

15 years agos3:registry: use create_reg_subkey() in reg_createkey().
Michael Adam [Wed, 25 Feb 2009 21:06:47 +0000 (22:06 +0100)]
s3:registry: use create_reg_subkey() in reg_createkey().

Instead of calling store_reg_keys()

On my box, importing 2000 shares into an empty smbconf key
now takes some 32 seconds.

Michael

15 years agos3:registry: implement create_subkey for the smbconf backend
Michael Adam [Wed, 25 Feb 2009 21:04:58 +0000 (22:04 +0100)]
s3:registry: implement create_subkey for the smbconf backend

by delegating to the db backend

Michael

15 years agos3:registry: implement create_subkey for the db backend.
Michael Adam [Wed, 25 Feb 2009 21:04:07 +0000 (22:04 +0100)]
s3:registry: implement create_subkey for the db backend.

Michael

15 years agos3:registry: add a create_subkey method to the backend ops.
Michael Adam [Wed, 25 Feb 2009 20:59:54 +0000 (21:59 +0100)]
s3:registry: add a create_subkey method to the backend ops.

This is to provide a more atomic means of adding a subkey of a key.

Michael

15 years agosource/include/nt_status.h: add macro W_ERROR_NOT_OK_GOTO(x, y)
Michael Adam [Wed, 25 Feb 2009 15:55:28 +0000 (16:55 +0100)]
source/include/nt_status.h: add macro W_ERROR_NOT_OK_GOTO(x, y)

a goto destination can be specified as a second parameter.

Michael

15 years agos3: move definition of W_ERROR_NOT_OK_GOTO_DONE down to nt_status.h
Michael Adam [Wed, 25 Feb 2009 15:53:05 +0000 (16:53 +0100)]
s3: move definition of W_ERROR_NOT_OK_GOTO_DONE down to nt_status.h

where all the other W_ERROR_xyz macros are found as well.

Michael

15 years agos3:net rpc registry: use regsubkey_ctr_init() instead of using talloc directly.
Michael Adam [Wed, 25 Feb 2009 13:49:30 +0000 (14:49 +0100)]
s3:net rpc registry: use regsubkey_ctr_init() instead of using talloc directly.

Michael

15 years agos3:registry: hash the list of subkeys in the regsubkey_ctr
Michael Adam [Wed, 25 Feb 2009 08:53:16 +0000 (09:53 +0100)]
s3:registry: hash the list of subkeys in the regsubkey_ctr

This removes many loops over all the arrays
(from regsubkey_ctr_key_exists) and thus
reduces "net conf drop" from 1m55 to 48seconds
and "net conf import" from 1m55 to 58 seconds
for 2000 shares on my box.

Michael

15 years agos3:registry: remove definition of regsubkey_ctr from the surface.
Michael Adam [Tue, 24 Feb 2009 23:33:24 +0000 (00:33 +0100)]
s3:registry: remove definition of regsubkey_ctr from the surface.

All access is now through accessor functions in reg_objects.c
This allows for performance tuning under the hood in the next step.

Michael

15 years agos3:profiles: use regsubkey_ctr_init() instead of using talloc directly.
Michael Adam [Tue, 24 Feb 2009 23:32:21 +0000 (00:32 +0100)]
s3:profiles: use regsubkey_ctr_init() instead of using talloc directly.

Michael

15 years agos3:registry: use regsubkey_ctr_init() in reg_eventlog.c
Michael Adam [Tue, 24 Feb 2009 22:28:48 +0000 (23:28 +0100)]
s3:registry: use regsubkey_ctr_init() in reg_eventlog.c

Michael

15 years agos3:services_db: use regsubkey_ctr_init() instead of using talloc directly
Michael Adam [Tue, 24 Feb 2009 22:23:04 +0000 (23:23 +0100)]
s3:services_db: use regsubkey_ctr_init() instead of using talloc directly

Michael

15 years agos3:registry: use regsubkey_ctr_get_seqnum() in reg_backend_db.c
Michael Adam [Tue, 24 Feb 2009 22:19:35 +0000 (23:19 +0100)]
s3:registry: use regsubkey_ctr_get_seqnum() in reg_backend_db.c

Michael

15 years agos3:registry: use regsubkey_ctr_set_seqnum() in reg_backend_db.c
Michael Adam [Tue, 24 Feb 2009 22:19:08 +0000 (23:19 +0100)]
s3:registry: use regsubkey_ctr_set_seqnum() in reg_backend_db.c

Michael

15 years agos3:registry: use regsubkey_ctr_init() in reg_backend_db.c
Michael Adam [Tue, 24 Feb 2009 22:18:20 +0000 (23:18 +0100)]
s3:registry: use regsubkey_ctr_init() in reg_backend_db.c

instead of using talloc directly.

Michael

15 years agos3:registry: use regsubkey_ctr_init() in reg_api.c
Michael Adam [Tue, 24 Feb 2009 22:17:05 +0000 (23:17 +0100)]
s3:registry: use regsubkey_ctr_init() in reg_api.c

instead of using talloc on struct regsubkey_ctr.

Michael

15 years agos3:registry: add regsubkey_ctr_get_seqnum() to hide implementation
Michael Adam [Tue, 24 Feb 2009 22:15:55 +0000 (23:15 +0100)]
s3:registry: add regsubkey_ctr_get_seqnum() to hide implementation

Michael

15 years agos3:registry: add regsubkey_ctr_set_seqnum to hide implementation from caller.
Michael Adam [Tue, 24 Feb 2009 22:10:35 +0000 (23:10 +0100)]
s3:registry: add regsubkey_ctr_set_seqnum to hide implementation from caller.

Michael

15 years agos3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr
Michael Adam [Tue, 24 Feb 2009 21:43:47 +0000 (22:43 +0100)]
s3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr

Michael

15 years agos3:registry: fix a comment
Michael Adam [Tue, 24 Feb 2009 21:41:40 +0000 (22:41 +0100)]
s3:registry: fix a comment

Michael

15 years agos3:registry: don't directly access key->subkeys->subkeys[] in reg_backend_db.c
Michael Adam [Tue, 24 Feb 2009 21:16:40 +0000 (22:16 +0100)]
s3:registry: don't directly access key->subkeys->subkeys[] in reg_backend_db.c

Use the reg_objects accessor regsubkey_ctr_specific_key() instead.

Michael

15 years agos3:registry: don't directly access key->subkeys->subkeys[] in reg_api.c
Michael Adam [Tue, 24 Feb 2009 20:12:26 +0000 (21:12 +0100)]
s3:registry: don't directly access key->subkeys->subkeys[] in reg_api.c

Use the reg_objects accessor regsubkey_ctr_specific_key() instead.

Michael

15 years agos3:registry: don't directly access key->subkeys->num_subkeys in reg_backend_db.
Michael Adam [Tue, 24 Feb 2009 16:42:50 +0000 (17:42 +0100)]
s3:registry: don't directly access key->subkeys->num_subkeys in reg_backend_db.

Use the reg_objects api instead.

Michael

15 years agos3:registry: don't directly access key->subkeys->num_subkeys in reg_api.c
Michael Adam [Tue, 24 Feb 2009 16:30:23 +0000 (17:30 +0100)]
s3:registry: don't directly access key->subkeys->num_subkeys in reg_api.c

Use the reg_objects api instead.

Michael

15 years agos3:registry: replace typedef "REGSUBKEY_CTR" by "struct regsubkey_ctr"
Michael Adam [Tue, 24 Feb 2009 14:19:18 +0000 (15:19 +0100)]
s3:registry: replace typedef "REGSUBKEY_CTR" by "struct regsubkey_ctr"

This paves the way for hiding the typedef and the implementation from the
surface.

Michael

15 years agoRevert "Fix a O(n^2) algorithm in regdb_fetch_keys()"
Michael Adam [Tue, 24 Feb 2009 16:51:09 +0000 (17:51 +0100)]
Revert "Fix a O(n^2) algorithm in regdb_fetch_keys()"

This reverts commit a13f065bad0f4d21a67e68b743f17f45bf0a4691.

This fix is reverted, because the speedup is going to move
further down into reg_objects.c. The unsorted list of subkey names
is going to be indexed: This O(n^2) search bites us in more places.
This re-establishes the abstraction of reg_objects.c.

Michael

15 years agoerrors: add WERR_NOT_FOUND.
Günther Deschner [Tue, 29 Apr 2008 18:10:17 +0000 (20:10 +0200)]
errors: add WERR_NOT_FOUND.

Guenther
(This used to be commit b9ac03bdfa5763c713674acd966ab5d4371992a5)
(cherry picked from commit d0411c19dc847919b2a7941d91d2605c885e2b62)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agos3:net: wrap net conf import into one big transaction
Michael Adam [Tue, 24 Feb 2009 10:26:26 +0000 (11:26 +0100)]
s3:net: wrap net conf import into one big transaction

This speeds up "net conf import" of a file with 2000 shares
from 11 minutes to 1m50s on my box.

Michael

15 years agos3:libsmbconf: add transactions to the libsmbconf api
Michael Adam [Tue, 24 Feb 2009 10:25:44 +0000 (11:25 +0100)]
s3:libsmbconf: add transactions to the libsmbconf api

This is useful for wrapping higher level aggregate operations
in transactions. The text backend implementations just return
WERR_OK, the registry backend implementatoins use the
regdb_transaction_start|commit|cancel routines just added.

Michael

15 years agos3:registry: wrap deletekey_recursive in one big transaction.
Michael Adam [Tue, 24 Feb 2009 14:40:05 +0000 (15:40 +0100)]
s3:registry: wrap deletekey_recursive in one big transaction.

This speeds up "net conf drop" with 2000 shares on my box from
4m40s to 1m50s, leaving virtually only cpu load.

Michael

15 years agos3:registry: provide transaction_start|commit|cancel fns for the registry tdb
Michael Adam [Tue, 24 Feb 2009 10:23:52 +0000 (11:23 +0100)]
s3:registry: provide transaction_start|commit|cancel fns for the registry tdb

Michael

15 years agoWrap creating the sorted subkey cache in a transaction
Volker Lendecke [Sun, 22 Feb 2009 09:11:29 +0000 (10:11 +0100)]
Wrap creating the sorted subkey cache in a transaction

15 years agoAdd a comment describing the sorted subkeys
Volker Lendecke [Sun, 22 Feb 2009 00:11:51 +0000 (01:11 +0100)]
Add a comment describing the sorted subkeys

15 years agoAdd sorted subkey cache
Volker Lendecke [Fri, 20 Feb 2009 05:01:16 +0000 (06:01 +0100)]
Add sorted subkey cache

On my box this gets net conf list for 1000 records down to .1 seconds

15 years agoAdd db_tdb_parse
Volker Lendecke [Sat, 21 Feb 2009 23:47:54 +0000 (00:47 +0100)]
Add db_tdb_parse

15 years agoAdd dbwrap->parse_record
Volker Lendecke [Sat, 21 Feb 2009 23:18:05 +0000 (00:18 +0100)]
Add dbwrap->parse_record

15 years agoSpeed up "net conf list"
Volker Lendecke [Sat, 21 Feb 2009 17:00:42 +0000 (18:00 +0100)]
Speed up "net conf list"

For 1000 shares this speeds up net conf list from .6 to .25 seconds on my box

15 years agoSpeed up "net conf list"
Volker Lendecke [Sat, 21 Feb 2009 16:01:58 +0000 (17:01 +0100)]
Speed up "net conf list"

With 1000 shares in the registry, this changed the time of "net conf list" from
1.1 seconds to .6 seconds.

15 years agos3:dbwrap: add get_flags() hook to db_context
Stefan Metzmacher [Wed, 17 Dec 2008 07:35:35 +0000 (08:35 +0100)]
s3:dbwrap: add get_flags() hook to db_context

metze

15 years agos3:libsmbconf: use talloc_free instead of TALLOC_FREE in reg backend
Michael Adam [Wed, 21 Jan 2009 16:16:37 +0000 (17:16 +0100)]
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in reg backend

Michael

15 years agolibsmbconf: add method is_writeable() and wrapper smbconf_is_writeable()
Michael Adam [Thu, 23 Oct 2008 09:16:50 +0000 (11:16 +0200)]
libsmbconf: add method is_writeable() and wrapper smbconf_is_writeable()

This allows for per-config-source checking of write support.

Michael

15 years agolibsmbconf: add backend_requires_messaging() method to libsmbconf.
Michael Adam [Mon, 20 Oct 2008 21:52:02 +0000 (23:52 +0200)]
libsmbconf: add backend_requires_messaging() method to libsmbconf.

In a clustered environment, the registry backend needs messaging
to be set up since ctdb requires this.

Michael

15 years agolibsmbconf: add "includes" to the forbidden_valnames[].
Michael Adam [Mon, 23 Jun 2008 09:11:08 +0000 (11:11 +0200)]
libsmbconf: add "includes" to the forbidden_valnames[].

This removes the warning messages 'Unknown parameter encountered: "includes"'.

Michael
(cherry picked from commit b20019ceaaf4a8964792f6ba37f50f91b6847e7f)

15 years agolibsmbconf: fastpaths first in smbconf_reg_valname_valid().
Michael Adam [Mon, 23 Jun 2008 09:09:38 +0000 (11:09 +0200)]
libsmbconf: fastpaths first in smbconf_reg_valname_valid().

Before dropping into lp_parameter_is_valid().

Michael
(cherry picked from commit 59beb7acd777a4c224dce90fbbff7a137d2b89c1)

15 years agoremove an unused variable
Michael Adam [Thu, 19 Feb 2009 21:49:44 +0000 (22:49 +0100)]
remove an unused variable

Michael

15 years agoremove an unused variable
Michael Adam [Thu, 19 Feb 2009 21:36:29 +0000 (22:36 +0100)]
remove an unused variable

Michael

15 years agoFix a O(n^2) algorithm in regdb_fetch_keys()
Volker Lendecke [Thu, 19 Feb 2009 19:03:06 +0000 (20:03 +0100)]
Fix a O(n^2) algorithm in regdb_fetch_keys()
(cherry picked from commit d98c43982c56ef788144a3fd67cdd65a9f95f2be)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoFix a buffer handling bug when adding lots of registry keys
Volker Lendecke [Thu, 19 Feb 2009 13:16:44 +0000 (14:16 +0100)]
Fix a buffer handling bug when adding lots of registry keys

This is *ancient*... From 2002, and nobody noticed until someone added lots of
shares using net conf... :-)
(cherry picked from commit 36ae846d15027df5e3a02ffabb08183dad9f6517)

Signed-off-by: Michael Adam <obnox@samba.org>
15 years agoMerge commit 'origin/v3-2-test' into v3-2-ctdb
Michael Adam [Wed, 11 Feb 2009 21:42:26 +0000 (22:42 +0100)]
Merge commit 'origin/v3-2-test' into v3-2-ctdb

15 years agos3:packaging: fix parsing of include.h in fill-templates
Michael Adam [Wed, 11 Feb 2009 21:27:48 +0000 (22:27 +0100)]
s3:packaging: fix parsing of include.h in fill-templates

The content has changed slightly in master for the merged build,
and we must be more exact when parsing the lines.

Michael