obnox/samba-ctdb.git
12 years agopackaging(RHEL-CTDB): Revert "add BuildRequires to ctdb-devel >= 1.2.25"
Michael Adam [Fri, 27 May 2011 10:35:49 +0000 (12:35 +0200)]
packaging(RHEL-CTDB): Revert "add BuildRequires to ctdb-devel >= 1.2.25"

This reverts commit a16520b6939cb6d87f5818db0ac3ded228053cee.

There is also a 1.0.114 based branch that has the required capabilities.
If building against an insufficient version, the configure will fail.

12 years agopackaging(RHEL-CTDB): align configure.rpm to the spec file
Christian Ambach [Thu, 19 May 2011 16:58:25 +0000 (18:58 +0200)]
packaging(RHEL-CTDB): align configure.rpm to the spec file

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agopackaging(RHEL-CTDB): honour rpm build target options handed in to makerpms.sh
Michael Adam [Wed, 18 May 2011 08:35:42 +0000 (10:35 +0200)]
packaging(RHEL-CTDB): honour rpm build target options handed in to makerpms.sh

This allows to call e.g. "makerpms.sh -bs" to only build the source rpm.

12 years agopackaging(RHEL-CTDB): adapt configure.rpm
Michael Adam [Fri, 6 May 2011 15:22:06 +0000 (17:22 +0200)]
packaging(RHEL-CTDB): adapt configure.rpm

12 years agopackaging(RHEL-CTDB): enforce building of libtdb and libtalloc
Michael Adam [Fri, 6 May 2011 15:21:10 +0000 (17:21 +0200)]
packaging(RHEL-CTDB): enforce building of libtdb and libtalloc

12 years agopackaging(RHEL-CTDB): build libtdb and libtalloc packages ourselves
Michael Adam [Fri, 6 May 2011 10:29:10 +0000 (12:29 +0200)]
packaging(RHEL-CTDB): build libtdb and libtalloc packages ourselves

and add appropriate dependencies to the samba-common package.
It should also be possible to run with appropriate system talloc
and tdb packages.

12 years agopackaging(RHEL-CTDB): update configure.rpm (--disable-smbtorture4)
Michael Adam [Fri, 6 May 2011 16:36:38 +0000 (18:36 +0200)]
packaging(RHEL-CTDB): update configure.rpm (--disable-smbtorture4)

12 years agopackaging(RHEL-CTDB): disable smbtorture4 in the rpm build
Michael Adam [Fri, 6 May 2011 16:35:55 +0000 (18:35 +0200)]
packaging(RHEL-CTDB): disable smbtorture4 in the rpm build

12 years agopackaging(RHEL-CTDB): Remove the packaging of the winbind-32bit compat package
Michael Adam [Fri, 6 May 2011 10:03:52 +0000 (12:03 +0200)]
packaging(RHEL-CTDB): Remove the packaging of the winbind-32bit compat package

12 years agopackaging(RHEL-CTDB): create the rpm directories
Volker Lendecke [Wed, 27 Apr 2011 08:25:05 +0000 (10:25 +0200)]
packaging(RHEL-CTDB): create the rpm directories

In RHEL6, rpms are built in /root/rpmbuild, and those directories do not
necessarily exist.

12 years agos3-net: Fixed typo in net conf
Vicentiu Ciorbaru [Wed, 3 Aug 2011 20:24:09 +0000 (23:24 +0300)]
s3-net: Fixed typo in net conf

There was a missing ']' in net conf addshare usage message.

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:smbconf let drop leave the smbconf key in place to match a virgin registry.tdb
Gregor Beck [Tue, 2 Aug 2011 12:52:12 +0000 (14:52 +0200)]
s3:smbconf let drop leave the smbconf key in place to match a virgin registry.tdb

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:registry avoid updating keys which are going to be deleted in
Gregor Beck [Mon, 1 Aug 2011 13:27:46 +0000 (15:27 +0200)]
s3:registry avoid updating keys which are going to be deleted in
reg_deletekey_recursive

this changes the complexity from O(n^2) to O(n) and reduces the time of
a 'net conf drop' with 10000 shares from 6min to 1.5s

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:registry avoid pruning the sequencenumber while flushing the regsubkey_ctr
Gregor Beck [Wed, 13 Jul 2011 14:51:54 +0000 (16:51 +0200)]
s3:registry avoid pruning the sequencenumber while flushing the regsubkey_ctr

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jul 15 08:34:47 CEST 2011 on sn-devel-104
(cherry picked from commit 5049e3e142977a4c3d0f5a0fd9c06429f4d85bed)

12 years agos3:registry avoid leaking an old regsubkey_ctr on regsubkey_ctr_init
Gregor Beck [Thu, 14 Jul 2011 10:19:01 +0000 (12:19 +0200)]
s3:registry avoid leaking an old regsubkey_ctr on regsubkey_ctr_init

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 7e3d7505ddf2bdcf0d66273d9b96058969e2459b)

12 years agos3:registry: update copyright for the registry db implementation
Michael Adam [Wed, 6 Jul 2011 10:09:52 +0000 (12:09 +0200)]
s3:registry: update copyright for the registry db implementation
(cherry picked from commit 8b37443c2ddc40e8a077c2d70867a2e82a5e19be)

12 years agos3:registry: remove unused function regdb_key_is_base_key()
Michael Adam [Mon, 4 Jul 2011 15:45:30 +0000 (17:45 +0200)]
s3:registry: remove unused function regdb_key_is_base_key()

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Jul  4 21:11:32 CEST 2011 on sn-devel-104
(cherry picked from commit 399c0dba01b4337f5483bf03c99d28a3486e7981)

12 years agos3:registry: replace use of deprecated talloc_destroy by talloc_free.
Michael Adam [Mon, 4 Jul 2011 15:22:01 +0000 (17:22 +0200)]
s3:registry: replace use of deprecated talloc_destroy by talloc_free.
(cherry picked from commit 86f8eb98fe76b4b65f903e1792cdb2eb9b195ee5)

12 years agos3:registry: remove superfluous check for success of talloc_stackframe()
Michael Adam [Mon, 4 Jul 2011 15:21:23 +0000 (17:21 +0200)]
s3:registry: remove superfluous check for success of talloc_stackframe()
(cherry picked from commit 17b091b7c7f57a041c5e90c653f1ee46572d4668)

12 years agos3:registry: add debug-level-10 verbosity to regdb_upgrade_v2_v3_fn()
Michael Adam [Mon, 4 Jul 2011 15:20:28 +0000 (17:20 +0200)]
s3:registry: add debug-level-10 verbosity to regdb_upgrade_v2_v3_fn()
(cherry picked from commit cc384c15969cdc395bfd3fcee10b5c04233df290)

12 years agos3:registry: adapt a debug message to be more systematic
Michael Adam [Mon, 4 Jul 2011 15:13:58 +0000 (17:13 +0200)]
s3:registry: adapt a debug message to be more systematic
(cherry picked from commit 340be35b9b068360b5fec5a0ea43dc8a3b294ba4)

12 years agos3:registry: set registry version to 3 and add upgrade code
Michael Adam [Mon, 4 Jul 2011 14:23:08 +0000 (16:23 +0200)]
s3:registry: set registry version to 3 and add upgrade code

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit c8c5d8c89e3cf9b71a917de83ad68d4d3c18b117)

12 years agos3:registry: add db_context argument to regdb_upgrade_v1_to_v2()
Michael Adam [Mon, 4 Jul 2011 14:21:26 +0000 (16:21 +0200)]
s3:registry: add db_context argument to regdb_upgrade_v1_to_v2()
(cherry picked from commit f36ee63df28a2c49e8661a28237b97fe60f872c4)

12 years agos3:registry: wrap the whole db upgrade in one transaction
Michael Adam [Mon, 4 Jul 2011 14:15:11 +0000 (16:15 +0200)]
s3:registry: wrap the whole db upgrade in one transaction

The purpose of this is to prepare for multiple upgrade steps
to be performed in a single transaction, so that no change
at all is made to that database if one step fails.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 1621aab139f0104cb2c7183c28c52cb6605abb09)

12 years agos3:registry: change regdb_store_regdb_version() to take db_context argument.
Michael Adam [Mon, 4 Jul 2011 14:09:33 +0000 (16:09 +0200)]
s3:registry: change regdb_store_regdb_version() to take db_context argument.
(cherry picked from commit caf9c9996952e72e61f9c9f0efd27936f38eefda)

12 years agos3:registry: fix a comment typo
Michael Adam [Mon, 4 Jul 2011 13:23:39 +0000 (15:23 +0200)]
s3:registry: fix a comment typo
(cherry picked from commit 2273650ca89c4042d073257383d0e5d28a8a555f)

12 years agos3:registry: remove unused regdb_delete_sorted_subkeys()
Michael Adam [Fri, 1 Jul 2011 11:49:12 +0000 (13:49 +0200)]
s3:registry: remove unused regdb_delete_sorted_subkeys()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit a8360712e1356a347f49a5208c1388dc5ab96d31)

12 years agos3:registry: don't delete the unused subkeys cache record any more
Michael Adam [Fri, 1 Jul 2011 11:48:16 +0000 (13:48 +0200)]
s3:registry: don't delete the unused subkeys cache record any more

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit a0f83ecbb9697d4aa9c47b7b61001996a934ecee)

12 years agos3:registry: remove the code to create and search the sorted subkeys cache records
Michael Adam [Fri, 1 Jul 2011 11:37:41 +0000 (13:37 +0200)]
s3:registry: remove the code to create and search the sorted subkeys cache records

This is not needed any more.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

12 years agos3:registry: adapt the comment explaining the definition of the existence of a key.
Michael Adam [Fri, 1 Jul 2011 11:33:44 +0000 (13:33 +0200)]
s3:registry: adapt the comment explaining the definition of the existence of a key.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 18973fa109132bab8cb22a6757dbe4a206ea1a33)

12 years agos3:registry: regdb_key_exists now checks only for the list-of-subkeys-record
Michael Adam [Fri, 1 Jul 2011 11:18:51 +0000 (13:18 +0200)]
s3:registry: regdb_key_exists now checks only for the list-of-subkeys-record

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit a25563035823e720a068c3021e01b0556feb7f18)

12 years agos3:registry: rewrite init_registry_key_internal
Michael Adam [Mon, 4 Jul 2011 11:19:13 +0000 (13:19 +0200)]
s3:registry: rewrite init_registry_key_internal

This rewrites init_registry_key_internal() to correctly also create
base keys. It makes use of the existing create functions instead of
duplicating the code.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 9e2b2c1fcc6d0bd852df715fdae7854b3ae77027)

12 years agos3:registry: add regdb_create_basekey()
Michael Adam [Mon, 4 Jul 2011 11:14:43 +0000 (13:14 +0200)]
s3:registry: add regdb_create_basekey()

Function to create a base key in the registry db, i.e. one that
has no parent key.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 747c67cf309a5127e78bd78f0d17e3fc094115d2)

12 years agos3:registry: add regdb_create_subkey_internal() taking additional db context argument
Michael Adam [Mon, 4 Jul 2011 11:09:31 +0000 (13:09 +0200)]
s3:registry: add regdb_create_subkey_internal() taking additional db context argument

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 144c8d77d8dcde0b85cef28b6515360aa0c55b85)

12 years agos3:registry: add new mode to regdb_store_subkey_list() for handing in NULL parent key
Michael Adam [Mon, 4 Jul 2011 11:06:20 +0000 (13:06 +0200)]
s3:registry: add new mode to regdb_store_subkey_list() for handing in NULL parent key

Standard behaviour is to concatenate parent and key path (parent\key).
This new mode allows for storing subkey lists for base keys using a NULL
parent argument.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 15a50ef8f856d83508ece3a8294dfaffbadc3b41)

12 years agos3:registry: create the empty list of subkeys of the new key in regdb_create_subkey
Michael Adam [Fri, 1 Jul 2011 13:50:05 +0000 (15:50 +0200)]
s3:registry: create the empty list of subkeys of the new key in regdb_create_subkey

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit fc4d79d41a18ed3c2a2f8a831e5dcc3002423ab1)

12 years agos3:registry: refactor creation of subkey list out into regdb_store_subkey_list()
Michael Adam [Fri, 1 Jul 2011 13:47:50 +0000 (15:47 +0200)]
s3:registry: refactor creation of subkey list out into regdb_store_subkey_list()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 322eaf1e9ef927bdec7fca947e894470196c1049)

12 years agos3:registry: remove redundant write of zero-lentgh subkey list record
Michael Adam [Fri, 1 Jul 2011 13:18:12 +0000 (15:18 +0200)]
s3:registry: remove redundant write of zero-lentgh subkey list record

In this case, the zero-lenght list has already been written in step #2.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 394ca1446e712c9cb3649c8a2c4fd2ebe638d8cd)

12 years agos3:registry: don't update the sorted subkeys cache any more in regdb_store_keys_inter...
Michael Adam [Fri, 1 Jul 2011 12:34:08 +0000 (14:34 +0200)]
s3:registry: don't update the sorted subkeys cache any more in regdb_store_keys_internal2()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit eb797bd2060732bca06cda3dfd5eabec5e7c8ab0)

12 years agos3:registry: don't skip base key in existence check in regdb_store_keys_internal()
Michael Adam [Fri, 1 Jul 2011 12:23:19 +0000 (14:23 +0200)]
s3:registry: don't skip base key in existence check in regdb_store_keys_internal()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 5b01a34ad734a772e52c50ccd8ffbb461f986af7)

12 years agos3:registry: don't skip base keys from existence check in regdb_create_subkey()
Michael Adam [Fri, 1 Jul 2011 11:58:45 +0000 (13:58 +0200)]
s3:registry: don't skip base keys from existence check in regdb_create_subkey()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit da2e64b63f6bbb2faa93f621e14992e38aa37354)

12 years agos3:registry: don't skip base keys from existence check in regdb_delete_subkey()
Michael Adam [Fri, 1 Jul 2011 11:57:19 +0000 (13:57 +0200)]
s3:registry: don't skip base keys from existence check in regdb_delete_subkey()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit 6b99aa496fe653f6bb7dcd7720f5a2c736779af6)

12 years agos3:registry: when deleting the records for a key, also delete the sorted subkeys...
Michael Adam [Thu, 30 Jun 2011 12:37:49 +0000 (14:37 +0200)]
s3:registry: when deleting the records for a key, also delete the sorted subkeys cache

This prevents orphaned empty sorted subkeys cache records from filling the database.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 1f72088633c2215a23e086c8627f35621b47ffec)

12 years agos3:registry: add helper function regdb_delete_sorted_subkeys()
Michael Adam [Thu, 30 Jun 2011 12:36:35 +0000 (14:36 +0200)]
s3:registry: add helper function regdb_delete_sorted_subkeys()

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 2b162db6e9cc3e098f339516bbda719618664a83)

12 years agos3: Fix MIT trusts
Volker Lendecke [Mon, 25 Jul 2011 10:38:27 +0000 (12:38 +0200)]
s3: Fix MIT trusts

Winbind can't really cope with trusts that don't have a SID associated. This
happens with external MIT trusts for example. This filters them out when
sending the trust list from child to parent.

12 years agos3:testparm: avoid spurious warnings about dos mode mapping and create mask if store...
Gregor Beck [Wed, 6 Jul 2011 13:10:27 +0000 (15:10 +0200)]
s3:testparm: avoid spurious warnings about dos mode mapping and create mask if store dos attributes is set

12 years agos3: Fix the build, NAME_MAX not universally available
Volker Lendecke [Mon, 20 Jun 2011 10:09:06 +0000 (12:09 +0200)]
s3: Fix the build, NAME_MAX not universally available

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun 20 13:45:21 CEST 2011 on sn-devel-104

12 years agos3: Replace shadow_copy2 with a new implementation
Volker Lendecke [Mon, 20 Jun 2011 07:52:21 +0000 (09:52 +0200)]
s3: Replace shadow_copy2 with a new implementation

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jun 20 11:17:47 CEST 2011 on sn-devel-104

12 years agos3: Fix the return of make_new_server_info_guest
Volker Lendecke [Wed, 15 Jun 2011 12:09:50 +0000 (14:09 +0200)]
s3: Fix the return of make_new_server_info_guest

12 years agos3: Add debug level 0 warnings to make_new_server_info_guest
Volker Lendecke [Wed, 15 Jun 2011 12:08:23 +0000 (14:08 +0200)]
s3: Add debug level 0 warnings to make_new_server_info_guest

I've got a backtrace where this must have failed, but it is not clear why. If
this fails, we should really complain because we can't start up.

12 years agos3: Fix connecting to ctdb as non-root
Volker Lendecke [Tue, 14 Jun 2011 15:52:42 +0000 (17:52 +0200)]
s3: Fix connecting to ctdb as non-root

This is at least one instance which I could identify

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jun 14 19:06:39 CEST 2011 on sn-devel-104

12 years agos3: Fix count_current_connections
Volker Lendecke [Tue, 14 Jun 2011 15:50:41 +0000 (17:50 +0200)]
s3: Fix count_current_connections

"False" is not really a valid return value for "int"..

12 years agos3:net: registry export: close key after recursion returns
Gregor Beck [Mon, 30 May 2011 07:31:21 +0000 (09:31 +0200)]
s3:net: registry export: close key after recursion returns

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3: Fork the echo handler only after SMB1 negprot is done
Volker Lendecke [Fri, 20 May 2011 11:07:17 +0000 (13:07 +0200)]
s3: Fork the echo handler only after SMB1 negprot is done

This enables activating the echo responder also if SMB2 is enabled, albeit it
will only be used for SMB1 at this moment.

12 years agos3-torture: Add a test for notify upon read&x
Volker Lendecke [Wed, 4 May 2011 15:45:34 +0000 (17:45 +0200)]
s3-torture: Add a test for notify upon read&x

This makes sure that when a file is brought online by a read call
we notify the client for FILE_NOTIFY_CHANGE_ATTRIBUTES.

12 years agos3:docs: document the smbclient "tid" command
Michael Adam [Mon, 25 Jul 2011 09:46:33 +0000 (11:46 +0200)]
s3:docs: document the smbclient "tid" command

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Jul 25 13:14:57 CEST 2011 on sn-devel-104
(cherry picked from commit 233ba37416551a0b64dcfeb5cd405aadede5418c)

12 years agos3:docs: document the smbclient "tdis" command (cherry picked from commit a8d0e4ddb87...
Michael Adam [Mon, 25 Jul 2011 09:44:39 +0000 (11:44 +0200)]
s3:docs: document the smbclient "tdis" command (cherry picked from commit a8d0e4ddb8730dc176e0589674ec4eaea307119a)

12 years agos3:docs: document the smbclient "tcon" command (cherry picked from commit 5ecfcf6cb99...
Michael Adam [Mon, 25 Jul 2011 09:42:00 +0000 (11:42 +0200)]
s3:docs: document the smbclient "tcon" command (cherry picked from commit 5ecfcf6cb998f5670895f998c2c917afc86aacfd)

12 years agos3:docs: document the smbclient "logoff" command (cherry picked from commit 9724fe303...
Michael Adam [Mon, 25 Jul 2011 09:39:04 +0000 (11:39 +0200)]
s3:docs: document the smbclient "logoff" command (cherry picked from commit 9724fe303d5f9a3e37a881d025937285668e2dbe)

12 years agos3:smbclient: add a "tid" command to view and change the tree id (tid).
Michael Adam [Fri, 22 Jul 2011 12:12:13 +0000 (14:12 +0200)]
s3:smbclient: add a "tid" command to view and change the tree id (tid).

This low level command can be used to switch between tree connects in one
session.

12 years agos3:smbclient: add a "tdis" command to do a tree disconnect (close a connection to...
Michael Adam [Fri, 22 Jul 2011 12:11:34 +0000 (14:11 +0200)]
s3:smbclient: add a "tdis" command to do a tree disconnect (close a connection to a share) (cherry picked from commit 7327bde81acecf4ae0c09f80cebe21a1312aeb3a)

12 years agos3:smbclient: add a "tcon" command to do a tree connect (connect to a share)
Michael Adam [Fri, 22 Jul 2011 12:10:38 +0000 (14:10 +0200)]
s3:smbclient: add a "tcon" command to do a tree connect (connect to a share)

12 years agos3:smbclient: add "logoff" command to close the session (cherry picked from commit...
Michael Adam [Fri, 22 Jul 2011 12:08:03 +0000 (14:08 +0200)]
s3:smbclient: add "logoff" command to close the session (cherry picked from commit 281c6d02bdcc9988c0f1660a3c77ba4b3db3dc6d)

12 years agoWHATSNEW: Update changes since rc3.
Karolin Seeger [Tue, 9 Aug 2011 11:15:02 +0000 (13:15 +0200)]
WHATSNEW: Update changes since rc3.

Karolin
(cherry picked from commit 76022256cd23cd71354e21384e2350c761e9f373)

12 years agos3:modules:nfs4_acls: improve fix for bug #8330
Michael Adam [Thu, 28 Jul 2011 07:49:34 +0000 (09:49 +0200)]
s3:modules:nfs4_acls: improve fix for bug #8330

simplify the check insmbacl4_find_equal_special()

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit d1ab64cbc2d62744f541eea0d80d7b522416ac1c)

12 years agos3:modules fix Bug 8330 NFSv4 ACL merging logic is broken
Christian Ambach [Wed, 27 Jul 2011 12:46:00 +0000 (14:46 +0200)]
s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken

we should not merge ACEs with different flags (e.g. CI/OI/I/)
Otherwise ACLs get wrong entries and thus wrong semantics

Example:
ACL:BUILTIN\Users:ALLOWED/0x0/FULL
ACL:BUILTIN\Users:ALLOWED/I/READ
got merged to
ACL:BUILTIN\Users:ALLOWED/I/FULL

This is not the same and also leads to wrong displays
in the Windows ACL dialog

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed Jul 27 16:03:51 CEST 2011 on sn-devel-104
(cherry picked from commit 3c05013694c453411b78a1df884a80c8d48e7393)

12 years agos3:lib/events: Fix a bug in run_poll_events().
Stefan Metzmacher [Mon, 8 Aug 2011 16:49:06 +0000 (18:49 +0200)]
s3:lib/events: Fix a bug in run_poll_events().

Ignore fd events without EVENT_FD_READ or EVENT_FD_WRITE also in
run_events_poll(). They are ignore when building the array
for the syscall in event_add_to_poll_args(), so we need to
ignore them run_events_poll() too.

metze

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Aug  9 10:11:54 CEST 2011 on sn-devel-104
(cherry picked from commit 020032e114c0e966acf24f24e707942219d60cf3)

Fix bug #8358 (smbd exits with NT_STATUS_INTERNAL_ERROR in run_poll_events()).
(cherry picked from commit 6a587c926b7fdcb934b916a29bdd04bd0ef606b9)

12 years agos3:smb2_server: make sure we grant credits on async read/write operations (bug #8357)
Stefan Metzmacher [Sat, 6 Aug 2011 08:19:21 +0000 (10:19 +0200)]
s3:smb2_server: make sure we grant credits on async read/write operations (bug #8357)

Currently we skip, the "gone async" interim response on read and write,
this caused the aio code path to grant 0 credits to the client
in the read/write responses.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Aug  7 22:23:57 CEST 2011 on sn-devel-104
(cherry picked from commit 47bffb9b9243dc72d7305cd9ec3e63e176841bf5)
(cherry picked from commit cbd408df89ec51fb06fbfb935458eb8425639bed)

12 years agos3/swat: use strlcat instead of strncat to fix build on old Linux distros
Björn Jacke [Thu, 4 Aug 2011 14:25:08 +0000 (16:25 +0200)]
s3/swat: use strlcat instead of strncat to fix build on old Linux distros

SLES 9's glibc for example had weird macros where the use of strncat resulted
in the use of strcat which we don't allow.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Aug  4 17:50:24 CEST 2011 on sn-devel-104
(cherry picked from commit d3b4d75364210e2d2a4a1cd806f28b0021f22909)

Fix bug #8362 (build issue on old glibc systems).
(cherry picked from commit 87fa72a5202fe3780d4a61289bf755027cd078f4)

12 years agos3:web/swat: use strtoll() instead of atoi/atol/atoll
Stefan Metzmacher [Fri, 5 Aug 2011 17:48:38 +0000 (19:48 +0200)]
s3:web/swat: use strtoll() instead of atoi/atol/atoll

This is more portable, as we have a strtoll replacement
in lib/replace.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Aug  6 11:55:45 CEST 2011 on sn-devel-104
(cherry picked from commit a6be0820d09b3f3eabfbb5f4356add303aa8a494)

Fix bug #8347 (CVE-2011-2522 regression for HP-UX, AIX and OSF).
(cherry picked from commit be41d88e55237214e5a27f7bd8d8c15e27d31579)

12 years agoWHATSNEW: Update release notes.
Karolin Seeger [Sun, 7 Aug 2011 19:22:46 +0000 (21:22 +0200)]
WHATSNEW: Update release notes.

Karolin
(cherry picked from commit d6f841bb3e465e7f05a886eafcb54f8d53b54327)

12 years agos3: Fix smb2 handling error returns from aio
Volker Lendecke [Tue, 2 Aug 2011 19:16:26 +0000 (21:16 +0200)]
s3: Fix smb2 handling error returns from aio

Found when reading with aio_fork beyond the end of file.

Metze, Jeremy, please check!

Without this we get

[2011/08/02 21:02:54.082661,  0] lib/util.c:778(smb_panic_s3)
  PANIC (pid 2302): smbd/smb2_read.c:593: Type mismatch: name[NULL] expected[struct smbd_smb2_read_state]
[2011/08/02 21:02:54.094316,  0] lib/util.c:882(log_stack_trace)
  BACKTRACE: 23 stack frames:
   #0 bin/smbd(log_stack_trace+0x2d) [0xb72873d8]
   #1 bin/smbd(smb_panic_s3+0x7c) [0xb7287529]
   #2 bin/smbd(smb_panic+0x2f) [0xb7277e1f]
   #3 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6bc48]
   #4 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6ec79]
   #5 /root/git/s3-work/source3/bin/libtalloc.so.2(_talloc_get_type_abort+0x34) [0xb6c6ecb3]
   #6 bin/smbd [0xb6fbc405]
   #7 bin/smbd(_tevent_req_notify_callback+0x4a) [0xb729a85a]
   #8 bin/smbd [0xb729a888]
   #9 bin/smbd(_tevent_req_done+0x19) [0xb729aa73]
   #10 bin/smbd [0xb6fae517]
   #11 bin/smbd [0xb6fad258]
   #12 bin/smbd(smbd_aio_complete_aio_ex+0xf5) [0xb6fad6e8]
   #13 /root/git/inst/modules/vfs/aio_fork.so [0xb66d4992]
   #14 bin/smbd(run_events_poll+0x400) [0xb7297df2]
   #15 bin/smbd(smbd_process+0xd75) [0xb6f9d3a7]
   #16 bin/smbd [0xb756f07b]
   #17 bin/smbd(run_events_poll+0x400) [0xb7297df2]
   #18 bin/smbd [0xb7298254]
   #19 bin/smbd(_tevent_loop_once+0x9e) [0xb72986ac]
   #20 bin/smbd(main+0x185c) [0xb7570e59]
   #21 /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb6b08455]
   #22 bin/smbd [0xb6f14e01]

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Aug  2 22:33:15 CEST 2011 on sn-devel-104
(cherry picked from commit 5068a0d14df8cc6f1b4517c64f4356abc6606b58)

Fix bug #8343 (SMB2 crash reading with aio_fork beyond the end of file).
(cherry picked from commit ad75107a33ff7e70d9939b80b3e7e06265ee030e)

12 years agoFix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
Jeremy Allison [Mon, 1 Aug 2011 18:49:10 +0000 (11:49 -0700)]
Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c

Make SA_RESETHAND conditional on its existance.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Aug  1 22:03:45 CEST 2011 on sn-devel-104
(cherry picked from commit 0c67efdd68b9808542c090b9fd9920e4e37d85d0)
(cherry picked from commit 4b4155c7235d8ec0c93324a782bc815ef08a7ba3)

12 years agoFix bug #8341 - libsmbclient segfault when feed the root of a mounted share via an uri
Alban Browaeys [Mon, 1 Aug 2011 23:40:22 +0000 (16:40 -0700)]
Fix bug #8341 - libsmbclient segfault when feed the root of a mounted share via an uri

Fix null deref.
(cherry picked from commit cf0c36ab9a5129878b92a52d22aa814eaa737a4c)
(cherry picked from commit ca293af1f06891dfd13171d418047e4fa8c4fc14)

12 years agos3: dbwrap_ctdb.c: Fix bug #8303 #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue
Björn Baumbach [Tue, 12 Jul 2011 15:32:55 +0000 (17:32 +0200)]
s3: dbwrap_ctdb.c: Fix bug #8303 #ifdef CTDB_CONTROL_SCHEDULE_FOR_DELETION issue

Check for HAVE_CTDB_CONTROL_SCHEDULE_FOR_DELETION_DECL instead of
CTDB_CONTROL_SCHEDULE_FOR_DELETION, which is an enum member and not a
define.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jul 12 18:56:30 CEST 2011 on sn-devel-104
(cherry picked from commit b807c58b655f1ffbf849f5de9eef66136bdb4a52)
(cherry picked from commit 3932178dd3a54723484e833cddf58ff68e7c3417)

12 years agoSecond part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id...
Jeremy Allison [Fri, 29 Jul 2011 18:17:03 +0000 (11:17 -0700)]
Second part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id: bad message_id

Modify the credit granting algorithm to closer to what I believe
Windows does.

Split up max_credits into 1/16ths, and then scale
the requested credits by how many 16ths have been
currently granted. Less than 1/16th == grant all
requested (100%), scale down as more have been
granted. Never ask for less than 1 if the client
asked for at least 1.
(cherry picked from commit 3e854564315a7bdc5d9837526a813b2b858e0563)

12 years agoFirst part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id...
Jeremy Allison [Fri, 29 Jul 2011 18:16:51 +0000 (11:16 -0700)]
First part of bugfix for bug #8335 - file copy aborts with smb2_validate_message_id: bad message_id

Set default max credits to 8192 now this has been documented in the
SMB2 spec.
(cherry picked from commit 9d579ed2398d7f88c9c02076e612eed877d1ec88)

12 years agos3:loadparm: fix the reload of the configuration: also reload activated registry...
Michael Adam [Fri, 22 Jul 2011 08:11:52 +0000 (10:11 +0200)]
s3:loadparm: fix the reload of the configuration: also reload activated registry shares

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 22 16:53:49 CEST 2011 on sn-devel-104
(cherry picked from commit efbe1602bd014eada4811f336bdccbf4692d3807)

The last 2 patches address bug 8327 (config reload fails to reload shares from
registry).
(cherry picked from commit 254cc7ae23f2b0108bada37b6b59dd90ac198469)

12 years agos3:loadparm: add reload_registry_shares() - reload only those shares already loaded...
Michael Adam [Fri, 22 Jul 2011 08:10:43 +0000 (10:10 +0200)]
s3:loadparm: add reload_registry_shares() - reload only those shares already loaded (cherry picked from commit ec113a58a4dc4e4f3ea03f7818eb312325f69482)
(cherry picked from commit cc3c8d10940ef5d5d0e636b0f9d46606d46b0dc7)

12 years agonbt: fix WinXP S3 domain join: alignment of nbt_netlogon_response_from_pdc
Andrew Bartlett [Wed, 27 Jul 2011 02:04:26 +0000 (12:04 +1000)]
nbt: fix WinXP S3 domain join: alignment of nbt_netlogon_response_from_pdc

This fixes WinXP joining a Samba3 domain, which was broken on hosts
with an even number of characters in the host name.  The alignment
requested in the structure was ignored because of the overall
NDR_NOALIGN set on the packet.

Andrew Bartlett

Fix bug #8326 (WinXP cannot join a Samba3 domain with a 'even' hostname).
(cherry picked from commit 24fe5fea8fb7839dcbcf39a346a31c9e90e7beb9)

12 years agoFix bug #8324 - smbclient cannot list directories from a big-endian machine.
Jeremy Allison [Tue, 26 Jul 2011 22:16:29 +0000 (15:16 -0700)]
Fix bug #8324 - smbclient cannot list directories from a big-endian machine.

Two uses of the setup array are not being correctly byte-swapped to little
endian.
(cherry picked from commit 146549d7250fefb365675154f0916c37e56faa5d)

12 years agos3:torture: remove a file accidentially committed with 3b2fe4728d6d916508b677e696ecad...
Michael Adam [Tue, 17 May 2011 12:30:13 +0000 (14:30 +0200)]
s3:torture: remove a file accidentially committed with 3b2fe4728d6d916508b677e696ecad88f8b7b9fd

Fix bug #8329 (a code file was accidentially commited).
(cherry picked from commit 0f9a24b7dc9aaae6145ec409191fc16b07c601a8)

12 years agos3:idmap_tdb2: remove the undocumented option of the silly name "tdb:idmap2.tdb"
Michael Adam [Fri, 24 Jun 2011 08:15:02 +0000 (10:15 +0200)]
s3:idmap_tdb2: remove the undocumented option of the silly name "tdb:idmap2.tdb"

In ancient times, when ctdb had not support for persistent databases and
tdb2 was introduced as a two-layer solution and it was more important than
today to be able to change the location of the permanent database file
because it had to reside on shared storage.

But these were times when idmap_tdb2 was not even officially released.
Nowadays, with ctdb handling the persistent idmap2.tdb database, the path
is stripped anyways, so this undocumented option has become unnecessary
and is hence removed.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Jul 27 05:37:57 CEST 2011 on sn-devel-104
(cherry picked from commit 3276060da4e7d495bd5cf5cbf7237e64d948ee77)

The last 10 patches address
bug #8328 (final cleanup of idmap_tdb2 code and docs needed for release).
(cherry picked from commit 742b8c3c14ec8708eb5bfe5e7960c1c93ec0096c)

12 years agos3:idmap_tdb2: remove a legacy comment (cherry picked from commit 67cd2f9d867fad1f7df...
Michael Adam [Thu, 9 Jun 2011 11:36:54 +0000 (13:36 +0200)]
s3:idmap_tdb2: remove a legacy comment (cherry picked from commit 67cd2f9d867fad1f7df2d6a6a5cdb723336ac495)
(cherry picked from commit 55019ced08d235a3ba9ae27b06379fcb827f9b28)

12 years agos3:idmap_tdb2: remove legacy comment (cherry picked from commit 4b5ada3d27198b49771ac...
Michael Adam [Thu, 9 Jun 2011 11:35:21 +0000 (13:35 +0200)]
s3:idmap_tdb2: remove legacy comment (cherry picked from commit 4b5ada3d27198b49771acb70ae979087235be783)
(cherry picked from commit 4369aeb41c2fafd6a1e0baff5cbb05d223e869ab)

12 years agos3:idmap_tdb2: remove superfluous initialization with bogus comment (cherry picked...
Michael Adam [Thu, 9 Jun 2011 11:34:04 +0000 (13:34 +0200)]
s3:idmap_tdb2: remove superfluous initialization with bogus comment (cherry picked from commit 551185573899b6e608863f833633d40ae04458d8)
(cherry picked from commit 5a5b069166d5f224526f6cae049fa14cf35c426a)

12 years agos3:idmap_tdb2: fix a legacy comment that does not apply any more (cherry picked from...
Michael Adam [Thu, 9 Jun 2011 11:07:54 +0000 (13:07 +0200)]
s3:idmap_tdb2: fix a legacy comment that does not apply any more (cherry picked from commit 7d3dc2164b3929c642127659593e69fc865a6184)
(cherry picked from commit 7f56b6269792300237193b69541f73fb32a986b3)

12 years agos3:doc: add an example with idmap script to the idmap_tdb2 manpage (cherry picked...
Michael Adam [Fri, 24 Jun 2011 09:38:05 +0000 (11:38 +0200)]
s3:doc: add an example with idmap script to the idmap_tdb2 manpage (cherry picked from commit 86973eee43605a3680fb51470a81ea9ca7f1b515)
(cherry picked from commit 2abe73e5eed10af4ee030449322ddbc4c7054c08)

12 years agos3:docs: remove legacy text from the example in the idmap_tdb2 manpage (cherry picked...
Michael Adam [Fri, 24 Jun 2011 09:36:33 +0000 (11:36 +0200)]
s3:docs: remove legacy text from the example in the idmap_tdb2 manpage (cherry picked from commit 2f253c2791ccb2421f26f563e3983ee950da1d05)
(cherry picked from commit 66216f6325f33c2a1d7c3e114754efc78d61aae2)

12 years agos3:doc: clarify the idmap script section in the idmap_tdb2 manpage (cherry picked...
Michael Adam [Fri, 24 Jun 2011 09:35:51 +0000 (11:35 +0200)]
s3:doc: clarify the idmap script section in the idmap_tdb2 manpage (cherry picked from commit 4daab85ae60f2821a1d9d98f1edff6a318e8e3c1)
(cherry picked from commit 29e39194aaa15c44178b16a4abc5583f5ff4688f)

12 years agos3:docs:idmap_tdb2: update the documentation of idmap script
Michael Adam [Fri, 24 Jun 2011 08:59:04 +0000 (10:59 +0200)]
s3:docs:idmap_tdb2: update the documentation of idmap script

to reflect the new variant "idmap config * : script" of configuring the idmap script
(cherry picked from commit 2aa19b4aeb9de43a0e2b94ad1202f2068b29c710)
(cherry picked from commit 22b9dc3f66c6786a962d7cb462b372fb955a199e)

12 years agos3:idmap_tdb2: deprecate the idmap:script parameter and use "idmap config * : script...
Michael Adam [Tue, 7 Jun 2011 16:00:36 +0000 (18:00 +0200)]
s3:idmap_tdb2: deprecate the idmap:script parameter and use "idmap config * : script" instead

With this patch, "idmap config * : script" will override "idmap : script".
If "idmap : script" is present, a deprecation warning will be printed in any
case. If "idmap config * : script" is not set, then the value of "idmap :script"
will be used for backwards compatibility.
(cherry picked from commit b6c82f18f17cdded771d285930566c1d104686aa)
(cherry picked from commit 7812ce547973a0ad5a69c64e8e708e1b9f3a8687)

12 years agoWHATSNEW: Start release notes for 3.6.0.
Karolin Seeger [Tue, 26 Jul 2011 20:40:15 +0000 (22:40 +0200)]
WHATSNEW: Start release notes for 3.6.0.

Karolin
(cherry picked from commit 5f9bc1433738002acd9a93946955494908af9c05)

12 years agoVERSION: Bump version up to 3.6.0.
Karolin Seeger [Tue, 26 Jul 2011 20:38:09 +0000 (22:38 +0200)]
VERSION: Bump version up to 3.6.0.

Karolin
(cherry picked from commit ef152f60c2be5b51c042979ad29596309059af1d)

12 years agoWHATSNEW: Update changes since rc2.
Karolin Seeger [Tue, 26 Jul 2011 20:06:04 +0000 (22:06 +0200)]
WHATSNEW: Update changes since rc2.

Karolin
(cherry picked from commit 1a045c461ec74001596e9ccf8a676328216e547f)

12 years agos3:utils/net_afs fix compiler warnings
Christian Ambach [Fri, 15 Jul 2011 13:44:36 +0000 (15:44 +0200)]
s3:utils/net_afs fix compiler warnings

this also fixes the usage displays of net afs
(cherry picked from commit 7738d8b89bcf2b43d65f1bf4599a688cb4143768)

12 years agos3:lib/afs fix the build with --with-vfs-afsacl
Christian Ambach [Fri, 15 Jul 2011 13:54:25 +0000 (15:54 +0200)]
s3:lib/afs fix the build with --with-vfs-afsacl

This fixes the second piece of Bug #8263
(cherry picked from commit 8a14ccb99388e31b366fc84060186be1ea708d75)

12 years agos3:lib/afs fix the build with --with-fake-kaserver
Christian Ambach [Fri, 15 Jul 2011 13:27:07 +0000 (15:27 +0200)]
s3:lib/afs fix the build with --with-fake-kaserver

This fixes one piece of Bug #8263
(cherry picked from commit caa4226c315a70138016cf8fae13ce3f050057e7)

12 years agoFix bug 8314] - smbd crash with unknown user.
Jeremy Allison [Fri, 22 Jul 2011 23:42:51 +0000 (16:42 -0700)]
Fix bug 8314] - smbd crash with unknown user.

All other auth modules code with being called with
auth_method->private_data being NULL, make the auth_server
module cope with this too.
(cherry picked from commit e173f04a822944e96171866d9fbf43301cd611a4)

12 years agos3 swat: Create random nonce in CGI mode
Kai Blin [Tue, 12 Jul 2011 06:08:24 +0000 (08:08 +0200)]
s3 swat: Create random nonce in CGI mode

In CGI mode, we don't get access to the user's password, which would
reduce the hash used so far to parameters an attacker can easily guess.
To work around this, read the nonce from secrets.tdb or generate one if
it's not there.
Also populate the C_user field so we can use that for token creation.

Signed-off-by: Kai Blin <kai@samba.org>
(cherry picked from commit 589bc35590aebfdd20fe786c08005bb43ef47d94)