Karolin Seeger [Wed, 1 Apr 2009 11:47:56 +0000 (13:47 +0200)]
WHATSNEW: Update changes.
Karolin
(cherry picked from commit
efc59974e7b893627ad3c4a07e35f1429fc1044d)
Michael Adam [Wed, 1 Apr 2009 10:23:07 +0000 (12:23 +0200)]
s3: fix the fix for bug #6195 - dont let smbd child processes panic
This patch makes sure the original and temporary TDBs are closed
_before_ the rename. Originally, the open TDB was renamed, and so
the name passdb.tdb.tmp stayed around in the db context. Hence
upon client connect, the smbd children died because reinit_after_fork()
calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which
existed no longer...
Michael
(cherry picked from commit
735c27c7176a9fb5b20ad02dc7cdd1ef23ff3e81)
Karolin Seeger [Wed, 1 Apr 2009 06:50:03 +0000 (08:50 +0200)]
VERSION: Raise version number up to 3.3.3.
Karolin
(cherry picked from commit
9d647667a5e4814a6e80b9d3b6507f9ccccfe9ee)
Karolin Seeger [Wed, 1 Apr 2009 06:47:34 +0000 (08:47 +0200)]
WHATSNEW: Update changes since 3.3.2.
Karolin
(cherry picked from commit
9356163d00a18c2d34e6df259e189b95fd5ad162)
Jeremy Allison [Wed, 1 Apr 2009 01:29:30 +0000 (18:29 -0700)]
Tidy up some convert_string_internal error cases, found by Andrew Bartlett.
Jeremy.
(cherry picked from commit
e0f3ed481137d83087c4c6da6526eae3b9265838)
Michael Adam [Tue, 31 Mar 2009 14:44:19 +0000 (16:44 +0200)]
s3:build: fix build of pam_winbind.so with static linking
Static talloc libs were missing since conversion to talloc.
Michael
(cherry picked from commit
51b10a39a764e91303ee40fde1b0c4b3a6f4574c)
Jeremy Allison [Mon, 30 Mar 2009 22:09:10 +0000 (15:09 -0700)]
Ensure files starting with multiple dots are hidden
if "hide dot files" is set. Thanks to Barry Kelly <bkelly.ie@gmail.com>
for pointing this one out.
Jeremy.
(cherry picked from commit
beeb86618e3af1478708d996b118856a4f9a0c0b)
Jeremy Allison [Sat, 28 Mar 2009 04:28:01 +0000 (21:28 -0700)]
Fix the problem of 3.0.x passdb databases being version
3 but using a different hash calculation than 3.2.x passwd
databases (also version 3). Introduces a minor version
number.
Jeremy.
(cherry picked from commit
d30f1fc69dd1e56d46f90f7e60f13c1d383f6376)
Derrell Lipman [Fri, 27 Mar 2009 20:56:33 +0000 (16:56 -0400)]
[Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errno
Fixed.
It turns out there were a number of places where cli_resolve_path() was called
and the error path upon that function failing did not set errno. There were a
couple of places the failure handling code did set errno to ENOENT, so I made
them all consistent, although I think better errno choices for this condition
exist, e.g. EHOSTUNREACH.
Derrell
(cherry picked from commit
d72271908e0d67eb31fbc1d818d6f2c720bd7fbb)
Jeremy Allison [Fri, 27 Mar 2009 19:11:24 +0000 (12:11 -0700)]
Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly. For the clustering case.
Clustered setups should have only ever used
the unsigned version of TDB_DATA in the
first place so they can't be in this mess :-).
Just do the normal upgrade in the clustered case.
Jeremy.
(cherry picked from commit
58d3ec1cb81d6086d65cd12acd16cd591cf0c71f)
Karolin Seeger [Fri, 27 Mar 2009 14:01:04 +0000 (15:01 +0100)]
WHATSNEW: Update changes since 3.3.2.
Karolin
(cherry picked from commit
81d7d62c339c836ddd7053b5b3624ba36a2c0174)
Jeremy Allison [Thu, 26 Mar 2009 22:33:39 +0000 (15:33 -0700)]
Try and fix the build farm RAW-STREAMS errors. Ordering of
modules shouldn't matter, so as vfs_streams_depot doesn't
implement get/setxattrs then call into the full VFS stack
at the top.
Jeremy
(cherry picked from commit
05c038fb86555e2ee26d051ca002eeac1c1669ce)
Jeremy Allison [Thu, 26 Mar 2009 19:13:28 +0000 (12:13 -0700)]
Fix bug #6224 - nmbd waits 5 minutes at startup before checking if it needs to run elections
Fix logic bug that causes nmbd to wait 5 minutes before
looking for a master browser. This one is *old* :-). Thanks
for Simo for bugging me on this.
Jeremy.
(cherry picked from commit
15718a5d3edc3a65256533dd898ef582ded7f833)
Tim Prouty [Thu, 26 Mar 2009 18:28:37 +0000 (11:28 -0700)]
s3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
(cherry picked from commit
e452955c077a761cbadd27bede8d6844edbb2e5e)
Volker Lendecke [Thu, 26 Mar 2009 11:24:50 +0000 (12:24 +0100)]
Fix a scary "fill_share_mode_lock failed" message
To me "fill_share_mode_lock failed" is a "can't happen" alert. There is
however a perfectly valid case in get_file_infos() when the file is not open.
Change the corresponding debug message to level 10 and explain more.
(cherry picked from commit
74efc72bca5707ff35df9282c843d62c4cf331c3)
Günther Deschner [Thu, 26 Mar 2009 09:35:55 +0000 (10:35 +0100)]
s3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong information.
Guenther
(cherry picked from commit
fe102f53d1ac6f888bd559eaf52b6a166d5f78d3)
Volker Lendecke [Thu, 26 Mar 2009 09:13:50 +0000 (10:13 +0100)]
Avahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash
(cherry picked from commit
57301725e1c92676d3dbb62c81a41507ed1adb7b)
Günther Deschner [Wed, 25 Mar 2009 14:58:20 +0000 (15:58 +0100)]
s3-libnet: Fix Bug #6193: avoid messing with sync_context in libnet_samsync_delta().
We absolutely need to avoid messing with the sync_context as that breaks the
stream of replication data coming from the DC (only replicates ~350 instead of
~4000 groups).
Guenther
(cherry picked from commit
e3f7057b0942793543c215ab45176c4280bd7d51)
(cherry picked from commit
efa7f6bff9bec89214dab368ff5efc61fa1cc212)
Volker Lendecke [Tue, 24 Mar 2009 22:25:56 +0000 (15:25 -0700)]
Fix two memleaks in the encryption code
ntlmssp_seal_packet creates its own signature data blob, which we then
have to free.
Jeremy, please check and merge appropriately (Yes, I'm asking you to do the
janitor work, I want you to *look* at this :-))
Volker
(cherry picked from commit
4d0cfb46e449e85646e05df2c4efe7dffa670edd)
Stefan Metzmacher [Tue, 24 Mar 2009 19:36:10 +0000 (12:36 -0700)]
s3:smbd: if we allow trans2 on the IPC$ share, then we have to allow transs2 too.
Otherwise we'll confuse the client signing engine, when we reply an error to each transs2.
metze
(cherry picked from commit
97cdf68a42bd9d5ec312151bcca9830228caeee1)
Volker Lendecke [Tue, 24 Mar 2009 10:07:16 +0000 (11:07 +0100)]
Fix bug 6097
A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with
NT_STATUS_INVALID_SID, even if other SIDs in the list are valid.
Thanks to Pavel <wylda@volny.cz> for the bug report!
(cherry picked from commit
c38c80fcd3f63e60450fd95c27d842082e8e00fd)
Björn Jacke [Mon, 23 Mar 2009 11:26:03 +0000 (12:26 +0100)]
s3:dsgetdcname: use parentheses in if condition to make negation clear
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit
87b428e424e2e3cca975ecd0efed327e72950a1d)
(cherry picked from commit
deba6c883965f99bf70744a5a4fb8124a73910fd)
Volker Lendecke [Sun, 22 Mar 2009 14:59:33 +0000 (15:59 +0100)]
Use avahi to register _smb._tcp in smbd
(cherry picked from commit
b0ad52693d4ee548a2d3870e28f6499f827bed31)
Volker Lendecke [Fri, 20 Mar 2009 13:55:05 +0000 (14:55 +0100)]
Add event avahi binding
(cherry picked from commit
cb18c1686b3cd20f0535458f8cee24a772560350)
Volker Lendecke [Fri, 20 Mar 2009 13:53:10 +0000 (14:53 +0100)]
Add avahi detection to configure
(cherry picked from commit
dcf1df139f02d54f040e0e649f6b9bf388fdfb00)
Volker Lendecke [Fri, 20 Mar 2009 13:39:19 +0000 (14:39 +0100)]
Disable dns_sd by default
(cherry picked from commit
28abdd1ee9559bf53cbbc3372d947cbb77ea1cd5)
Björn Jacke [Mon, 23 Mar 2009 12:02:57 +0000 (13:02 +0100)]
=?utf-8?q?=D1=953/winbind=5Fpam:=20fix=20gcc=204.4=20compile=20warning
=20(cherry=20picked=20from=20commit=
20f4aec7b5907065a2f48d1b19065c6673aff6a190)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
(cherry picked from commit
86abc613f119e7685f0664033317b5d191cc88e8)
Volker Lendecke [Sun, 22 Mar 2009 12:14:15 +0000 (13:14 +0100)]
Only build the dirsort module if we have the dirfd function
Fix the build on HP/UX
(cherry picked from commit
a2cb872e58e6db5fe9c5fbd575e0a4776e02b9e5)
Volker Lendecke [Sun, 22 Mar 2009 10:39:32 +0000 (11:39 +0100)]
Document the dirsort module
(cherry picked from commit
a4badda87bc10a820f3591a1232d840fa4262bf3)
Volker Lendecke [Sun, 22 Mar 2009 10:39:10 +0000 (11:39 +0100)]
Use StrCaseCmp in the dirsort module
(cherry picked from commit
9ada8991505b43a81687076b35828f21598b5ca0)
Andy Kelk [Sun, 22 Mar 2009 10:06:52 +0000 (11:06 +0100)]
Add dirsort module
(cherry picked from commit
3bf35e844cc60d911b3b2eff19db0df6348a57b5)
Günther Deschner [Fri, 20 Mar 2009 10:36:00 +0000 (11:36 +0100)]
s3-netapi: Fix Coverity #774 (REVERSE_INULL).
Guenther
(cherry picked from commit
9bf3e129605d51483fd5ce47c90642f7e82ac102)
Günther Deschner [Fri, 20 Mar 2009 10:34:43 +0000 (11:34 +0100)]
s3-netapi: Fix Coverity #775 (REVERSE_INULL).
Guenther
(cherry picked from commit
3b0f612c52e992cd130f5176432722bada3c64e4)
Günther Deschner [Fri, 20 Mar 2009 10:17:50 +0000 (11:17 +0100)]
s3-netapi: Fix Coverity #776 (REVERSE_INULL).
Guenther
(cherry picked from commit
d2e348b191ada5492538b7bdae1bb7cd3f639aba)
(cherry picked from commit
76c858c6fcb8111e3fd87a2a8aa2606ab06bb90a)
Günther Deschner [Fri, 20 Mar 2009 10:11:04 +0000 (11:11 +0100)]
s3-krb5: Fix Coverity #762 (REVERSE_INULL).
Guenther
(cherry picked from commit
97190ae184dff6450b1390c854f7426e2ee3f980)
(cherry picked from commit
0f7757e94bfa35d22a7349d78578685c0dba22d7)
Günther Deschner [Thu, 19 Mar 2009 15:42:54 +0000 (16:42 +0100)]
s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).
Guenther
(cherry picked from commit
1524abd8bf12d82e1fb0063585fc9a465fc7bf9c)
(cherry picked from commit
3517388b5d5439ffe3f9629aaf826fa1dfbb4ba7)
Michael Adam [Thu, 19 Mar 2009 17:29:09 +0000 (18:29 +0100)]
version: fix handling of SAMBA_VERSION_VENDOR_PATCH.
We need a string version of this, or else version.c does not compile.
Michael
(cherry picked from commit
f846e0fcdf62333b44a16e5a392930189b512f9b)
Stefan Metzmacher [Wed, 18 Mar 2009 06:56:51 +0000 (07:56 +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)
(cherry picked from commit
d01cca5e3ddb925696d49a1ea728013ec1032372)
Björn Jacke [Mon, 16 Mar 2009 00:51:09 +0000 (01:51 +0100)]
fix build on old Heimdal based systems
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit
011ad7245d53a716c4c766f5ef8d317bb3a53d0f)
(cherry picked from commit
fecb980bc90ba4be1fa95b4a6e2aa6967d036656)
Günther Deschner [Mon, 23 Feb 2009 10:43:32 +0000 (11:43 +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
(cherry picked from commit
69a8eeb16af7cccdaa524dd85c7e2b648c0547a3)
Timur [Tue, 17 Mar 2009 21:46:53 +0000 (22:46 +0100)]
build: fix detection of netinet/ip.h on FreeBSD
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
a3d04991ef409591a7c8b9fbb01e024bd5aaa041)
(cherry picked from commit
ddcf94787f59cf682c51010b87d3624bbdd6b4a3)
Timur [Tue, 17 Mar 2009 21:45:28 +0000 (22:45 +0100)]
build: format the header check for netinet/ip.h more nicely
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
e8aa7169a6672bd32af6c5580f6e8ec7e99511bc)
(cherry picked from commit
9baa0c3b119f41c7d65bc13f4f34c6e242ea1abc)
Steve Langasek [Tue, 17 Mar 2009 21:08:28 +0000 (22:08 +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@samba.org>
(cherry picked from commit
c6b570ce30b5cc3631c0ed780826d5450f681800)
(cherry picked from commit
e1a79d063de536969732b63ed9be24c4fd2aa505)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
db367c32756fcdf669a2ea7dad51d4daf40770e0)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
0045eb93bfb8285bcf8165b9cb2c39ade59a0782)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
e574048770d8e40490f949b6e0673f1f44b6e644)
Michael Adam [Thu, 26 Feb 2009 01:56:00 +0000 (02:56 +0100)]
s3:registry: implement delete_subkey in the db backend
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
5ad50bd6c0f5e030105b225f15a4e8e1d5c18999)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
eced96cf26b08b1fd606381eeced5abec9fac3c4)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
4c0a996876115e2877c3903b7b9953b527175a16)
Michael Adam [Thu, 26 Feb 2009 00:22:03 +0000 (01:22 +0100)]
s3:registry: streamline and cleanup regdb_set_secdesc() somewhat.
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
5446e47968f1c0ff2f6390e00b5483b6163be78f)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
22c71fc6f054ffbe73346a8c20cc48b141312d95)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
ce1051dd5498fb864e959c66b15a16d6d0cadd31)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
da272a52894314bd12f43fbb52a24c8b9cc024e8)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
0b99c03824886432a86dcdc161a219a5dbad7c58)
Michael Adam [Wed, 25 Feb 2009 21:04:07 +0000 (22:04 +0100)]
s3:registry: implement create_subkey for the db backend.
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
049d5745cbf2bba954e9a06cc0f255506805ae0f)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
453c7e1503f814034765ebc6aac06dd11f89b381)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
d316cab3cb5037909121494d57cc2173e4c66a23)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
76a460aecab6d5a03af9b8b5d97cba15d364cfde)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
7679a4b9179dd32599d3799fa02f42e1acfce3ef)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
1eaff4f96768912b31795c1c8b6a4741e2e746e1)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
ed8e84dbda344b19f1c6037a630e60885f722f13)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
5fc572e9e9ddc1c87ddd4622428e41d3503ccc4b)
Michael Adam [Tue, 24 Feb 2009 22:28:48 +0000 (23:28 +0100)]
s3:registry: use regsubkey_ctr_init() in reg_eventlog.c
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
a6c9cd899a52cf093f557ddac9a7fb42cbae35d0)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
3e8393af5fc40116305af6f155de9bad203e0a8d)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
bcbe20b30017f22f1f01d9620f149fdeefe3a9e0)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
3a0f670d425a37e435fecf575730834017e30940)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
3f2255ad1c67bcea2d812eedbb4def8c35ff110a)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
f1c0b65da5cf90740c2013e20991a87f5a16fc2c)
Michael Adam [Tue, 24 Feb 2009 22:15:55 +0000 (23:15 +0100)]
s3:registry: add regsubkey_ctr_get_seqnum() to hide implementation
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
811b3fefab29c109c6c134339a438c7e4ffb13fe)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
d119cd129c6acd2f0eb16fcf3281744d717cd291)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
b26f384649b4285748bf0fb78d826651882208e7)
Michael Adam [Tue, 24 Feb 2009 21:41:40 +0000 (22:41 +0100)]
s3:registry: fix a comment
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
391027d79eeb897c539d35877f5b27ea90efb40b)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
078d121b4d4d74237ea11c39754fb2ba0dc496a9)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
c861f55a35e315f3561bc9b5a4d4d2e1b782fa31)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
128f91d4c26dd4635a88c4bc8939061300cf81b7)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
6a9c73e5c58837c1a6e0abc03e90e616520cdd91)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
9ca48a86fb6cf5fa30b622162877859b0c335f7e)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
abc457fe4c167bfcd7c8a4a654e13884b8e1ef90)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
026b72903c852e46012ac60d9d42b14c6860a159)
Michael Adam [Tue, 24 Feb 2009 09:54:13 +0000 (10:54 +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@samba.org>
(cherry picked from commit
e95bcaefc98f4ddc461d60d2f6f812ef24c2f234)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
8dd46903944c48e171837729cbe937f54d9554b7)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
8353d9b764ec90948fb8a5cb39689ea39acc7f9f)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
0509eee47ac2da1042bd1bb0d98695abc8ee44a3)
Volker Lendecke [Sun, 22 Feb 2009 09:11:29 +0000 (10:11 +0100)]
Wrap creating the sorted subkey cache in a transaction
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
4ddeed513ce5e2bb839570212d046145da70768b)
Volker Lendecke [Sun, 22 Feb 2009 00:11:51 +0000 (01:11 +0100)]
Add a comment describing the sorted subkeys
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
caa654d31fc65e3a08327e430ba5332776a21f11)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
32524d865158080421867b36f9b64bdc98ff07c9)
Volker Lendecke [Sat, 21 Feb 2009 23:47:54 +0000 (00:47 +0100)]
Add db_tdb_parse
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
e5936d910cfc3590a3b015e627a5fa308861eaf4)
Volker Lendecke [Sat, 21 Feb 2009 23:18:05 +0000 (00:18 +0100)]
Add dbwrap->parse_record
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
68d4e25aad23b670e4ff735377de59ba396940cd)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
a470af9a18b328548f241dca4f744d25c7cdc13e)
Michael Adam [Wed, 4 Mar 2009 21:02:07 +0000 (22:02 +0100)]
s3:smbconf: move smbconf_share_exists checks into backend
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
11ed4d41906084a604797e761ffd27caf5c67ac3)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
f8fa246bbae0db96e16e8f3e327577920c6ecec5)
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.
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
c4a1fc734b70efa932df4d4f8d9c66ea4f83ad0b)
Volker Lendecke [Mon, 2 Mar 2009 13:56:01 +0000 (14:56 +0100)]
Make use of gpfs_get_real_filename optional
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
36f2aa636d1eb5394469c09f76fe2fb676dfcac7)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
6facbbb4020369c18b4312115fab9b8d6eceaf80)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
d5750eca159e0bf1095b102545838d771f26a7f7)
Michael Adam [Wed, 21 Jan 2009 17:25:47 +0000 (18:25 +0100)]
s3:libsmbconf: include smbconf headers with lib/smbconf prefix
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
5887fa35156df68416b4da4a45ef0576d8b203c1)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
8589fa2cfe8fb549b013d2f15a598e43e28b64d7)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
dc0583613dfd8ce8f9209a8fb56e6c41a14efd0a)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
9dfc6c9de92e58173e73d67a6dd56b4b4336909b)
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
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
a077a710b9d402ed7ac86ab98dc2a98776b8f9bc)