[SCM] SAMBA-CTDB repository - branch v3-3-ctdb updated -
d0f4f8eb49ad10126536ddbb7b2689f3aa053b0b
Michael Adam
obnox at samba.org
Thu Mar 19 17:28:47 GMT 2009
The branch, v3-3-ctdb has been updated
via d0f4f8eb49ad10126536ddbb7b2689f3aa053b0b (commit)
via 317ea0b90b5b15c89484c6308952d8506fcaccec (commit)
via 95fe02c1a8075b2a5c5d9ff941668772bd1ad1a9 (commit)
via 5dc226ae4898eea15246ff5b111d4515bae55b71 (commit)
via 6c6e12534dd66f7ee98c024b36a288cfe150434a (commit)
via cf451fa00618471a667d7c71a2edf923659c6cf5 (commit)
via 3cb7291f76a14a8599973557077af34ef30f4ecf (commit)
via 26ed7a73fc237944add17f101bec007e766027e1 (commit)
via adff4bb2128ae5a4c497b70ac6eeba46426c4f6d (commit)
via f8751cac1dfd3c5c89821faa86054aad5b2b4be3 (commit)
via 0e8d43c1cf50ea82ee9e2dac86a1393c9eb2c85b (commit)
via 82f4c98bddbe7c7b65d56bcb4bcbf6267d3d21c2 (commit)
via ca5cc54234ad2940ae5868001aa282d1b828bb3f (commit)
via 6ac324a34b73e8a3d20e6de3c670bf0f8eb85fde (commit)
via 414abc35882e3216004da0ead9fff713d00c335a (commit)
via 733c92d7bf90a067211d46f55e85388aaf4c1bf9 (commit)
via d9b808cee10730247c31d6178e387b2692eb249f (commit)
via 98898b9e0e3050ba616bc914d1055daab74d7d32 (commit)
via db21ccde5a0ac1740526d04a371d545c0b934cbe (commit)
via 2871c74f8778e08c3bf399e17b759fe62707616c (commit)
via bc416e056c08524528988a4935157c5e06877050 (commit)
via 9875b765ea3d8dee001225ae0bdf4c9911602a8a (commit)
via d306b158231658458c4cdadc44afee79c648fba2 (commit)
via 195118915f5d420f36f49b2333793781a9035824 (commit)
via 602e0dfd37900600b937f3231e2630cee4d58a19 (commit)
via 86717ebd7ba35cc2ae11c5419cb9bd81aa999e61 (commit)
via 34d1a41979b693d05a0217ed1b41ba6bb2a0e663 (commit)
via b885267126f3844fe9dcf3a79d5e3817a19f2564 (commit)
via 567cdc094d6e9df274b8f91e9cb4fc4de8d28358 (commit)
via b230ff459d84d07e48efb8ff9841e7af6f9780d3 (commit)
via 7009d64f06a0e629ceff342040787c7122626de2 (commit)
via c46d4eea2f1a1d058fd76fe0146ec7019870971c (commit)
via 98939ab69789f074325bc0cabfd6740e572fdbd7 (commit)
via 34ff9fb525cdb828cca7644e2bf35e5a9bc17242 (commit)
via c613d80968e1c071cdd3313d7d8f198c7fe21e87 (commit)
via 628038d050df8545acc3d143056af622f75fd692 (commit)
via 0169d26705b007b0115ab359a5e58e38179c01d0 (commit)
via 31545b5bb6ecdfccb06bec73364e2c0de830cb43 (commit)
via f3e826b589d24aca3fdb2e9446808b9f77a0a0b6 (commit)
via 2687121aa5cc46d9ec4d2326d8e25f187f736fd3 (commit)
via 1d1c93c4136f0e1ff279b9075102f0737e6097de (commit)
via de7baafb5129e910b2759a74941cf0d6b3d6f3ea (commit)
via f70716edac143b8d83fdfaa409c3c68373ed801f (commit)
via 7f196f3c98051c1a1c78ec8a38645a45c3258b5e (commit)
via 9d099300f3fff611fa45778d4f734d245ef17c29 (commit)
via 966b592179d1fd07ff1f0fca93286d3a41cfcc72 (commit)
via f13a60cb63495b3be6e3e03cb0332bb8d16f6b11 (commit)
via 8f5fb8c3e8dbc20c0eeb7d7ef4d2cd8c5517f0aa (commit)
via 70276725ff96e89c601fb7779049ade7c166ac94 (commit)
via f9a7b079a249977c91962c57e5b7b53b647ebb0f (commit)
via 8683abf27f48e50f107b7d5611141ab61d00e1a3 (commit)
via ee3295922420b46ab5b2dc3529f7e8e646186e57 (commit)
via a451896bcdd55ba0706ad2bf41f79b0234e98f20 (commit)
via d4a4025c0f8e482668670ad357a4ce7130a86404 (commit)
via 1d1ed6d583f640394b5f652046c4bbde03ecb374 (commit)
via b306f826fe0475515cc2a8161daa20c4c819cda1 (commit)
via 351b8d068fcbcbf3623e7658d698e612ab2f9533 (commit)
via b3aa6f0ccdf50eca5f5841ed9c8f85a4ac38f0a4 (commit)
via ac4c574bc0c1a7a7be71961df39b0d38628fb243 (commit)
via 516e531452ce224de1396bccade986f87fd798a9 (commit)
via 3a5c0e6d8e8c9668d4c76dadaca76622cc466dd0 (commit)
via d44f8a495abbdc8e38ea72a72668ac6eed31ce43 (commit)
via aeffcc58ddaeba5163eb72d4ca25cf46ae78e0c3 (commit)
via 13e25b5d573e08b4fcf3fde3cc05dcb64f385b8f (commit)
via ee377c0ef2044141ff197e1d9989c41e6156d3d4 (commit)
via d66f0476abf3311dceafdfcb33c856f1d0ba2590 (commit)
via d4bf42d1e707271920ba40c87f1b63cf17e941b5 (commit)
via 9713428c282380453c26db2cc1e12e0e6c496244 (commit)
via fc78f9366ede81edb26eb549db022ab06110981d (commit)
via 463d2467bfad75affc6f3709b0110f6fff0b6db4 (commit)
via be34db6693bd3ccd0d43be1bc6b98d8cbe352cff (commit)
via 39c4411fe393fc07bef9a55cb100f3c45bd7da45 (commit)
via 35f405b354aa23ef503f7ba594e973bdc695ae21 (commit)
via 437ad9212a945e30cc267810ab9d1f71a3fada40 (commit)
via bd74475f15e05846f378f392b852825733ba14f1 (commit)
via 5213d02fbb248a961891ce561dd0b95ac30949ee (commit)
via 7fb36ad10927d1650f0324f653c0624d0cd06618 (commit)
via 4ca8a274a5841a531475ce4e5050106223fff28b (commit)
via d2353b9027ae97ba151092dba3c6e53ea4281bb3 (commit)
via eaf91c11002d9a1e513a62f13b6e3fd373f19043 (commit)
via 7509db79c45126ea78511e35811454149cef01fe (commit)
via eedbd826975027cc6a50b39c9a493324e42fdcb3 (commit)
via d2731c5916376371eb5c65f8899bf1d505fa0c20 (commit)
via 0fb2b37451f288c751105ffd362b2acf1e3fb0ac (commit)
via 7d3ad524a675aed6e0c1dc398a6a1435881bf97a (commit)
from d98723ea49022a7b0c8a9fbf648f2d440e4da1a8 (commit)
http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-3-ctdb
- Log -----------------------------------------------------------------
commit d0f4f8eb49ad10126536ddbb7b2689f3aa053b0b
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Mar 18 07:56:51 2009 +0100
s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests
Before we send the secondary requests we need to remove the
old mid=>seqnum mapping and reset cli->mid and make the new
mid=>seqnum mapping "persistent".
The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli->mid
and the secondary requests used the incremented mid,
but as cli->outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.
cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().
The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.
metze
(cherry picked from commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b)
(cherry picked from commit 70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3)
commit 317ea0b90b5b15c89484c6308952d8506fcaccec
Author: Björn Jacke <bj at sernet.de>
Date: Mon Mar 16 01:51:09 2009 +0100
fix build on old Heimdal based systems
Signed-off-by: Günther Deschner <gd at samba.org>
(cherry picked from commit 011ad7245d53a716c4c766f5ef8d317bb3a53d0f)
commit 95fe02c1a8075b2a5c5d9ff941668772bd1ad1a9
Author: Günther Deschner <gd at samba.org>
Date: Mon Feb 23 11:43:32 2009 +0100
s3-spoolss: fix notify_printer_status_byname.
This took me almost a week to find, so here a little longer explanation:
When a windows client registers printer *status* change notifies using
spoolss_RemoteFindFirstChangeNotify, it registers them to a print server handle,
not a printer handle. We were then correctly monitoring the printer status
changes but were sending out the spoolss_RouterReplyPrinterEx via the back-channel
connection with job_id set to 0 (which we only may do for monitored printer
change status notifies on printer handlers, not print server handles). Windows
was then showing a new empty dummy printer icon in the explorer as it cannot
route the notify event to the approriate local handle. It also discarded the
content of the notify event message of course. With this, printer change notify for
pausing, resuming and purging printers nicely works again here.
Jerry, Tim and all other printing gurus, please check.
Guenther
commit 5dc226ae4898eea15246ff5b111d4515bae55b71
Author: Timur <timur at FreeBSD.org>
Date: Tue Mar 17 22:46:53 2009 +0100
build: fix detection of netinet/ip.h on FreeBSD
Signed-off-by: Michael Adam <obnox at samba.org>
(cherry picked from commit a3d04991ef409591a7c8b9fbb01e024bd5aaa041)
commit 6c6e12534dd66f7ee98c024b36a288cfe150434a
Author: Timur <timur at FreeBSD.org>
Date: Tue Mar 17 22:45:28 2009 +0100
build: format the header check for netinet/ip.h more nicely
Signed-off-by: Michael Adam <obnox at samba.org>
(cherry picked from commit e8aa7169a6672bd32af6c5580f6e8ec7e99511bc)
commit cf451fa00618471a667d7c71a2edf923659c6cf5
Author: Steve Langasek <vorlon at debian.org>
Date: Tue Mar 17 22:08:28 2009 +0100
s3: Fix bugs in the detection of the GNU ld version (Bug #6147)
This bug results in a failure to use linker scripts to limit the set of symbols
exported by our shared libraries.
Signed-off-by: Michael Adam <obnox at samba.org>
(cherry picked from commit c6b570ce30b5cc3631c0ed780826d5450f681800)
commit 3cb7291f76a14a8599973557077af34ef30f4ecf
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 02:59:07 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 26ed7a73fc237944add17f101bec007e766027e1
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 02:57:59 2009 +0100
s3:registry: use delete_reg_subkey() in reg_deletekey()
This further speeds up net conf drop.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit adff4bb2128ae5a4c497b70ac6eeba46426c4f6d
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 02:56:50 2009 +0100
s3:registry: implement delete_subkey in the smbconf backend
delegating the call to the db backend
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit f8751cac1dfd3c5c89821faa86054aad5b2b4be3
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 02:56:00 2009 +0100
s3:registry: implement delete_subkey in the db backend
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 0e8d43c1cf50ea82ee9e2dac86a1393c9eb2c85b
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 02:54:50 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 82f4c98bddbe7c7b65d56bcb4bcbf6267d3d21c2
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 01:43:58 2009 +0100
s3:registry: refactor deletion of various subkey lists out of regdb_store_keys()
Micheal
Signed-off-by: Michael Adam <obnox at samba.org>
commit ca5cc54234ad2940ae5868001aa282d1b828bb3f
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 01:22:03 2009 +0100
s3:registry: streamline and cleanup regdb_set_secdesc() somewhat.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 6ac324a34b73e8a3d20e6de3c670bf0f8eb85fde
Author: Michael Adam <obnox at samba.org>
Date: Thu Feb 26 01:16:07 2009 +0100
s3:registry: refactor deletion of value/secdesc/subkey list tdb records out
of regdb_store_values().
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 414abc35882e3216004da0ead9fff713d00c335a
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 23:13:07 2009 +0100
s3:registry: streamline reg_deletekey() somewhat.
use W_ERROR_... macros and separate assignments from checks
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 733c92d7bf90a067211d46f55e85388aaf4c1bf9
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 22:06:47 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit d9b808cee10730247c31d6178e387b2692eb249f
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 22:04:58 2009 +0100
s3:registry: implement create_subkey for the smbconf backend
by delegating to the db backend
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 98898b9e0e3050ba616bc914d1055daab74d7d32
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 22:04:07 2009 +0100
s3:registry: implement create_subkey for the db backend.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit db21ccde5a0ac1740526d04a371d545c0b934cbe
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 21:59:54 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 2871c74f8778e08c3bf399e17b759fe62707616c
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 16:55:28 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit bc416e056c08524528988a4935157c5e06877050
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 16:53:05 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 9875b765ea3d8dee001225ae0bdf4c9911602a8a
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 14:49:30 2009 +0100
s3:net rpc registry: use regsubkey_ctr_init() instead of using talloc directly.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit d306b158231658458c4cdadc44afee79c648fba2
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 09:53:16 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 195118915f5d420f36f49b2333793781a9035824
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 00:33:24 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 602e0dfd37900600b937f3231e2630cee4d58a19
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 25 00:32:21 2009 +0100
s3:profiles: use regsubkey_ctr_init() instead of using talloc directly.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 86717ebd7ba35cc2ae11c5419cb9bd81aa999e61
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:28:48 2009 +0100
s3:registry: use regsubkey_ctr_init() in reg_eventlog.c
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 34d1a41979b693d05a0217ed1b41ba6bb2a0e663
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:23:04 2009 +0100
s3:services_db: use regsubkey_ctr_init() instead of using talloc directly
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit b885267126f3844fe9dcf3a79d5e3817a19f2564
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:19:35 2009 +0100
s3:registry: use regsubkey_ctr_get_seqnum() in reg_backend_db.c
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 567cdc094d6e9df274b8f91e9cb4fc4de8d28358
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:19:08 2009 +0100
s3:registry: use regsubkey_ctr_set_seqnum() in reg_backend_db.c
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit b230ff459d84d07e48efb8ff9841e7af6f9780d3
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:18:20 2009 +0100
s3:registry: use regsubkey_ctr_init() in reg_backend_db.c
instead of using talloc directly.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 7009d64f06a0e629ceff342040787c7122626de2
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:17:05 2009 +0100
s3:registry: use regsubkey_ctr_init() in reg_api.c
instead of using talloc on struct regsubkey_ctr.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit c46d4eea2f1a1d058fd76fe0146ec7019870971c
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:15:55 2009 +0100
s3:registry: add regsubkey_ctr_get_seqnum() to hide implementation
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 98939ab69789f074325bc0cabfd6740e572fdbd7
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 23:10:35 2009 +0100
s3:registry: add regsubkey_ctr_set_seqnum to hide implementation from caller.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 34ff9fb525cdb828cca7644e2bf35e5a9bc17242
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 22:43:47 2009 +0100
s3:registry: add a regsubkey_ctr_init function for allocating a regsubkey_ctr
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit c613d80968e1c071cdd3313d7d8f198c7fe21e87
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 22:41:40 2009 +0100
s3:registry: fix a comment
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 628038d050df8545acc3d143056af622f75fd692
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 22:16:40 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 0169d26705b007b0115ab359a5e58e38179c01d0
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 21:12:26 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 31545b5bb6ecdfccb06bec73364e2c0de830cb43
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 17:42:50 2009 +0100
s3:registry: don't directly access key->subkeys->num_subkeys in reg_backend_db.
Use the reg_objects api instead.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit f3e826b589d24aca3fdb2e9446808b9f77a0a0b6
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 17:30:23 2009 +0100
s3:registry: don't directly access key->subkeys->num_subkeys in reg_api.c
Use the reg_objects api instead.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 2687121aa5cc46d9ec4d2326d8e25f187f736fd3
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 15:19:18 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 1d1c93c4136f0e1ff279b9075102f0737e6097de
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 17:51:09 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit de7baafb5129e910b2759a74941cf0d6b3d6f3ea
Author: Michael Adam <obnox at samba.org>
Date: Wed Mar 4 21:46:32 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit f70716edac143b8d83fdfaa409c3c68373ed801f
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 10:54:13 2009 +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 minutest to 1m50s on my box.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 7f196f3c98051c1a1c78ec8a38645a45c3258b5e
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 11:25:44 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 9d099300f3fff611fa45778d4f734d245ef17c29
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 15:40:05 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit 966b592179d1fd07ff1f0fca93286d3a41cfcc72
Author: Michael Adam <obnox at samba.org>
Date: Tue Feb 24 11:23:52 2009 +0100
s3:registry: provide transaction_start|commit|cancel fns for the registry tdb
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit f13a60cb63495b3be6e3e03cb0332bb8d16f6b11
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 22 10:11:29 2009 +0100
Wrap creating the sorted subkey cache in a transaction
Signed-off-by: Michael Adam <obnox at samba.org>
commit 8f5fb8c3e8dbc20c0eeb7d7ef4d2cd8c5517f0aa
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 22 01:11:51 2009 +0100
Add a comment describing the sorted subkeys
Signed-off-by: Michael Adam <obnox at samba.org>
commit 70276725ff96e89c601fb7779049ade7c166ac94
Author: Volker Lendecke <vl at samba.org>
Date: Fri Feb 20 06:01:16 2009 +0100
Add sorted subkey cache
On my box this gets net conf list for 1000 records down to .1 seconds
Signed-off-by: Michael Adam <obnox at samba.org>
commit f9a7b079a249977c91962c57e5b7b53b647ebb0f
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 22 00:47:54 2009 +0100
Add db_tdb_parse
Signed-off-by: Michael Adam <obnox at samba.org>
commit 8683abf27f48e50f107b7d5611141ab61d00e1a3
Author: Volker Lendecke <vl at samba.org>
Date: Sun Feb 22 00:18:05 2009 +0100
Add dbwrap->parse_record
Signed-off-by: Michael Adam <obnox at samba.org>
commit ee3295922420b46ab5b2dc3529f7e8e646186e57
Author: Michael Adam <obnox at samba.org>
Date: Wed Mar 4 22:05:17 2009 +0100
s3:dbwrap_ctdb_marshall_add: don't leak the ctdb_rec_data to the outside
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit a451896bcdd55ba0706ad2bf41f79b0234e98f20
Author: Michael Adam <obnox at samba.org>
Date: Wed Mar 4 22:02:07 2009 +0100
s3:smbconf: move smbconf_share_exists checks into backend
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit d4a4025c0f8e482668670ad357a4ce7130a86404
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 21 18:00:42 2009 +0100
Speed up "net conf list"
For 1000 shares this speeds up net conf list from .6 to .25 seconds on my box
Signed-off-by: Michael Adam <obnox at samba.org>
commit 1d1ed6d583f640394b5f652046c4bbde03ecb374
Author: Volker Lendecke <vl at samba.org>
Date: Sat Feb 21 17:01:58 2009 +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.
Signed-off-by: Michael Adam <obnox at samba.org>
commit b306f826fe0475515cc2a8161daa20c4c819cda1
Author: Volker Lendecke <vl at samba.org>
Date: Mon Mar 2 14:56:01 2009 +0100
Make use of gpfs_get_real_filename optional
Signed-off-by: Michael Adam <obnox at samba.org>
commit 351b8d068fcbcbf3623e7658d698e612ab2f9533
Author: Michael Adam <obnox at samba.org>
Date: Fri Feb 27 15:28:52 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit b3aa6f0ccdf50eca5f5841ed9c8f85a4ac38f0a4
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jan 30 14:36:48 2009 +0100
s3:smbconftort: don't use reserved words ('test:', 'failure:', 'success:')
Temporary results printfs should not contain reserved subunit words.
metze
Signed-off-by: Michael Adam <obnox at samba.org>
commit ac4c574bc0c1a7a7be71961df39b0d38628fb243
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 18:25:47 2009 +0100
s3:libsmbconf: include smbconf headers with lib/smbconf prefix
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 516e531452ce224de1396bccade986f87fd798a9
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 17:14:56 2009 +0100
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in txt backend
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 3a5c0e6d8e8c9668d4c76dadaca76622cc466dd0
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 17:12:50 2009 +0100
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf_init
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit d44f8a495abbdc8e38ea72a72668ac6eed31ce43
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 17:11:46 2009 +0100
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in testsuite
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit aeffcc58ddaeba5163eb72d4ca25cf46ae78e0c3
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 17:11:02 2009 +0100
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf_util.c
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit 13e25b5d573e08b4fcf3fde3cc05dcb64f385b8f
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 17:10:20 2009 +0100
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in smbconf.c
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
commit ee377c0ef2044141ff197e1d9989c41e6156d3d4
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 16:59:09 2009 +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
Signed-off-by: Michael Adam <obnox at samba.org>
commit d66f0476abf3311dceafdfcb33c856f1d0ba2590
Author: Michael Adam <obnox at samba.org>
Date: Fri Oct 24 00:00:20 2008 +0200
libsmbconf: create text config in smbconftort
Michael
commit d4bf42d1e707271920ba40c87f1b63cf17e941b5
Author: Michael Adam <obnox at samba.org>
Date: Thu Oct 23 16:05:19 2008 +0200
libsmbconf: return WERR_BADFILE when no path to text backend is provided.
Michael
commit 9713428c282380453c26db2cc1e12e0e6c496244
Author: Michael Adam <obnox at samba.org>
Date: Tue Oct 21 23:20:57 2008 +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
commit fc78f9366ede81edb26eb549db022ab06110981d
Author: Michael Adam <obnox at samba.org>
Date: Tue Oct 21 23:20:31 2008 +0200
libsmbconf: fix comment typo.
Michael
commit 463d2467bfad75affc6f3709b0110f6fff0b6db4
Author: Michael Adam <obnox at samba.org>
Date: Mon Oct 20 16:10:54 2008 +0200
libsmbconf: remove unused define.
Michael
commit be34db6693bd3ccd0d43be1bc6b98d8cbe352cff
Author: Michael Adam <obnox at samba.org>
Date: Wed Jan 21 17:16:37 2009 +0100
s3:libsmbconf: use talloc_free instead of TALLOC_FREE in reg backend
Michael
commit 39c4411fe393fc07bef9a55cb100f3c45bd7da45
Author: Michael Adam <obnox at samba.org>
Date: Thu Oct 23 11:16:50 2008 +0200
libsmbconf: add method is_writeable() and wrapper smbconf_is_writeable()
This allows for per-config-source checking of write support.
Michael
commit 35f405b354aa23ef503f7ba594e973bdc695ae21
Author: Michael Adam <obnox at samba.org>
Date: Mon Oct 20 23:52:02 2008 +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
commit 437ad9212a945e30cc267810ab9d1f71a3fada40
Author: Jeremy Allison <jra at samba.org>
Date: Wed Mar 18 20:54:13 2009 -0700
Allow DFS client paths to work when POSIX pathnames have been
selected (we need to path in pathname /that/look/like/this).
Jeremy.
commit bd74475f15e05846f378f392b852825733ba14f1
Author: Jeremy Allison <jra at samba.org>
Date: Wed Mar 18 19:59:04 2009 -0700
Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.
commit 5213d02fbb248a961891ce561dd0b95ac30949ee
Author: Jeremy Allison <jra at samba.org>
Date: Wed Mar 18 14:31:56 2009 -0700
Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly.
This is a really nasty one to fix as in order to successfully update the
passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
values before we do the upgrade.
Jeremy.
commit 7fb36ad10927d1650f0324f653c0624d0cd06618
Author: Alexander Zagrebin <alexz at visp.ru>
Date: Tue Mar 17 15:36:16 2009 -0700
Missing break in conversion function prevents tdb password database update.
commit 4ca8a274a5841a531475ce4e5050106223fff28b
Author: Volker Lendecke <vl at samba.org>
Date: Mon Mar 16 13:17:04 2009 +0100
Fix #6130: Don't crash in winbindd_rpc lookup_groupmem() on unmapped members
Thanks to François Legal <devel at thom.fr.eu.org> for reporting this bug
commit d2353b9027ae97ba151092dba3c6e53ea4281bb3
Author: Volker Lendecke <vl at samba.org>
Date: Tue Mar 17 11:22:41 2009 +0100
Fix a valgrind error
Found in "make test" -- if we can't connect at all, "cli" is uninitialized
commit eaf91c11002d9a1e513a62f13b6e3fd373f19043
Author: Volker Lendecke <vl at samba.org>
Date: Sun Mar 15 11:58:07 2009 +0100
Fix a malloc/talloc mismatch when cli_initialise() fails
commit 7509db79c45126ea78511e35811454149cef01fe
Author: Volker Lendecke <vl at samba.org>
Date: Sat Mar 14 12:39:55 2009 +0100
Fix #3954
commit eedbd826975027cc6a50b39c9a493324e42fdcb3
Author: Tim Prouty <tprouty at samba.org>
Date: Thu Mar 12 17:08:54 2009 -0700
s3 torture: Fix unitialized variable to avoid closing a random fnum
commit d2731c5916376371eb5c65f8899bf1d505fa0c20
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 12 10:57:43 2009 -0700
Add simple POSIX open, mkdir and rmdir test.
Jeremy.
commit 0fb2b37451f288c751105ffd362b2acf1e3fb0ac
Author: Jeremy Allison <jra at samba.org>
Date: Thu Mar 12 10:56:09 2009 -0700
Fix bug #6186 - map readonly does not work
Jeremy.
commit 7d3ad524a675aed6e0c1dc398a6a1435881bf97a
Author: Volker Lendecke <vl at samba.org>
Date: Tue Mar 10 15:39:42 2009 +0100
Revert "Fix a valgrind error / segfault in dns_register_smbd()"
This reverts commit e47d2091136c4d870bb91b8a84eb9f6fd78eb971.
No idea why, but this causes timeouts in the build farm all over the place
-----------------------------------------------------------------------
Summary of changes:
source/Makefile.in | 10 +-
source/client/mount.cifs.c | 3 +-
source/configure.in | 4 +-
source/include/dbwrap.h | 4 +
source/include/includes.h | 3 +
source/include/nt_status.h | 12 +
source/include/proto.h | 30 +-
source/include/reg_db.h | 1 +
source/include/reg_objects.h | 16 +-
source/include/regfio.h | 2 +-
source/lib/dbwrap.c | 26 +
source/lib/dbwrap_ctdb.c | 12 +-
source/lib/dbwrap_rbt.c | 8 +-
source/lib/dbwrap_tdb.c | 12 +
source/lib/replace/libreplace_network.m4 | 15 +-
source/lib/smbconf/smbconf.c | 64 ++--
source/lib/smbconf/smbconf.h | 25 +-
source/lib/smbconf/smbconf_init.c | 20 +-
source/lib/smbconf/smbconf_init.h | 32 ++
source/lib/smbconf/smbconf_private.h | 5 +
source/lib/smbconf/smbconf_reg.c | 235 ++++-----
source/lib/smbconf/smbconf_reg.h | 33 ++
source/lib/smbconf/smbconf_txt.c | 43 ++-
source/lib/smbconf/smbconf_txt.h | 33 ++
source/lib/smbconf/smbconf_util.c | 4 +-
source/lib/smbconf/testsuite.c | 97 +++--
source/libads/krb5_errs.c | 8 +-
source/libnet/libnet_join.c | 6 -
source/libsmb/clidfs.c | 14 +-
source/libsmb/clientgen.c | 2 +-
source/libsmb/clitrans.c | 30 +-
source/modules/gpfs.c | 6 +-
source/modules/vfs_gpfs.c | 5 +
source/passdb/pdb_tdb.c | 216 ++++++++-
source/printing/notify.c | 4 +-
source/registry/reg_api.c | 183 ++++----
source/registry/reg_backend_current_version.c | 2 +-
source/registry/reg_backend_db.c | 651 +++++++++++++++++++------
source/registry/reg_backend_hkpt_params.c | 2 +-
source/registry/reg_backend_netlogon_params.c | 2 +-
source/registry/reg_backend_perflib.c | 2 +-
source/registry/reg_backend_printing.c | 20 +-
source/registry/reg_backend_prod_options.c | 2 +-
source/registry/reg_backend_shares.c | 4 +-
source/registry/reg_backend_smbconf.c | 16 +-
source/registry/reg_backend_tcpip_params.c | 2 +-
source/registry/reg_dispatcher.c | 24 +-
source/registry/reg_eventlog.c | 18 +-
source/registry/reg_objects.c | 175 ++++++-
source/registry/regfio.c | 2 +-
source/services/services_db.c | 12 +-
source/smbd/dnsregister.c | 3 +-
source/smbd/open.c | 28 +-
source/smbd/reply.c | 9 +-
source/torture/torture.c | 114 +++++
source/utils/net_conf.c | 58 ++-
source/utils/net_rpc_registry.c | 11 +-
source/utils/profiles.c | 8 +-
source/winbindd/winbindd_cm.c | 2 +-
source/winbindd/winbindd_rpc.c | 15 +-
60 files changed, 1763 insertions(+), 642 deletions(-)
create mode 100644 source/lib/smbconf/smbconf_init.h
create mode 100644 source/lib/smbconf/smbconf_reg.h
create mode 100644 source/lib/smbconf/smbconf_txt.h
Changeset truncated at 500 lines:
diff --git a/source/Makefile.in b/source/Makefile.in
index e160a99..988ca2c 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -575,7 +575,7 @@ PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
passdb/util_unixsids.o passdb/lookup_sid.o \
passdb/login_cache.o @PDB_STATIC@ \
lib/account_pol.o $(PRIVILEGES_OBJ) \
- lib/util_nscd.o lib/winbind_util.o
+ lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ)
DEVEL_HELP_WEIRD_OBJ = modules/weird.o
CP850_OBJ = modules/CP850.o
@@ -670,7 +670,7 @@ SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \
smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
smbd/vfs.o smbd/statcache.o smbd/seal.o \
- smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
+ smbd/posix_acls.o lib/sysacls.o \
smbd/process.o smbd/service.o smbd/error.o \
printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
lib/sysquotas_xfs.o lib/sysquotas_4A.o \
@@ -881,7 +881,7 @@ NET_OBJ = $(NET_OBJ1) \
$(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
$(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
$(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
- $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
+ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
$(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
$(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
$(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \
@@ -1043,7 +1043,7 @@ WINBINDD_OBJ = \
$(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
$(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
$(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
- $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ) $(LDB_OBJ)
+ $(LIBADS_SERVER_OBJ) $(LDB_OBJ)
WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
$(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
@@ -1109,7 +1109,7 @@ NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \
- $(SERVER_MUTEX_OBJ) $(LIBADS_SERVER_OBJ) \
+ $(LIBADS_SERVER_OBJ) \
$(PASSDB_OBJ) $(GROUPDB_OBJ) \
$(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
$(LDB_OBJ) $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index d05115b..8b62ef7 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -1449,7 +1449,8 @@ mount_retry:
}
}
printf("mount error(%d): %s\n", errno, strerror(errno));
- printf("Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)\n");
+ printf("Refer to the mount.cifs(8) manual page (e.g. man "
+ "mount.cifs)\n");
rc = EX_FAIL;
goto mount_exit;
}
diff --git a/source/configure.in b/source/configure.in
index fee3ac1..6d8a387 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -250,7 +250,7 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
else
AC_MSG_CHECKING(GNU ld release version)
changequote(,)dnl
- ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
+ ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*[^0-9\.]\+\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
changequote([,])dnl
@@ -262,7 +262,7 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
fi
- if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major"=2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
+ if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
ac_cv_gnu_ld_version_script=yes
fi
fi
diff --git a/source/include/dbwrap.h b/source/include/dbwrap.h
index 46833fa..3381d2d 100644
--- a/source/include/dbwrap.h
+++ b/source/include/dbwrap.h
@@ -45,6 +45,10 @@ struct db_context {
int (*transaction_start)(struct db_context *db);
int (*transaction_commit)(struct db_context *db);
int (*transaction_cancel)(struct db_context *db);
+ int (*parse_record)(struct db_context *db, TDB_DATA key,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data);
void *private_data;
bool persistent;
};
diff --git a/source/include/includes.h b/source/include/includes.h
index 7b24b72..baf22e8 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -730,6 +730,9 @@ typedef char fstring[FSTRING_LEN];
#include "async_sock.h"
#include "lib/smbconf/smbconf.h"
+#include "lib/smbconf/smbconf_init.h"
+#include "lib/smbconf/smbconf_reg.h"
+#include "lib/smbconf/smbconf_txt.h"
/* Defines for wisXXX functions. */
#define UNI_UPPER 0x1
diff --git a/source/include/nt_status.h b/source/include/nt_status.h
index 30174e4..c96ed3c 100644
--- a/source/include/nt_status.h
+++ b/source/include/nt_status.h
@@ -83,6 +83,18 @@ typedef uint32 WERROR;
}\
} while (0)
+#define W_ERROR_NOT_OK_GOTO_DONE(x) do { \
+ if (!W_ERROR_IS_OK(x)) {\
+ goto done;\
+ }\
+} while (0)
+
+#define W_ERROR_NOT_OK_GOTO(x, y) do {\
+ if (!W_ERROR_IS_OK(x)) {\
+ goto y;\
+ }\
+} while(0)
+
/* The top byte in an NTSTATUS code is used as a type field.
* Windows only uses value 0xC0 as an indicator for an NT error
* and 0x00 for success.
diff --git a/source/include/proto.h b/source/include/proto.h
index 51405f0..c2b318e 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -6721,12 +6721,15 @@ WERROR init_registry_data(void);
WERROR regdb_init(void);
WERROR regdb_open( void );
int regdb_close( void );
+WERROR regdb_transaction_start(void);
+WERROR regdb_transaction_commit(void);
+WERROR regdb_transaction_cancel(void);
int regdb_get_seqnum(void);
-bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr);
-int regdb_fetch_keys(const char *key, REGSUBKEY_CTR *ctr);
+bool regdb_store_keys(const char *key, struct regsubkey_ctr *ctr);
+int regdb_fetch_keys(const char *key, struct regsubkey_ctr *ctr);
int regdb_fetch_values( const char* key, REGVAL_CTR *values );
bool regdb_store_values( const char *key, REGVAL_CTR *values );
-bool regdb_subkeys_need_update(REGSUBKEY_CTR *subkeys);
+bool regdb_subkeys_need_update(struct regsubkey_ctr *subkeys);
bool regdb_values_need_update(REGVAL_CTR *values);
/* The following definitions come from registry/reg_backend_hkpt_params.c */
@@ -6762,9 +6765,11 @@ void reghook_dump_cache( int debuglevel );
/* The following definitions come from registry/reg_dispatcher.c */
-bool store_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys );
+bool store_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkeys );
bool store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
-int fetch_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkey_ctr );
+WERROR create_reg_subkey(REGISTRY_KEY *key, const char *subkey);
+WERROR delete_reg_subkey(REGISTRY_KEY *key, const char *subkey);
+int fetch_reg_keys( REGISTRY_KEY *key, struct regsubkey_ctr *subkey_ctr );
int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val );
bool regkey_access_check( REGISTRY_KEY *key, uint32 requested, uint32 *granted,
const struct nt_user_token *token );
@@ -6772,7 +6777,7 @@ WERROR regkey_get_secdesc(TALLOC_CTX *mem_ctx, REGISTRY_KEY *key,
struct security_descriptor **psecdesc);
WERROR regkey_set_secdesc(REGISTRY_KEY *key,
struct security_descriptor *psecdesc);
-bool reg_subkeys_need_update(REGISTRY_KEY *key, REGSUBKEY_CTR *subkeys);
+bool reg_subkeys_need_update(REGISTRY_KEY *key, struct regsubkey_ctr *subkeys);
bool reg_values_need_update(REGISTRY_KEY *key, REGVAL_CTR *values);
/* The following definitions come from registry/reg_eventlog.c */
@@ -6798,11 +6803,14 @@ WERROR registry_init_smbconf(const char *keyname);
/* The following definitions come from registry/reg_objects.c */
-WERROR regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, const char *keyname );
-int regsubkey_ctr_delkey( REGSUBKEY_CTR *ctr, const char *keyname );
-bool regsubkey_ctr_key_exists( REGSUBKEY_CTR *ctr, const char *keyname );
-int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr );
-char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index );
+WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr);
+WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum);
+int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr);
+WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname );
+WERROR regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname );
+bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname );
+int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
+char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32 key_index );
int regval_ctr_numvals( REGVAL_CTR *ctr );
REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val );
void free_registry_value( REGISTRY_VALUE *val );
diff --git a/source/include/reg_db.h b/source/include/reg_db.h
index 92448ae..5cafa0a 100644
--- a/source/include/reg_db.h
+++ b/source/include/reg_db.h
@@ -26,5 +26,6 @@
#define REG_VALUE_PREFIX "SAMBA_REGVAL"
#define REG_SECDESC_PREFIX "SAMBA_SECDESC"
+#define REG_SORTED_SUBKEYS_PREFIX "SAMBA_SORTED_SUBKEYS"
#endif /* _REG_DB_H */
diff --git a/source/include/reg_objects.h b/source/include/reg_objects.h
index d9159dd..a03ac1b 100644
--- a/source/include/reg_objects.h
+++ b/source/include/reg_objects.h
@@ -66,11 +66,7 @@ typedef struct {
/* container for registry subkey names */
-typedef struct {
- uint32 num_subkeys;
- char **subkeys;
- int seqnum;
-} REGSUBKEY_CTR;
+struct regsubkey_ctr;
/*
*
@@ -132,9 +128,11 @@ typedef struct {
typedef struct {
/* functions for enumerating subkeys and values */
- int (*fetch_subkeys)( const char *key, REGSUBKEY_CTR *subkeys);
+ int (*fetch_subkeys)( const char *key, struct regsubkey_ctr *subkeys);
int (*fetch_values) ( const char *key, REGVAL_CTR *val );
- bool (*store_subkeys)( const char *key, REGSUBKEY_CTR *subkeys );
+ bool (*store_subkeys)( const char *key, struct regsubkey_ctr *subkeys );
+ WERROR (*create_subkey)(const char *key, const char *subkey);
+ WERROR (*delete_subkey)(const char *key, const char *subkey);
bool (*store_values)( const char *key, REGVAL_CTR *val );
bool (*reg_access_check)( const char *keyname, uint32 requested,
uint32 *granted,
@@ -143,7 +141,7 @@ typedef struct {
struct security_descriptor **psecdesc);
WERROR (*set_secdesc)(const char *key,
struct security_descriptor *sec_desc);
- bool (*subkeys_need_update)(REGSUBKEY_CTR *subkeys);
+ bool (*subkeys_need_update)(struct regsubkey_ctr *subkeys);
bool (*values_need_update)(REGVAL_CTR *values);
} REGISTRY_OPS;
@@ -164,7 +162,7 @@ typedef struct _RegistryKey {
struct registry_key {
REGISTRY_KEY *key;
- REGSUBKEY_CTR *subkeys;
+ struct regsubkey_ctr *subkeys;
REGVAL_CTR *values;
struct nt_user_token *token;
};
diff --git a/source/include/regfio.h b/source/include/regfio.h
index 63516a3..0e957d5 100644
--- a/source/include/regfio.h
+++ b/source/include/regfio.h
@@ -214,7 +214,7 @@ int regfio_close( REGF_FILE *r );
REGF_NK_REC* regfio_rootkey( REGF_FILE *file );
REGF_NK_REC* regfio_fetch_subkey( REGF_FILE *file, REGF_NK_REC *nk );
REGF_NK_REC* regfio_write_key ( REGF_FILE *file, const char *name,
- REGVAL_CTR *values, REGSUBKEY_CTR *subkeys,
+ REGVAL_CTR *values, struct regsubkey_ctr *subkeys,
SEC_DESC *sec_desc, REGF_NK_REC *parent );
diff --git a/source/lib/dbwrap.c b/source/lib/dbwrap.c
index 73c2761..055f554 100644
--- a/source/lib/dbwrap.c
+++ b/source/lib/dbwrap.c
@@ -42,6 +42,29 @@ static int dbwrap_fallback_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
return 0;
}
+/*
+ * Fall back using fetch if no genuine parse operation is provided
+ */
+
+static int dbwrap_fallback_parse_record(struct db_context *db, TDB_DATA key,
+ int (*parser)(TDB_DATA key,
+ TDB_DATA data,
+ void *private_data),
+ void *private_data)
+{
+ TDB_DATA data;
+ int res;
+
+ res = db->fetch(db, talloc_tos(), key, &data);
+ if (res != 0) {
+ return res;
+ }
+
+ res = parser(key, data, private_data);
+ TALLOC_FREE(data.dptr);
+ return res;
+}
+
/**
* open a database
*/
@@ -101,6 +124,9 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
if ((result != NULL) && (result->fetch == NULL)) {
result->fetch = dbwrap_fallback_fetch;
}
+ if ((result != NULL) && (result->parse_record == NULL)) {
+ result->parse_record = dbwrap_fallback_parse_record;
+ }
return result;
}
diff --git a/source/lib/dbwrap_ctdb.c b/source/lib/dbwrap_ctdb.c
index 2818634..d5d4ac7 100644
--- a/source/lib/dbwrap_ctdb.c
+++ b/source/lib/dbwrap_ctdb.c
@@ -121,9 +121,9 @@ static struct ctdb_marshall_buffer *db_ctdb_marshall_add(TALLOC_CTX *mem_ctx,
{
struct ctdb_rec_data *r;
size_t m_size, r_size;
- struct ctdb_marshall_buffer *m2;
+ struct ctdb_marshall_buffer *m2 = NULL;
- r = db_ctdb_marshall_record(mem_ctx, reqid, key, header, data);
+ r = db_ctdb_marshall_record(talloc_tos(), reqid, key, header, data);
if (r == NULL) {
talloc_free(m);
return NULL;
@@ -133,7 +133,7 @@ static struct ctdb_marshall_buffer *db_ctdb_marshall_add(TALLOC_CTX *mem_ctx,
m = (struct ctdb_marshall_buffer *)talloc_zero_size(
mem_ctx, offsetof(struct ctdb_marshall_buffer, data));
if (m == NULL) {
- return NULL;
+ goto done;
}
m->db_id = db_id;
}
@@ -145,15 +145,15 @@ static struct ctdb_marshall_buffer *db_ctdb_marshall_add(TALLOC_CTX *mem_ctx,
mem_ctx, m, m_size + r_size);
if (m2 == NULL) {
talloc_free(m);
- return NULL;
+ goto done;
}
memcpy(m_size + (uint8_t *)m2, r, r_size);
- talloc_free(r);
-
m2->count++;
+done:
+ talloc_free(r);
return m2;
}
diff --git a/source/lib/dbwrap_rbt.c b/source/lib/dbwrap_rbt.c
index b70ce3d..7747be7 100644
--- a/source/lib/dbwrap_rbt.c
+++ b/source/lib/dbwrap_rbt.c
@@ -131,12 +131,12 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag)
*/
}
- node = (struct db_rbt_node *)SMB_MALLOC(
+ node = (struct db_rbt_node *)talloc_size(rec_priv->db_ctx,
offsetof(struct db_rbt_node, data) + rec->key.dsize
+ data.dsize);
if (node == NULL) {
- SAFE_FREE(rec_priv->node);
+ TALLOC_FREE(rec_priv->node);
return NT_STATUS_NO_MEMORY;
}
@@ -148,7 +148,7 @@ static NTSTATUS db_rbt_store(struct db_record *rec, TDB_DATA data, int flag)
db_rbt_parse_node(node, &this_key, &this_val);
memcpy(this_key.dptr, rec->key.dptr, node->keysize);
- SAFE_FREE(rec_priv->node);
+ TALLOC_FREE(rec_priv->node);
memcpy(this_val.dptr, data.dptr, node->valuesize);
@@ -194,7 +194,7 @@ static NTSTATUS db_rbt_delete(struct db_record *rec)
}
rb_erase(&rec_priv->node->rb_node, &rec_priv->db_ctx->tree);
- SAFE_FREE(rec_priv->node);
+ TALLOC_FREE(rec_priv->node);
return NT_STATUS_OK;
}
diff --git a/source/lib/dbwrap_tdb.c b/source/lib/dbwrap_tdb.c
index 7bdadd3..5b6c819 100644
--- a/source/lib/dbwrap_tdb.c
+++ b/source/lib/dbwrap_tdb.c
@@ -176,6 +176,17 @@ static int db_tdb_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
return 0;
}
+static int db_tdb_parse(struct db_context *db, TDB_DATA key,
+ int (*parser)(TDB_DATA key, TDB_DATA data,
+ void *private_data),
+ void *private_data)
+{
+ struct db_tdb_ctx *ctx = talloc_get_type_abort(
+ db->private_data, struct db_tdb_ctx);
+
+ return tdb_parse_record(ctx->wtdb->tdb, key, parser, private_data);
+}
+
static NTSTATUS db_tdb_store(struct db_record *rec, TDB_DATA data, int flag)
{
struct db_tdb_ctx *ctx = talloc_get_type_abort(rec->private_data,
@@ -343,6 +354,7 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
result->fetch = db_tdb_fetch;
result->traverse = db_tdb_traverse;
result->traverse_read = db_tdb_traverse_read;
+ result->parse_record = db_tdb_parse;
result->get_seqnum = db_tdb_get_seqnum;
result->persistent = ((tdb_flags & TDB_CLEAR_IF_FIRST) == 0);
result->transaction_start = db_tdb_transaction_start;
diff --git a/source/lib/replace/libreplace_network.m4 b/source/lib/replace/libreplace_network.m4
index 9b921a0..a520c73 100644
--- a/source/lib/replace/libreplace_network.m4
+++ b/source/lib/replace/libreplace_network.m4
@@ -8,12 +8,15 @@ LIBREPLACE_NETWORK_LIBS=""
AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h)
AC_CHECK_HEADERS(netinet/in_systm.h)
-AC_CHECK_HEADERS([netinet/ip.h], [], [], [#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif])
+AC_CHECK_HEADERS([netinet/ip.h], [], [],[
+ #include <sys/types.h>
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_SYSTM_H
+ #include <netinet/in_systm.h>
+ #endif
+])
AC_CHECK_HEADERS(netinet/tcp.h netinet/in_ip.h)
AC_CHECK_HEADERS(sys/sockio.h sys/un.h)
diff --git a/source/lib/smbconf/smbconf.c b/source/lib/smbconf/smbconf.c
index 1a9b4e0..01557a7 100644
--- a/source/lib/smbconf/smbconf.c
+++ b/source/lib/smbconf/smbconf.c
@@ -43,11 +43,28 @@ static WERROR smbconf_global_check(struct smbconf_ctx *ctx)
**********************************************************************/
/**
+ * Tell whether the backend requires messaging to be set up
+ * for the backend to work correctly.
+ */
+bool smbconf_backend_requires_messaging(struct smbconf_ctx *ctx)
+{
+ return ctx->ops->requires_messaging(ctx);
+}
+
+/**
+ * Tell whether the source is writeable.
+ */
+bool smbconf_is_writeable(struct smbconf_ctx *ctx)
+{
+ return ctx->ops->is_writeable(ctx);
+}
+
+/**
* Close the configuration.
*/
void smbconf_shutdown(struct smbconf_ctx *ctx)
{
- TALLOC_FREE(ctx);
+ talloc_free(ctx);
}
/**
@@ -140,7 +157,7 @@ WERROR smbconf_get_config(struct smbconf_ctx *ctx,
}
done:
- TALLOC_FREE(tmp_ctx);
+ talloc_free(tmp_ctx);
return werr;
}
--
SAMBA-CTDB repository
More information about the samba-cvs
mailing list