samba.git
15 years agoFix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
Jeremy Allison [Wed, 15 Apr 2009 21:31:43 +0000 (14:31 -0700)]
Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
What a difference a name makes... :-). Just because something is missnamed
SA_RIGHT_SAM_OPEN_DOMAIN, when it should actually be SA_RIGHT_SAM_LOOKUP_DOMAIN,
don't automatically use it for a security check in _samr_OpenDomain().
Jeremy.

15 years agonetdomjoin-gui: make sure to grey out change fields when not running as root.
Günther Deschner [Tue, 14 Apr 2009 20:39:36 +0000 (22:39 +0200)]
netdomjoin-gui: make sure to grey out change fields when not running as root.

Guenther
(cherry picked from commit ca3de0103b545c86c8507dfc7d042f1838d5dfb2)
(cherry picked from commit cb96e70a1d9112d9e4fff1fda4cf64abc7985347)

15 years agos3-loadparm: Fix resume command typo for "printing = vlp".
Guenther Deschner [Mon, 13 Apr 2009 16:44:54 +0000 (09:44 -0700)]
s3-loadparm: Fix resume command typo for "printing = vlp".

15 years agoFix a memleak in an unlikely error path in change_notify_create()
Volker Lendecke [Sat, 11 Apr 2009 20:54:06 +0000 (13:54 -0700)]
Fix a memleak in an unlikely error path in change_notify_create()

15 years agoFix bug #6254 - PUT/GET produces an error in IPv6 to a smb-server(3.3)
Jeremy Allison [Fri, 10 Apr 2009 05:46:31 +0000 (22:46 -0700)]
Fix bug #6254 - PUT/GET produces an error in IPv6 to a smb-server(3.3)
has parameter "msdfs root = yes"
This was broken by the refactoring around create_file().
MSDFS pathname processing must be done FIRST.
MSDFS pathnames containing IPv6 addresses can
be confused with NTFS stream names (they contain
":" characters.
Jeremy.

15 years agoMerge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test
Jeremy Allison [Fri, 10 Apr 2009 04:21:11 +0000 (21:21 -0700)]
Merge branch 'v3-3-test' of ssh://jra@git.samba.org/data/git/samba into v3-3-test

15 years agoerror-codes: add some service related error codes.
Günther Deschner [Wed, 8 Apr 2009 20:48:41 +0000 (22:48 +0200)]
error-codes: add some service related error codes.

Guenther

15 years agos3-net: Fix Bug #5329: add "net rpc service delete/create".
Günther Deschner [Wed, 8 Apr 2009 19:45:04 +0000 (21:45 +0200)]
s3-net: Fix Bug #5329: add "net rpc service delete/create".

Patch from Danny Tylman <danny.tylman@insightix.com>.

Guenther
(cherry picked from commit d0c307af56006d6fb898e395613d7e9c29b84116)

15 years agos3/packaging: Add idmap_hash and idmap_adex to the list of built modules.
Karolin Seeger [Wed, 8 Apr 2009 15:49:21 +0000 (17:49 +0200)]
s3/packaging: Add idmap_hash and idmap_adex to the list of built modules.

Karolin
(cherry picked from commit bed4f8413435c39e37ea04940a18ee78481db48f)
(cherry picked from commit c005bd724062273586ed9e3373826ed42ec396ce)

15 years agos3/popt.h: Fix typo.
Karolin Seeger [Tue, 7 Apr 2009 18:01:27 +0000 (20:01 +0200)]
s3/popt.h: Fix typo.

This used to be commit 8da2fa36 in master.

Karolin

15 years agos3/loadparm: Fiy typos.
Karolin Seeger [Tue, 7 Apr 2009 18:00:47 +0000 (20:00 +0200)]
s3/loadparm: Fiy typos.

This used to be commit 44588095 in master.

Karolin

15 years agos3/gpo_ldap: Fix typo.
Karolin Seeger [Tue, 7 Apr 2009 17:58:47 +0000 (19:58 +0200)]
s3/gpo_ldap: Fix typo.

This used to be commit a103222e in master.

Karolin

15 years agos3/smbconf_reg: Fix typo.
Karolin Seeger [Tue, 7 Apr 2009 17:58:14 +0000 (19:58 +0200)]
s3/smbconf_reg: Fix typo.

This used to be commit 6343cab3 in master.

Karolin

15 years agos3/docs: Fix typo.
Karolin Seeger [Tue, 7 Apr 2009 17:55:45 +0000 (19:55 +0200)]
s3/docs: Fix typo.

Karolin
(cherry picked from commit c002c1d776bc62bafe62e29a91e05100c5025890)

15 years agoMake some functions static to vfs_gpfs.c
Volker Lendecke [Sun, 5 Apr 2009 05:32:03 +0000 (07:32 +0200)]
Make some functions static to vfs_gpfs.c

15 years agoFix two c++ warnings in vfs_gpfs.c
Volker Lendecke [Sun, 5 Apr 2009 05:31:30 +0000 (07:31 +0200)]
Fix two c++ warnings in vfs_gpfs.c

15 years agos3-examples: Fix Bug #6205. Correct sample smb.conf share configuration.
Günther Deschner [Mon, 6 Apr 2009 10:45:46 +0000 (12:45 +0200)]
s3-examples: Fix Bug #6205. Correct sample smb.conf share configuration.

Thanks to Jeffrey Riaboy <dakusan@castledragmire.com>.

Guenther
(cherry picked from commit 2b1fe2c98f4e0013dee4cbae62dc36cdd4085c7d)

15 years agoFix smbd crash for close_on_completion
Volker Lendecke [Sat, 28 Mar 2009 18:58:45 +0000 (19:58 +0100)]
Fix smbd crash for close_on_completion

handle_trans() can talloc_free "conn" if the client requests
close_on_completion. "state" is a talloc_child of conn, so it will be gone when
we later free state->data et al.

15 years agoUse cluster-aware procid_is_me instead of comparing pid's
Volker Lendecke [Fri, 3 Apr 2009 21:24:02 +0000 (14:24 -0700)]
Use cluster-aware procid_is_me instead of comparing pid's

15 years agoUse procid_str in debug messages for better cluster-debuggability
Volker Lendecke [Fri, 3 Apr 2009 21:03:43 +0000 (14:03 -0700)]
Use procid_str in debug messages for better cluster-debuggability

15 years agos3-nsswitch: Fix Bug #6238 2nd part. zero blob pointer in wbcLogoffUserParams.
Günther Deschner [Fri, 3 Apr 2009 10:50:50 +0000 (12:50 +0200)]
s3-nsswitch: Fix Bug #6238 2nd part. zero blob pointer in wbcLogoffUserParams.

Patch from Rashid N. Achilov <citycat4@ngs.ru>.

Guenther
(cherry picked from commit 43372b27403f617897bab564c42eead4d64532e4)

15 years agos3-samr: try to to fix password_expired flag handling.
Günther Deschner [Fri, 3 Apr 2009 10:06:40 +0000 (12:06 +0200)]
s3-samr: try to to fix password_expired flag handling.

Guenther

15 years agos3-nsswitch: Fix Bug #6238. Make sure wbcLogoffUserParams are properly initialized...
Günther Deschner [Fri, 3 Apr 2009 07:57:53 +0000 (09:57 +0200)]
s3-nsswitch: Fix Bug #6238. Make sure wbcLogoffUserParams are properly initialized before freed.

Fix inspired by patch from Rashid N. Achilov <citycat4@ngs.ru>.

Guenther
(cherry picked from commit 09265bcff5a2fac42f5abf34b8b439aa0a6998a1)

15 years agoBug #6243. Fix usrmgr.exe creating a user.
Volker Lendecke [Thu, 2 Apr 2009 19:23:18 +0000 (21:23 +0200)]
Bug #6243. Fix usrmgr.exe creating a user.

Signed-off-by: Günther Deschner <gd@samba.org>
15 years agoAllow pdbedit to change a user rid/sid. Based on a fix from Alexander
Jeremy Allison [Thu, 2 Apr 2009 03:14:35 +0000 (20:14 -0700)]
Allow pdbedit to change a user rid/sid. Based on a fix from Alexander
Zagrebin <alexz@visp.ru>.
Jeremy.

15 years agos3:net conf: don't store share names as lower case, but as given.
Michael Adam [Wed, 1 Apr 2009 22:23:31 +0000 (00:23 +0200)]
s3:net conf: don't store share names as lower case, but as given.

Michael

15 years agoWHATSNEW: Update changes.
Karolin Seeger [Wed, 1 Apr 2009 11:47:56 +0000 (13:47 +0200)]
WHATSNEW: Update changes.

Karolin

15 years agos3: fix the fix for bug #6195 - dont let smbd child processes panic
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

15 years agoVERSION: Raise version number up to 3.3.3.
Karolin Seeger [Wed, 1 Apr 2009 06:50:03 +0000 (08:50 +0200)]
VERSION: Raise version number up to 3.3.3.

Karolin

15 years agoWHATSNEW: Update changes since 3.3.2.
Karolin Seeger [Wed, 1 Apr 2009 06:47:34 +0000 (08:47 +0200)]
WHATSNEW: Update changes since 3.3.2.

Karolin

15 years agoTidy up some convert_string_internal error cases, found by Andrew Bartlett.
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.

15 years agos3:build: fix build of pam_winbind.so with static linking
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

15 years agoEnsure files starting with multiple dots are hidden
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.

15 years agoFix the problem of 3.0.x passdb databases being version
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.

15 years agoMerge branch 'v3-3-test' of ssh://git.samba.org/data/git/samba into v3-3-test
Derrell Lipman [Fri, 27 Mar 2009 22:03:36 +0000 (18:03 -0400)]
Merge branch 'v3-3-test' of ssh://git.samba.org/data/git/samba into v3-3-test

15 years ago[Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errno
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

15 years agoFix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly...
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.

15 years agoWHATSNEW: Update changes since 3.3.2.
Karolin Seeger [Fri, 27 Mar 2009 14:01:04 +0000 (15:01 +0100)]
WHATSNEW: Update changes since 3.3.2.

Karolin

15 years agoTry and fix the build farm RAW-STREAMS errors. Ordering of
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

15 years agoFix bug #6224 - nmbd waits 5 minutes at startup before checking if it needs to run...
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.

15 years agos3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
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

15 years agoFix a scary "fill_share_mode_lock failed" message
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.

15 years agos3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong information.
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

15 years agoAvahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash
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

15 years agos3-libnet: Fix Bug #6193: avoid messing with sync_context in libnet_samsync_delta().
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)

15 years agoFix two memleaks in the encryption code
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

15 years agos3:smbd: if we allow trans2 on the IPC$ share, then we have to allow transs2 too.
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

15 years agoFix bug 6097
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!

15 years agos3:dsgetdcname: use parentheses in if condition to make negation clear
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)

15 years agoUse avahi to register _smb._tcp in smbd
Volker Lendecke [Sun, 22 Mar 2009 14:59:33 +0000 (15:59 +0100)]
Use avahi to register _smb._tcp in smbd

15 years agoAdd event avahi binding
Volker Lendecke [Fri, 20 Mar 2009 13:55:05 +0000 (14:55 +0100)]
Add event avahi binding

15 years agoAdd avahi detection to configure
Volker Lendecke [Fri, 20 Mar 2009 13:53:10 +0000 (14:53 +0100)]
Add avahi detection to configure

15 years agoDisable dns_sd by default
Volker Lendecke [Fri, 20 Mar 2009 13:39:19 +0000 (14:39 +0100)]
Disable dns_sd by default

15 years ago=?utf-8?q?=D1=953/winbind=5Fpam:=20fix=20gcc=204.4=20compile=20warning
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

15 years agoOnly build the dirsort module if we have the dirfd function
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

15 years agoDocument the dirsort module
Volker Lendecke [Sun, 22 Mar 2009 10:39:32 +0000 (11:39 +0100)]
Document the dirsort module

15 years agoUse StrCaseCmp in the dirsort module
Volker Lendecke [Sun, 22 Mar 2009 10:39:10 +0000 (11:39 +0100)]
Use StrCaseCmp in the dirsort module

15 years agoAdd dirsort module
Andy Kelk [Sun, 22 Mar 2009 10:06:52 +0000 (11:06 +0100)]
Add dirsort module

15 years agos3-netapi: Fix Coverity #774 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:36:00 +0000 (11:36 +0100)]
s3-netapi: Fix Coverity #774 (REVERSE_INULL).

Guenther

15 years agos3-netapi: Fix Coverity #775 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:34:43 +0000 (11:34 +0100)]
s3-netapi: Fix Coverity #775 (REVERSE_INULL).

Guenther

15 years agos3-netapi: Fix Coverity #776 (REVERSE_INULL).
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)

15 years agos3-krb5: Fix Coverity #762 (REVERSE_INULL).
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)

15 years agos3-krb5: Fix Coverity #722 (RESOURCE_LEAK).
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)

15 years agoversion: fix handling of SAMBA_VERSION_VENDOR_PATCH.
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

15 years agos3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests
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)

15 years agofix build on old Heimdal based systems
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)

15 years agos3-spoolss: fix notify_printer_status_byname.
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

15 years agobuild: fix detection of netinet/ip.h on FreeBSD
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)

15 years agobuild: format the header check for netinet/ip.h more nicely
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)

15 years agos3: Fix bugs in the detection of the GNU ld version (Bug #6147)
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)

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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>
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

Signed-off-by: Michael Adam <obnox@samba.org>