obnox/samba-ctdb.git
12 years agov3-6-ctdb:VERSION: bump the ctdb vendor patch level to 28 v3-6-ctdb 3.6.0-ctdb-28
Michael Adam [Thu, 13 Oct 2011 15:18:21 +0000 (17:18 +0200)]
v3-6-ctdb:VERSION: bump the ctdb vendor patch level to 28

12 years agov3-6-ctdb:VERSION: bump ctdb vendor patch level to 27
Christian Ambach [Tue, 4 Oct 2011 13:23:07 +0000 (15:23 +0200)]
v3-6-ctdb:VERSION: bump ctdb vendor patch level to 27

12 years agov3-6-ctdb: VERSION: Bump ctdb vendor patch level to 26
Michael Adam [Fri, 30 Sep 2011 14:05:13 +0000 (16:05 +0200)]
v3-6-ctdb: VERSION: Bump ctdb vendor patch level to 26

12 years agov3-6-ctdb: Bump ctdb vendor patch level to 25
Michael Adam [Tue, 27 Sep 2011 14:11:06 +0000 (16:11 +0200)]
v3-6-ctdb: Bump ctdb vendor patch level to 25

12 years agov3-6-ctdb: bump ctdb vendor patch level to 24
Michael Adam [Mon, 5 Sep 2011 15:09:37 +0000 (17:09 +0200)]
v3-6-ctdb: bump ctdb vendor patch level to 24

12 years agov3-6-ctdb: bump version number to 23
Christian Ambach [Wed, 31 Aug 2011 15:10:40 +0000 (17:10 +0200)]
v3-6-ctdb: bump version number to 23

12 years agov3-6-ctdb: bump vendor level to 22
Christian Ambach [Thu, 25 Aug 2011 11:52:04 +0000 (13:52 +0200)]
v3-6-ctdb: bump vendor level to 22

12 years agov3-6-ctdb: VERSION: Bump the ctdb vendor patch level to 21
Michael Adam [Tue, 23 Aug 2011 12:36:52 +0000 (14:36 +0200)]
v3-6-ctdb: VERSION: Bump the ctdb vendor patch level to 21

12 years agov3-6-ctdb: VERSION: Bump the ctdb vendor patch level to 20
Michael Adam [Mon, 15 Aug 2011 15:40:21 +0000 (17:40 +0200)]
v3-6-ctdb: VERSION: Bump the ctdb vendor patch level to 20

12 years agov3-6-ctdb: VERSION bump vendor patch level to 19
Volker Lendecke [Tue, 9 Aug 2011 14:54:46 +0000 (16:54 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 19

12 years agov3-6-ctdb: VERSION bump vendor patch level to 18
Volker Lendecke [Tue, 9 Aug 2011 08:46:42 +0000 (10:46 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 18

12 years agov3-6-ctdb: bump vendor patch level to 17
Volker Lendecke [Wed, 3 Aug 2011 09:26:26 +0000 (11:26 +0200)]
v3-6-ctdb: bump vendor patch level to 17

12 years agov3-6-ctdb: VERSION: Bump vendor patch level to 16
Michael Adam [Wed, 27 Jul 2011 11:07:56 +0000 (13:07 +0200)]
v3-6-ctdb: VERSION: Bump vendor patch level to 16

12 years agov3-6-ctdb: bump vendor patch level to 15
Michael Adam [Tue, 21 Jun 2011 15:45:49 +0000 (17:45 +0200)]
v3-6-ctdb: bump vendor patch level to 15

12 years agov3-6-ctdb: bump vendor patch level to 14
Michael Adam [Tue, 21 Jun 2011 15:45:49 +0000 (17:45 +0200)]
v3-6-ctdb: bump vendor patch level to 14

12 years agov3-6-ctdb: VERSION bump vendor patch level to 13
Michael Adam [Thu, 9 Jun 2011 15:16:53 +0000 (17:16 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 13

12 years agov3-6-ctdb: VERSION bump vendor patch level to 12
Michael Adam [Wed, 30 Mar 2011 14:40:48 +0000 (16:40 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 12

12 years agov3-6-ctdb: VERSION bump vendor patch level to 11
Volker Lendecke [Mon, 16 May 2011 09:40:46 +0000 (11:40 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 11

12 years agov3-6-ctdb: VERSION bump vendor patch level to 10
Volker Lendecke [Wed, 27 Apr 2011 12:23:51 +0000 (14:23 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 10

12 years agov3-6-ctdb: VERSION bump vendor patch level to 9
Volker Lendecke [Mon, 18 Apr 2011 09:44:13 +0000 (11:44 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 9

12 years agov3-6-ctdb: packaging(RHEL-CTDB): package the gpfs_prefetch vfs module
Volker Lendecke [Fri, 5 Mar 2010 15:10:49 +0000 (16:10 +0100)]
v3-6-ctdb: packaging(RHEL-CTDB): package the gpfs_prefetch vfs module

12 years agov3-6-ctdb: s3:vfs: Add a gpfs_prefetch module.
Volker Lendecke [Fri, 21 Jan 2011 13:07:15 +0000 (14:07 +0100)]
v3-6-ctdb: s3:vfs: Add a gpfs_prefetch module.

This can not go upstream yet because it uses the gpfs_fcntl call
from the non-GPL libgpfs.

12 years agov3-6-ctdb: VERSION bump vendor patch level to 8
Michael Adam [Wed, 30 Mar 2011 14:40:48 +0000 (16:40 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 8

12 years agov3-6-ctdb: VERSION bump vendor patch level to 7
Volker Lendecke [Wed, 30 Mar 2011 14:40:48 +0000 (16:40 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 7

12 years agov3-6-ctdb: VERSION bump vendor patch level to 6
Volker Lendecke [Tue, 29 Mar 2011 10:49:40 +0000 (12:49 +0200)]
v3-6-ctdb: VERSION bump vendor patch level to 6

12 years agov3-6-ctdb: VERSION bump vendor patch level to 5
Michael Adam [Wed, 9 Feb 2011 23:37:30 +0000 (00:37 +0100)]
v3-6-ctdb: VERSION bump vendor patch level to 5

12 years agov3-6-ctdb: VERSION bump vendor patch level to 4
Michael Adam [Wed, 9 Feb 2011 23:37:30 +0000 (00:37 +0100)]
v3-6-ctdb: VERSION bump vendor patch level to 4

12 years agov3-6-ctdb: VERSION bump vendor patch level to 3
Michael Adam [Wed, 9 Feb 2011 23:37:30 +0000 (00:37 +0100)]
v3-6-ctdb: VERSION bump vendor patch level to 3

12 years agov3-6-ctdb: VERSION bump vendor patch level to 2
Michael Adam [Wed, 9 Feb 2011 23:37:30 +0000 (00:37 +0100)]
v3-6-ctdb: VERSION bump vendor patch level to 2

12 years agov3-6-ctdb: s3: Add the "net groupfilter" command
Volker Lendecke [Sun, 14 Dec 2008 23:16:56 +0000 (00:16 +0100)]
v3-6-ctdb: s3: Add the "net groupfilter" command

This is the start of a bad hack for even worse systems: Many Unix systems still
have the NGROUPS problem: A user can not be member of more than a very limited
number of groups. Solaris for example limits this to 16 by default. Many
Windows environments have a *LOT* more groups per user, some even go to
hundreds. Whether that is efficient is debatable, but it's there.

This patch implements the

"net groupfilter"

command with the "addsid", "delsid" and "list" subcommands. If any SIDs are
present according to "net groupfilter list" (they are stored in secrets.tdb),
then only the SIDs in that list are converted to GIDs for a user at login time.

This gives the Administrator the possibility to define a set of groups that are
used on the Unix box, making sure that no user is in more than NGROUPS of those
at a time.

This patch is incomplete in the sense that winbind is not aware of this, only
smbd. So it is kind of an emergency hack for smbd-only machines.

Volker

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agov3-6-ctdb: apply patch from v3-0-ctdb to special case root in libnss_winbind
Andrew Tridgell [Mon, 21 Apr 2008 16:41:32 +0000 (18:41 +0200)]
v3-6-ctdb: apply patch from v3-0-ctdb to special case root in libnss_winbind

This is needed to ensure the administrator can login to a node even
when ctdbd and winbindd are stuck

12 years agov3-6-ctdb: add README.v3-6-ctdb
Michael Adam [Tue, 18 Jan 2011 12:19:55 +0000 (13:19 +0100)]
v3-6-ctdb: add README.v3-6-ctdb

12 years agov3-6-ctdb: VERSION: add vendor-suffix "ctdb" and vendor-patch level "1"
Michael Adam [Tue, 23 Jun 2009 14:41:38 +0000 (16:41 +0200)]
v3-6-ctdb: VERSION: add vendor-suffix "ctdb" and vendor-patch level "1"

Michael

following the versioning scheme of the v3-2-ctdb branch

Michael

12 years agos3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record...
Michael Adam [Wed, 12 Oct 2011 10:04:50 +0000 (12:04 +0200)]
s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record in traverse

It did not compare the last charcter (usually '\0')

12 years agos3:dbwrap_ctdb: fix check for skipping the __db_sequence_number__ in traverse
Michael Adam [Wed, 12 Oct 2011 10:03:42 +0000 (12:03 +0200)]
s3:dbwrap_ctdb: fix check for skipping the __db_sequence_number__ in traverse

12 years agos3:registry: fix a debug message in the v2_to_v3 upgrade code
Michael Adam [Tue, 13 Sep 2011 15:11:04 +0000 (17:11 +0200)]
s3:registry: fix a debug message in the v2_to_v3 upgrade code

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Sep 19 10:31:45 CEST 2011 on sn-devel-104

12 years agos3:g_lock: add a missing \n to a debug message in g_lock_init
Michael Adam [Mon, 19 Sep 2011 20:30:57 +0000 (22:30 +0200)]
s3:g_lock: add a missing \n to a debug message in g_lock_init

12 years agos3:net: registry: avoid unnecessary initialization of the registry.
Gregor Beck [Mon, 26 Sep 2011 11:42:15 +0000 (13:42 +0200)]
s3:net: registry: avoid unnecessary initialization of the registry.

This allows for using help without having access to the registry and
prevents update code to run if only a readonly check is to be performed.

12 years agos3:doc manpage for "net registry check"
Gregor Beck [Thu, 25 Aug 2011 14:26:25 +0000 (16:26 +0200)]
s3:doc manpage for "net registry check"

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:net: add command registry check
Gregor Beck [Thu, 30 Jun 2011 10:08:16 +0000 (12:08 +0200)]
s3:net: add command registry check

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:net: factor out interact_edit()
Gregor Beck [Thu, 18 Aug 2011 12:13:28 +0000 (14:13 +0200)]
s3:net: factor out interact_edit()

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:registry add function srprs_hive()
Gregor Beck [Tue, 12 Jul 2011 11:04:37 +0000 (13:04 +0200)]
s3:registry add function srprs_hive()

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value
Gregor Beck [Thu, 7 Jul 2011 12:50:47 +0000 (14:50 +0200)]
s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value

12 years agos3:dbwrap: remove m_all marshall buffer from ctdb transaction.
Gregor Beck [Fri, 23 Sep 2011 09:58:35 +0000 (11:58 +0200)]
s3:dbwrap: remove m_all marshall buffer from ctdb transaction.

it was only used by ctdb_replay_transaction and was a actually write only

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: traverse records created within this transaction.
Gregor Beck [Thu, 22 Sep 2011 11:58:24 +0000 (13:58 +0200)]
s3:dbwrap: traverse records created within this transaction.

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: add function dbwrap_traverse_read()
Gregor Beck [Wed, 31 Aug 2011 12:18:09 +0000 (14:18 +0200)]
s3:dbwrap: add function dbwrap_traverse_read()

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: fix db_rbt_traverse() to return the record count on success
Gregor Beck [Wed, 17 Aug 2011 09:44:12 +0000 (11:44 +0200)]
s3:dbwrap: fix db_rbt_traverse() to return the record count on success

this makes it consistent with documented behaviour of tdb_traverse()

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_rbt
Gregor Beck [Tue, 16 Aug 2011 12:55:30 +0000 (14:55 +0200)]
s3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_rbt

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_tdb
Gregor Beck [Tue, 16 Aug 2011 12:43:29 +0000 (14:43 +0200)]
s3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_tdb

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: add function dbwrap_wipe()
Gregor Beck [Tue, 16 Aug 2011 12:39:19 +0000 (14:39 +0200)]
s3:dbwrap: add function dbwrap_wipe()

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: add specific dbwrap_exists implementation to dbwrap_rbt
Gregor Beck [Mon, 4 Jul 2011 08:22:46 +0000 (10:22 +0200)]
s3:dbwrap: add specific dbwrap_exists implementation to dbwrap_rbt

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: factor out db_rpt_search_internal
Gregor Beck [Mon, 4 Jul 2011 07:54:31 +0000 (09:54 +0200)]
s3:dbwrap: factor out db_rpt_search_internal

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: add specific dbwrap_exists implementation to dbwrap_tdb
Gregor Beck [Mon, 4 Jul 2011 08:27:17 +0000 (10:27 +0200)]
s3:dbwrap: add specific dbwrap_exists implementation to dbwrap_tdb

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: add function dbwrap_exists()
Gregor Beck [Mon, 4 Jul 2011 08:15:44 +0000 (10:15 +0200)]
s3:dbwrap: add function dbwrap_exists()

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3-vfs: Fix vfs_chown_fsp.
Jeremy Allison [Sat, 20 Aug 2011 18:47:40 +0000 (20:47 +0200)]
s3-vfs: Fix vfs_chown_fsp.

Fix bug #8370 (vfs_chown_fsp broken -- returns in the wrong directory).

12 years agos3-docs: some corrections for wbinfo
Christian Ambach [Fri, 30 Sep 2011 15:07:05 +0000 (17:07 +0200)]
s3-docs: some corrections for wbinfo

Parameters for --group-info and --gid-info were not listed
properly in the SYNOPSIS and the OPTIONS section

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Fri Sep 30 18:44:34 CEST 2011 on sn-devel-104

12 years agos3:registry: improve regdb_create_subkey_internal() to always complete incomlete...
Michael Adam [Fri, 30 Sep 2011 13:42:31 +0000 (15:42 +0200)]
s3:registry: improve regdb_create_subkey_internal() to always complete incomlete keys

Originally, this function did not create the key's subkey list record if only
the record was listed in the subkeylist of its parent key. Now this is fixed.

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

12 years agos3:registry: fix the test for a REG_SZ blob possibly being a zero terminated ucs2...
Michael Adam [Thu, 29 Sep 2011 16:06:56 +0000 (18:06 +0200)]
s3:registry: fix the test for a REG_SZ blob possibly being a zero terminated ucs2 string

1. catch data blobs with odd number of bytes (not an ucs2 string at all)
2. test the right ucs2 character to be 0
   (prevent out-of bounds access/potential segfault)

12 years agos3:registry: fix a debug message typo
Michael Adam [Thu, 1 Sep 2011 22:36:21 +0000 (00:36 +0200)]
s3:registry: fix a debug message typo

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Sep  2 11:47:11 CEST 2011 on sn-devel-104

12 years agos3:registry: introduce a define REGDB_CODE_VERSION and use it in regdb code.
Michael Adam [Thu, 1 Sep 2011 22:34:12 +0000 (00:34 +0200)]
s3:registry: introduce a define REGDB_CODE_VERSION and use it in regdb code.

This is to not use the precise code version REGDB_VERSION_V3 explicitly
in the code.

12 years agos3:registry: rename REGVE_Vx toREGDB_VERSION_Vx for consistency
Michael Adam [Thu, 1 Sep 2011 22:07:58 +0000 (00:07 +0200)]
s3:registry: rename REGVE_Vx toREGDB_VERSION_Vx for consistency

12 years agos3:registry: implement regdb_set_secdesc() with regdb_trans_do()
Michael Adam [Tue, 30 Aug 2011 14:30:01 +0000 (16:30 +0200)]
s3:registry: implement regdb_set_secdesc() with regdb_trans_do()

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Sep  2 00:51:40 CEST 2011 on sn-devel-104

12 years agos3:registry: implement regdb_store_values() with regdb_trans_do()
Michael Adam [Tue, 30 Aug 2011 12:06:22 +0000 (14:06 +0200)]
s3:registry: implement regdb_store_values() with regdb_trans_do()

This adds the runtime check for changed regdb format version to store_values

12 years agos3:registry: change regdb_store_values_internal() from bool to NTSTATUS return code
Michael Adam [Tue, 30 Aug 2011 14:11:01 +0000 (16:11 +0200)]
s3:registry: change regdb_store_values_internal() from bool to NTSTATUS return code

12 years agos3:registry: use the regdb_trans_do wrapper instead of using dbwrap_trans_do directly...
Michael Adam [Tue, 30 Aug 2011 14:00:21 +0000 (16:00 +0200)]
s3:registry: use the regdb_trans_do wrapper instead of using dbwrap_trans_do directly in the registry db code.

This verifies the regdb format version number before the corresponding write operations.

12 years agos3:registry: add regdb_trans_do(): a transaction wrapper that will check the regdb...
Michael Adam [Mon, 29 Aug 2011 15:06:27 +0000 (17:06 +0200)]
s3:registry: add regdb_trans_do(): a transaction wrapper that will check the regdb version

If the version has changed since initialization, the write will
fail with ACCESS_DENIED.

12 years agos3:registry: drop log level of unknown regdb version message in regdb_init() to 0
Michael Adam [Tue, 30 Aug 2011 13:59:30 +0000 (15:59 +0200)]
s3:registry: drop log level of unknown regdb version message in regdb_init() to 0

12 years agos3:registry: reg_format: handle unterminated REG_SZ blobs
Gregor Beck [Tue, 6 Sep 2011 07:24:10 +0000 (09:24 +0200)]
s3:registry: reg_format: handle unterminated REG_SZ blobs

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record...
Michael Adam [Tue, 27 Sep 2011 14:06:48 +0000 (16:06 +0200)]
s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record in traverse

It did not compare the last charcter (usually '\0')

12 years agos3:dbwrap_ctdb: skip the internal __db_sequence_number__ key from (persistent) traver...
Michael Adam [Tue, 20 Sep 2011 02:33:31 +0000 (04:33 +0200)]
s3:dbwrap_ctdb: skip the internal __db_sequence_number__ key from (persistent) traverse and traverse_read

This is is used internally in the persistent transactions and should not surface.

12 years agos3: Fix \name handed into WINBINDD_LOOKUPNAME
Volker Lendecke [Thu, 8 Sep 2011 14:43:06 +0000 (16:43 +0200)]
s3: Fix \name handed into WINBINDD_LOOKUPNAME

This fooled winbind into believing we have a qualified name

12 years agos3: Actually stop guessing in lookup_name if we were given a domain
Volker Lendecke [Thu, 8 Sep 2011 12:54:57 +0000 (14:54 +0200)]
s3: Actually stop guessing in lookup_name if we were given a domain

12 years agos3: Pass up domain name from msrpc name_to_sid
Volker Lendecke [Thu, 8 Sep 2011 12:00:35 +0000 (14:00 +0200)]
s3: Pass up domain name from msrpc name_to_sid

This fixes a bug where winbind caching did the wrong thing. rpcclient
lookupnames for \\domain admins (without domain) followed by a wbinfo -s <sid>
made the wbinfo call return \\domain admins as name, not the one with the
correct domain prefix.

12 years agos3: Fix a debug message
Volker Lendecke [Thu, 8 Sep 2011 11:15:21 +0000 (13:15 +0200)]
s3: Fix a debug message

12 years agos3: Give name_to_sid the chance to return names
Volker Lendecke [Tue, 6 Sep 2011 15:32:50 +0000 (17:32 +0200)]
s3: Give name_to_sid the chance to return names

12 years agos3: Add debug messages to the lookup name process
Volker Lendecke [Thu, 8 Sep 2011 08:44:53 +0000 (10:44 +0200)]
s3: Add debug messages to the lookup name process

12 years agos3:dbwrap_ctdb: improve error message in transaction destructor
Gregor Beck [Mon, 5 Sep 2011 15:07:37 +0000 (17:07 +0200)]
s3:dbwrap_ctdb: improve error message in transaction destructor

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3: let g_lock_unlock() return more specific status codes on failure
Gregor Beck [Wed, 31 Aug 2011 08:19:18 +0000 (10:19 +0200)]
s3: let g_lock_unlock() return more specific status codes on failure

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3: Fix smbcontrol smbd idmap kill S-1-5-21-...
Volker Lendecke [Mon, 5 Sep 2011 11:11:59 +0000 (13:11 +0200)]
s3: Fix smbcontrol smbd idmap kill S-1-5-21-...

The calls to sid_to_gid and sid_to_uid create id mapping entries themselves,
which makes it pretty difficult to reliably delete id mapping entries
everywhere just using a SID.

12 years agos3:idmap/autorid add a small alloc pool to autorid
Christian Ambach [Wed, 31 Aug 2011 16:28:51 +0000 (18:28 +0200)]
s3:idmap/autorid add a small alloc pool to autorid

this is needed to allocate gids for BUILTIN\Users and
BUILTIN\Administrators

gids are stored at the start of the first domain
as RIDs start with values over 500, we have some room there
so we do not need to allocate a range

12 years agos3: Fix bug 8334, do not fork the echo handler for smb2
Volker Lendecke [Wed, 31 Aug 2011 13:06:35 +0000 (15:06 +0200)]
s3: Fix bug 8334, do not fork the echo handler for smb2

If a smb1 negprot negotiated smb2 we forked the echo responder. This will
eventually lead to a panic from

[2011/08/30 10:33:29.212578,  0, pid=3846917] smbd/smb2_server.c:243(smbd_smb2_request_create)
  Invalid SMB packet: first request: 0x0009

because from the echo responder we always read using the normal smb1 protocol
handling routine. If that is a bit down the smb2 stream, we get a non-negprot
packet and panic.

BTW, the echo responder is not required for smb2 anyway, Microsoft confirmed
that it probes the server liveness using TCP keepalives and not smb2 echo
requests.

12 years agos3:smb2 fix Bug 8428 - wrong reply to DHnC (durable handle reconnect)
Christian Ambach [Tue, 30 Aug 2011 15:39:56 +0000 (17:39 +0200)]
s3:smb2 fix Bug 8428 - wrong reply to DHnC (durable handle reconnect)

According to [MS-SMB2] 3.3.5.9.7
(http://msdn.microsoft.com/en-us/library/cc246784%28v=PROT.13%29.aspx),
smbd must reply with NT_STATUS_OBJECT_NAME_NOT_FOUND as it does not
support durable file-handles yet.

I have seen w2k8r2 running xcopy /C ending up in an endless loop
trying to get back the original file handle from smbd sending the same
requests over and over.

Metze, Jeremy, please check!

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Aug 30 22:20:36 CEST 2011 on sn-devel-104

12 years agos3: Use sys_write in fork_domain_child
Volker Lendecke [Fri, 26 Aug 2011 09:39:41 +0000 (11:39 +0200)]
s3: Use sys_write in fork_domain_child

Counterpart for last checkin. A lot less likely, but not impossible in a child.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Aug 26 13:14:27 CEST 2011 on sn-devel-104

12 years agos3: Use sys_read in fork_domain_child
Volker Lendecke [Fri, 26 Aug 2011 09:38:21 +0000 (11:38 +0200)]
s3: Use sys_read in fork_domain_child

I've seen

[2011/08/26 01:44:10.872057,  1] winbindd/winbindd_dual.c:1336(fork_domain_child)
  fork_domain_child: Could not read child status: nread=-1, error=Interrupted system call

on a customer box. Not good.

12 years agos3: Fix a winbind race leading to 100% CPU
Volker Lendecke [Fri, 26 Aug 2011 14:54:18 +0000 (16:54 +0200)]
s3: Fix a winbind race leading to 100% CPU

This fixes a race condition that leads to the winbindd_children list becoming
corrupted. It happens when on a busy winbind SIGCHLD is a bit late.

Imagine a winbind with multiple requests in the queue for a single child. Child
dies, and before the SIGCHLD handler is called we find the socket to be dead.
wb_child_request_done is called, receiving an error from wb_simple_trans_recv.
It closes the socket. Then immediately the wb_child_request_trigger will do
another fork_domain_child before the signal handler is called. This means that
we do another fork_domain_child, we have child->sock==-1 at this point.
fork_domain_child will do a DLIST_ADD(winbindd_children, child) a second time
where the child is already part of that list. This corrupts the list. Then the
signal handler kicks in, spinning in

for (child = winbindd_children; child != NULL; child = child->next) {

forever. Not good. This patch makes sure that both conditions (sock==-1 and not
part of the list) for a winbindd_child struct match up.

12 years agos3:smb2 add some debugs
Christian Ambach [Thu, 25 Aug 2011 11:47:37 +0000 (13:47 +0200)]
s3:smb2 add some debugs

panic the process instead of returning so we get a backtrace
to help us analyse the intermittent problems

12 years agos3: Next step to fix MIT trusts
Volker Lendecke [Wed, 17 Aug 2011 10:05:26 +0000 (12:05 +0200)]
s3: Next step to fix MIT trusts

aa3f10c was not complete in the sense that it did not fully cover some
conditions that led to invalid domains in the winbind parent

12 years agos3: Increase a debug level in ads_find_dc
Volker Lendecke [Wed, 17 Aug 2011 09:58:57 +0000 (11:58 +0200)]
s3: Increase a debug level in ads_find_dc

This message can happen with AD trusts that winbind can not cope with. The
message is not really clear and not worth spamming syslog always.

12 years agos3:lib change default share security access mask
Christian Ambach [Tue, 26 Jul 2011 11:43:14 +0000 (13:43 +0200)]
s3:lib change default share security access mask

when there is no share SD set, the default share SD that
is used e.g. for the output of sharesec -v defaults to a
value that is not equivalent to the desired FULL access.

This is a more or less a cosmetical follow-up for the patches
in Bug #8201 that makes them more consumeable by printing
FULL (that is what the user expects) instead of a bitmask
in hexadecimal form.

previous output:
REVISION:1
OWNER:(NULL SID)
GROUP:(NULL SID)
ACL:S-1-1-0:ALLOWED/0/0x101f01ff

with patch:
REVISION:1
OWNER:(NULL SID)
GROUP:(NULL SID)
ACL:S-1-1-0:ALLOWED/0/FULL

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue Jul 26 15:57:55 CEST 2011 on sn-devel-104

12 years agos3: Priorize the async echo responder over the client
Volker Lendecke [Thu, 28 Jul 2011 12:24:40 +0000 (14:24 +0200)]
s3: Priorize the async echo responder over the client

Without this, an active client connection can starve the echo responder. This
leads to apparently "lost" SMBs.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jul 28 18:53:38 CEST 2011 on sn-devel-104

12 years agotevent: Slightly simplify poll_event_loop_poll
Volker Lendecke [Thu, 28 Jul 2011 12:09:13 +0000 (14:09 +0200)]
tevent: Slightly simplify poll_event_loop_poll

No real code change. Do an early return instead of an if-statement, avoiding
one level of indentation.

12 years agos3: Remove unused smbd_echo_reader()
Volker Lendecke [Tue, 26 Jul 2011 13:39:58 +0000 (15:39 +0200)]
s3: Remove unused smbd_echo_reader()

12 years agos3: Use smbd_echo_read_send in the async echo handler
Volker Lendecke [Tue, 26 Jul 2011 13:39:29 +0000 (15:39 +0200)]
s3: Use smbd_echo_read_send in the async echo handler

12 years agos3: Add smbd_echo_read_send/recv
Volker Lendecke [Tue, 26 Jul 2011 13:07:22 +0000 (15:07 +0200)]
s3: Add smbd_echo_read_send/recv

Read a SMB packet in the echo responder, giving the parent one second to step
in

12 years agoAdd wait_for_read_send/recv
Volker Lendecke [Tue, 26 Jul 2011 13:06:44 +0000 (15:06 +0200)]
Add wait_for_read_send/recv

Wait for readability of a socket as a tevent_req

12 years agos3:winbindd fix a return code check
Christian Ambach [Wed, 24 Aug 2011 14:21:37 +0000 (16:21 +0200)]
s3:winbindd fix a return code check

talloc_traverse_dict will return with -1 in case of an error and
might return positive values that indicate the count of found
entries

12 years agos3:smbcontrol: let smbd pass the idmap msg to its children for convenience
Gregor Beck [Wed, 24 Aug 2011 08:52:01 +0000 (10:52 +0200)]
s3:smbcontrol: let smbd pass the idmap msg to its children for convenience

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:registry: fix the v2_to_v3 upgrade code so that it does not create value list...
Michael Adam [Tue, 23 Aug 2011 23:14:22 +0000 (01:14 +0200)]
s3:registry: fix the v2_to_v3 upgrade code so that it does not create value list security records for the INFO/version key ...

12 years agos3:registry: fix the v1_to_v2 upgrade code so that it does not normalize the INFO...
Michael Adam [Tue, 23 Aug 2011 23:13:47 +0000 (01:13 +0200)]
s3:registry: fix the v1_to_v2 upgrade code so that it does not normalize the INFO/version key ...

12 years agos3:registry: define a constant REGDB_VERSION_KEYNAME for the key INFO/version (and...
Michael Adam [Tue, 23 Aug 2011 23:12:28 +0000 (01:12 +0200)]
s3:registry: define a constant REGDB_VERSION_KEYNAME for the key INFO/version (and use it)