samba.git
4 years agos3:libnet: remove unused variables
Stefan Metzmacher [Wed, 18 Mar 2015 08:51:16 +0000 (09:51 +0100)]
s3:libnet: remove unused variables

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agolibcli/auth: add forward declaration for struct wkssvc_PasswordBuffer
Stefan Metzmacher [Wed, 18 Mar 2015 08:50:44 +0000 (09:50 +0100)]
libcli/auth: add forward declaration for struct wkssvc_PasswordBuffer

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibcli/auth: add some const to netlogon_creds_server_{init,step_check}()
Stefan Metzmacher [Thu, 19 Mar 2015 15:26:03 +0000 (16:26 +0100)]
libcli/auth: add some const to netlogon_creds_server_{init,step_check}()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-tests: Avoid early exits in scripts that appear on tail of a pipe
Amitay Isaacs [Fri, 20 Mar 2015 03:36:51 +0000 (14:36 +1100)]
ctdb-tests: Avoid early exits in scripts that appear on tail of a pipe

When executing a shell script code "foo | bar", if "bar" terminates early,
then "foo" can get I/O error when writing to stdout.

The tdbtool stub did not wait to read anything from stdin when it is
expected to.  This would cause tests to fail randomly under load when
tdbtool process exited early.

Similarly, debug function read from stdin only under certain conditions
(higher debug and when not reading from tty).  Otherwise, exited early.

Thanks to Andrew Bartlett for noticing the problem and Catalyst Cloud
(http://catalyst.net.nz/cloud) for providing resources to test fixes.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Mar 20 16:26:37 CET 2015 on sn-devel-104

4 years agoctdb-scripts: Simplify 00.ctdb event script
Amitay Isaacs [Thu, 19 Mar 2015 14:30:55 +0000 (01:30 +1100)]
ctdb-scripts: Simplify 00.ctdb event script

Avoid extra which commands.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agobackupkey: Use ndr_pull_struct_blob_all()
Andrew Bartlett [Fri, 20 Mar 2015 01:32:00 +0000 (14:32 +1300)]
backupkey: Use ndr_pull_struct_blob_all()

This avoids bad decrypts from falling down to later code and getting
the error code wrong, by strictly requiring the NDR parse to use all the
data.  A bad decyrpt is very unlikely to get the length correct, and
so fall down to the other checks.

This should fix:
UNEXPECTED(failure): samba4.rpc.backupkey with seal.backupkey.server_wrap_decrypt_wrong_r2(ad_dc_ntvfs)
REASON: Exception: Exception: ../source4/torture/rpc/backupkey.c:1926: r.out.result was WERR_INVALID_ACCESS, expected WERR_INVALID_PARAM: decrypt should fail with WERR_INVALID_PARAM

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11174
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
4 years agolibcli/auth: Match Declaration of netlogon_creds_cli_context_tmp with implementation
Thomas Schulz [Mon, 16 Mar 2015 17:21:46 +0000 (10:21 -0700)]
libcli/auth: Match Declaration of netlogon_creds_cli_context_tmp with implementation

I have been building 4.2.0 with the GNU C compiler but I decided to see
how it works with the Sun C 5.11 compiler. The Sun compiler complains
about a identifier being redeclared in libcli/auth/netlogon_creds_cli.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11140

Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agodsdb-tests: Give more helpful information about attribute differences
Andrew Bartlett [Thu, 19 Mar 2015 05:35:05 +0000 (18:35 +1300)]
dsdb-tests: Give more helpful information about attribute differences

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agos3: lib: libsmbclient: If reusing a server struct, check every cli->timout milisecond...
Jeremy Allison [Wed, 18 Mar 2015 21:15:16 +0000 (14:15 -0700)]
s3: lib: libsmbclient: If reusing a server struct, check every cli->timout miliseconds if it's still valid before use.

Uses an cli_echo() call to do so.

Based on code from <shargagan@novell.com>

Bug 11079 - libsmbclient not checking the cached connection alive status before re-using it from connection cache

https://bugzilla.samba.org/show_bug.cgi?id=11079

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Mar 20 13:48:26 CET 2015 on sn-devel-104

4 years agos3: libcli: smb1: Ensure we correctly finish a tevent req if the writev fails in...
Jeremy Allison [Thu, 19 Mar 2015 17:40:56 +0000 (10:40 -0700)]
s3: libcli: smb1: Ensure we correctly finish a tevent req if the writev fails in the SMB1 case.

We haven't added the req to the pending array yet, as SMB1 requests can
be one-way (no reply needed). So if we error out after the writev, but
before we add to the pending array we must rember to terminate our current
tevent req with a tevent_req_nterror call.

Fixes bug 11173 - SMB1 Server disconnect can cause timeout on client write error.

https://bugzilla.samba.org/show_bug.cgi?id=11173

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Mar 20 05:08:25 CET 2015 on sn-devel-104

4 years agoselftest: mark the samba4.blackbox.dbcheck test as flapping.
Michael Adam [Thu, 19 Mar 2015 15:59:42 +0000 (16:59 +0100)]
selftest: mark the samba4.blackbox.dbcheck test as flapping.

This causes frequent autobuild failures recently as follows:

[1730(16550)/1735 at 2h7m43s] samba4.blackbox.dbcheck(ad_dc_ntvfs)
UNEXPECTED(failure): samba4.blackbox.dbcheck(ad_dc_ntvfs).dbcheck(ad_dc_ntvfs:local)
REASON: Exception: Exception: Checking 6799 objects
ERROR: wrong dn[CN=DrsDelObjUser_1426756150,CN=Deleted Objects,DC=samba,DC=example,DC=com] name='DrsDelObjUser_1426756150
DEL:77ec48cb-06cc-4157-a565-770720c30929' new_dn[CN=DrsDelObjUser_1426756150

FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)

Has been seen flapping since quite some time:

https://git.samba.org/autobuild.flakey/2012-06-22-0340/samba.stdout
https://git.samba.org/autobuild.flakey/2012-06-25-2339/samba.stdout
https://git.samba.org/autobuild.flakey/2012-07-02-1741/samba.stdout
https://git.samba.org/autobuild.flakey/2012-07-31-1344/samba.stdout
https://git.samba.org/autobuild.flakey/2012-09-24-1331/samba.stdout
https://git.samba.org/autobuild.flakey/2012-11-21-0933/samba.stdout
https://git.samba.org/autobuild.flakey/2012-12-02-0140/samba.stdout
https://git.samba.org/autobuild.flakey/2012-12-11-1933/samba.stdout
...
https://git.samba.org/autobuild.flakey/2014-08-20-1715/samba.stdout
https://git.samba.org/autobuild.flakey/2014-09-29-0222/samba.stdout
https://git.samba.org/autobuild.flakey/2014-12-13-1119/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-19-0529/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-19-0828/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-19-1128/samba.stdout

Possibly related to the failure of tombstone_ranimation,
drs.delete_object, and blackbox.samba_tool_demote.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Mar 19 20:43:32 CET 2015 on sn-devel-104

4 years agoselftest: mark the samba4.blackbox.samba_tool_demote test flakey.
Michael Adam [Thu, 19 Mar 2015 15:55:18 +0000 (16:55 +0100)]
selftest: mark the samba4.blackbox.samba_tool_demote test flakey.

This is causing frequent autobuild failures lately like this:

[1695(11293)/1735 at 1h54m54s] samba4.blackbox.samba_tool_demote(promoted_dc)
Using localdc as partner server for the demotion
Deactivating inbound replication
Asking partner server localdc to synchronize from us
Error while demoting, re-enabling inbound replication
ERROR(<class 'samba.drs_utils.drsException'>): Error while sending a DsReplicaSync for partion CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com - drsException: DsReplicaSync failed (8442, 'WERR_DS_DRA_INTERNAL_ERROR')
  File "bin/python/samba/netcmd/domain.py", line 712, in run
    sendDsReplicaSync(drsuapiBind, drsuapi_handle, ntds_guid, str(part), drsuapi.DRSUAPI_DRS_WRIT_REP)
  File "bin/python/samba/drs_utils.py", line 83, in sendDsReplicaSync
    raise drsException("DsReplicaSync failed %s" % estr)
UNEXPECTED(failure): samba4.blackbox.samba_tool_demote(promoted_dc).demote(promoted_dc)
REASON: Exception: Exception: No reason specified

FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)

Also seen from time to time in intermittent autobuild failure checks:

https://git.samba.org/autobuild.flakey/2012-07-10-0942/samba.stdout
https://git.samba.org/autobuild.flakey/2012-07-15-1142/samba.stdout
https://git.samba.org/autobuild.flakey/2012-08-05-1944/samba.stdout
https://git.samba.org/autobuild.flakey/2013-01-12-0931/samba.stdout
https://git.samba.org/autobuild.flakey/2013-01-16-1936/samba.stdout
https://git.samba.org/autobuild.flakey/2013-01-21-2330/samba.stdout
https://git.samba.org/autobuild.flakey/2013-01-26-0528/samba.stdout
...
https://git.samba.org/autobuild.flakey/2014-11-13-2305/samba.stdout
https://git.samba.org/autobuild.flakey/2014-11-15-1710/samba.stdout
https://git.samba.org/autobuild.flakey/2014-11-21-0505/samba.stdout
https://git.samba.org/autobuild.flakey/2014-11-27-0810/samba.stdout
https://git.samba.org/autobuild.flakey/2014-11-30-0215/samba.stdout
https://git.samba.org/autobuild.flakey/2014-12-04-1409/samba.stdout
https://git.samba.org/autobuild.flakey/2015-01-14-2008/samba.stdout
https://git.samba.org/autobuild.flakey/2015-01-31-2010/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-19-1415/samba.stdout

Possibly related to the flakeyness of the tombstone_reanimation
test and the drs.delete_object tests.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2b test.
Michael Adam [Thu, 19 Mar 2015 15:45:09 +0000 (16:45 +0100)]
s3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2b test.

This variant of the fdpass2 test tests the non-queuing fast path
by sumbitting sending a message without payload, only sending
the fds.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2a test.
Michael Adam [Thu, 19 Mar 2015 11:47:53 +0000 (12:47 +0100)]
s3:torture: add samba3.smbtorture_s3.LOCAL-MESSAGING-FDPASS2a test.

This variant of the fdpass2 test tests the non-queuing fast path
by sending a message with only a very small payload.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:torture: prepare the FDPASS2 test to be run with variable payload sizes.
Michael Adam [Thu, 19 Mar 2015 11:40:30 +0000 (12:40 +0100)]
s3:torture: prepare the FDPASS2 test to be run with variable payload sizes.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agofix failing fd passing message by passing needed buffer size
Noel Power [Wed, 18 Mar 2015 18:15:17 +0000 (18:15 +0000)]
fix failing fd passing message by passing needed buffer size

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
4 years agovfs_ceph: remove cephwrap_init_stat_ex_from_stat()
Yan, Zheng [Wed, 18 Mar 2015 03:34:25 +0000 (11:34 +0800)]
vfs_ceph: remove cephwrap_init_stat_ex_from_stat()

cephwrap_init_stat_ex_from_stat() lacks code that makes 'create'
timestamp. Besides that, it's identical to init_stat_ex_from_stat().

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
4 years agovfs_ceph: fix ntimes_fn callback
Yan, Zheng [Thu, 19 Mar 2015 01:58:45 +0000 (09:58 +0800)]
vfs_ceph: fix ntimes_fn callback

add null timespec check for atime/mtime. Also add code that stores
create_time by EA.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
4 years agobuild: Add talloc and samba-debug dep for gensec_external module
Andrew Bartlett [Thu, 19 Mar 2015 05:23:09 +0000 (18:23 +1300)]
build: Add talloc and samba-debug dep for gensec_external module

On a host without a talloc.h, this caused the build to fail

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Mar 19 18:01:09 CET 2015 on sn-devel-104

4 years agos3: lib: ntlmssp: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that...
Jeremy Allison [Mon, 9 Mar 2015 21:27:43 +0000 (14:27 -0700)]
s3: lib: ntlmssp: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that don't send the 2 unused fields.

Packet traces showing such servers are found in the bug this fixes:

https://bugzilla.samba.org/show_bug.cgi?id=10016

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Mar 19 12:05:56 CET 2015 on sn-devel-104

4 years agos4: lib: auth: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that...
Jeremy Allison [Mon, 9 Mar 2015 21:21:22 +0000 (14:21 -0700)]
s4: lib: auth: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that don't send the 2 unused fields.

Packet traces showing such servers are found in the bug this fixes:

https://bugzilla.samba.org/show_bug.cgi?id=10016

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoUpdate update-external.sh to use mirrors of third party projects on git.samba.org.
Jelmer Vernooij [Wed, 18 Mar 2015 02:20:02 +0000 (03:20 +0100)]
Update update-external.sh to use mirrors of third party projects on git.samba.org.

Change-Id: Id86c3f5233224d0337efc8e5fefe9a966b0c30fd
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 19 02:50:49 CET 2015 on sn-devel-104

4 years agoselftet: fix the flapping entry for the drs.delete_object test.
Michael Adam [Wed, 18 Mar 2015 16:41:42 +0000 (17:41 +0100)]
selftet: fix the flapping entry for the drs.delete_object test.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Mar 19 00:09:23 CET 2015 on sn-devel-104

4 years agoselftest: fix the flapping entry for the tombstone reanimation test
Michael Adam [Wed, 18 Mar 2015 16:41:11 +0000 (17:41 +0100)]
selftest: fix the flapping entry for the tombstone reanimation test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agotorture/ioctl: add simple FSCTL_FILE_LEVEL_TRIM test
David Disseldorp [Thu, 12 Mar 2015 10:01:17 +0000 (11:01 +0100)]
torture/ioctl: add simple FSCTL_FILE_LEVEL_TRIM test

This test writes out a 128K file and then attempts to trim the first
half of the file. Trim support is first detected using an
FS_SECTOR_SIZE_INFORMATION query-info request. If the server doesn't
support trim, then the test is skipped.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 18 21:32:47 CET 2015 on sn-devel-104

4 years agoidl: FSCTL_FILE_LEVEL_TRIM request & response structs
David Disseldorp [Wed, 11 Mar 2015 13:50:16 +0000 (14:50 +0100)]
idl: FSCTL_FILE_LEVEL_TRIM request & response structs

As defined in MS-FSCC 2.3.73 - 2.3.74.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotorture: test FS_SECTOR_SIZE_INFORMATION queries
David Disseldorp [Fri, 13 Mar 2015 00:06:26 +0000 (01:06 +0100)]
torture: test FS_SECTOR_SIZE_INFORMATION queries

The smb2.fsinfo test is run against ntvfs and s3fs. With both now
offering support for the FS_SECTOR_SIZE_INFORMATION query-info level,
it can be added to the existing level enumeration.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4/ntvfs: support FS_SECTOR_SIZE_INFORMATION query-info
David Disseldorp [Fri, 13 Mar 2015 00:00:51 +0000 (01:00 +0100)]
s4/ntvfs: support FS_SECTOR_SIZE_INFORMATION query-info

Return the same values as used by s3fs.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4/client: add FS_SECTOR_SIZE_INFORMATION query support
David Disseldorp [Thu, 12 Mar 2015 23:46:21 +0000 (00:46 +0100)]
s4/client: add FS_SECTOR_SIZE_INFORMATION query support

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/smbd: support FS_SECTOR_SIZE_INFORMATION query-info
David Disseldorp [Thu, 12 Mar 2015 23:34:58 +0000 (00:34 +0100)]
s3/smbd: support FS_SECTOR_SIZE_INFORMATION query-info

The FS_SECTOR_SIZE_INFORMATION query-info level reports sector alignment
information for an underlying share volume, as well as NO_SEEK_PENALTY
and TRIM_ENABLED flags useful for SSD / thin-provisioned storage
detection.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd/trans2: function scope qfsinfo bytes_per_sector
David Disseldorp [Thu, 12 Mar 2015 16:02:56 +0000 (17:02 +0100)]
smbd/trans2: function scope qfsinfo bytes_per_sector

It's needed for multiple info levels.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos4:kdc: fix realm for outgoing trusts in samba_kdc_trust_message2entry()
Stefan Metzmacher [Sun, 15 Mar 2015 21:25:49 +0000 (22:25 +0100)]
s4:kdc: fix realm for outgoing trusts in samba_kdc_trust_message2entry()

This is a regression introduced in commit
8dd37327b02eaea33915a9cd206667981b8df872.

Now we change 'realm' before calling
ret = krb5_principal_set_realm(context, entry_ex->entry.principal, realm);
as before commit 8dd37327b02eaea33915a9cd206667981b8df872.

Without this we'd set entry_ex->entry.principal to
krbtgt/DOMA.EXAMPLE.COM@DOMA.EXAMPLE.COM instead
of krbtgt/DOMA.EXAMPLE.COM@DOMB.EXAMPLE.COM,
while we use krbtgt/DOMA.EXAMPLE.COM@DOMB.EXAMPLE.COM as
salt for the keys.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Mar 18 18:56:51 CET 2015 on sn-devel-104

4 years agoselftest: the drs.delete_object is currently flakey.
Michael Adam [Wed, 18 Mar 2015 08:51:02 +0000 (09:51 +0100)]
selftest: the drs.delete_object is currently flakey.

See
https://git.samba.org/autobuild.flakey/2015-03-18-0813/samba.stdout

[1692(11281)/1735 at 1h54m29s] samba4.drs.delete_object.python(promoted_dc)(promoted_dc)
Testing for DrsDelObjUser_1426658948 with GUID 80f07b62-7edd-4175-8e5c-f44b6081f39c
UNEXPECTED(failure): samba4.drs.delete_object.python(promoted_dc).delete_object.DrsDeleteObjectTestCase.test_ReplicateDeletedObject1(promoted_dc)
REASON: Exception: Exception: Traceback (most recent call last):
  File "bin/python/samba/tests/__init__.py", line 113, in run
    testMethod()
  File "/memdisk/autobuild/fl/b21901/samba/source4/torture/drs/python/delete_object.py", line 214, in test_ReplicateDeletedObject1
    self._check_obj(sam_ldb=self.ldb_dc2, obj_orig=user_orig, is_deleted=True)
  File "/memdisk/autobuild/fl/b21901/samba/source4/torture/drs/python/delete_object.py", line 82, in _check_obj
    self.assertEquals(name_cur, name_orig + "\nDEL:" + guid_str)
AssertionError: 'DrsDelObjUser_1426658948' != 'DrsDelObjUser_1426658948\nDEL:80f07b62-7edd-4175-8e5c-f44b6081f39c'

FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)

There are many more occurrences:

https://git.samba.org/autobuild.flakey/2013-08-02-1537/samba.stdout
https://git.samba.org/autobuild.flakey/2013-08-04-1536/samba.stdout
https://git.samba.org/autobuild.flakey/2013-08-05-0336/samba.stdout
https://git.samba.org/autobuild.flakey/2013-08-09-1141/samba.stdout
https://git.samba.org/autobuild.flakey/2013-08-13-1537/samba.stdout
https://git.samba.org/autobuild.flakey/2013-08-14-0936/samba.stdout
https://git.samba.org/autobuild.flakey/2013-08-14-1736/samba.stdout
https://git.samba.org/autobuild.flakey/2013-08-15-1936/samba.stdout
...
https://git.samba.org/autobuild.flakey/2014-05-01-1707/samba.stdout
https://git.samba.org/autobuild.flakey/2014-05-03-1411/samba.stdout
https://git.samba.org/autobuild.flakey/2014-05-03-1710/samba.stdout
https://git.samba.org/autobuild.flakey/2014-05-04-1710/samba.stdout
https://git.samba.org/autobuild.flakey/2014-05-13-0507/samba.stdout
https://git.samba.org/autobuild.flakey/2014-05-23-1113/samba.stdout
https://git.samba.org/autobuild.flakey/2014-05-29-0213/samba.stdout
https://git.samba.org/autobuild.flakey/2014-06-02-0513/samba.stdout
https://git.samba.org/autobuild.flakey/2014-06-08-1713/samba.stdout
https://git.samba.org/autobuild.flakey/2014-06-09-0512/samba.stdout
https://git.samba.org/autobuild.flakey/2014-06-14-0214/samba.stdout
...
https://git.samba.org/autobuild.flakey/2015-03-02-0213/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-02-0813/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-03-0513/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-04-0811/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-07-1113/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-07-1713/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-08-2013/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-09-0813/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-09-2008/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-12-0807/samba.stdout

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Mar 18 15:20:57 CET 2015 on sn-devel-104

4 years agoselftest: the tombstone_reanimation test is currently flakey.
Michael Adam [Tue, 17 Mar 2015 22:00:03 +0000 (23:00 +0100)]
selftest: the tombstone_reanimation test is currently flakey.

See
https://git.samba.org/autobuild.flakey/2015-03-18-0456/samba.stdout

[1657(10627)/1735 at 1h37m36s] samba4.tombstone_reanimation.python(fl2003dc)
Test Container reanimation
UNEXPECTED(failure): samba4.tombstone_reanimation.python.tombstone_reanimation.RestoreContainerObjectTestCase.test_container(fl2003dc)
REASON: Exception: Exception: Traceback (most recent call last):
  File "bin/python/samba/tests/__init__.py", line 113, in run
    testMethod()
  File "/memdisk/autobuild/fl/b2199/samba/source4/dsdb/tests/python/tombstone_reanimation.py", line 541, in test_container
    self.assertAttributesEqual(obj, attr_orig, obj_restore, attr_rest)
  File "/memdisk/autobuild/fl/b2199/samba/source4/dsdb/tests/python/tombstone_reanimation.py", line 86, in assertAttributesEqual
    self.assertEqual(attrs_orig, attrs_rest, "Actual object does not have expected attributes")
AssertionError: Actual object does not have expected attributes

FAILED (1 failures, 0 errors and 0 unexpected successes in 0 testsuites)

There are more occurrences:

https://git.samba.org/autobuild.flakey/2015-03-17-1952/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-17-1350/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-16-0452/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-16-0156/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-15-1654/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-14-2253/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-14-1400/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-14-0153/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-13-2251/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-13-1059/samba.stdout
https://git.samba.org/autobuild.flakey/2015-03-13-0759/samba.stdout

Note that this fails in all environments it is configured to run in.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agoEnsure we always initialise the winbind context
Matthew Newton [Tue, 17 Mar 2015 00:56:12 +0000 (00:56 +0000)]
Ensure we always initialise the winbind context

Stops segfault when a context is passed. Internal Samba code will
currently always call this with NULL so won't trigger the bug.

Signed-off-by: Matthew Newton <matthew-git@newtoncomputing.co.uk>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 18 01:41:32 CET 2015 on sn-devel-104

4 years agolib: talloc: tests - add test_pthread_talloc_passing() testing talloc in a pthread...
Jeremy Allison [Mon, 16 Mar 2015 19:18:17 +0000 (12:18 -0700)]
lib: talloc: tests - add test_pthread_talloc_passing() testing talloc in a pthread environment.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo <simo@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 17 19:23:29 CET 2015 on sn-devel-104

4 years agolib: docs: talloc: Add a threads tutorial and samples showing how to use talloc with...
Jeremy Allison [Mon, 16 Mar 2015 19:17:40 +0000 (12:17 -0700)]
lib: docs: talloc: Add a threads tutorial and samples showing how to use talloc with threads.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo <simo@samba.org>
4 years agodsdb: fix error message in tombstone_reanimation test.
Michael Adam [Mon, 16 Mar 2015 17:45:52 +0000 (18:45 +0100)]
dsdb: fix error message in tombstone_reanimation test.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agodsdb: fix error message in sam test
Michael Adam [Mon, 16 Mar 2015 17:40:53 +0000 (18:40 +0100)]
dsdb: fix error message in sam test

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib: Remove ccan
Volker Lendecke [Thu, 12 Mar 2015 15:07:54 +0000 (15:07 +0000)]
lib: Remove ccan

The only component, that really used more than tiny bits of ccan was ntdb. Now
that ntdb is gone, ccan is not required anymore either.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Mar 17 14:06:15 CET 2015 on sn-devel-104

4 years agotexpect: Do not depend on ccan
Volker Lendecke [Thu, 12 Mar 2015 15:07:38 +0000 (15:07 +0000)]
texpect: Do not depend on ccan

texpect is the only remaining user of ccan code. Copy in the two routines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agosource3: Remove ccan-hash dependency
Volker Lendecke [Thu, 12 Mar 2015 15:03:22 +0000 (15:03 +0000)]
source3: Remove ccan-hash dependency

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agosource3: Replace ccan hash calls with tdb_jenkins_hash
Volker Lendecke [Thu, 12 Mar 2015 15:00:58 +0000 (15:00 +0000)]
source3: Replace ccan hash calls with tdb_jenkins_hash

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agosmbd: Remove an unused #include
Volker Lendecke [Thu, 12 Mar 2015 14:50:01 +0000 (14:50 +0000)]
smbd: Remove an unused #include

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove tdb_compat
Volker Lendecke [Thu, 12 Mar 2015 14:40:16 +0000 (14:40 +0000)]
lib: Remove tdb_compat

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove tdb_fetch_compat
Volker Lendecke [Thu, 12 Mar 2015 14:23:17 +0000 (14:23 +0000)]
lib: Remove tdb_fetch_compat

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove tdb_errorstr_compat
Volker Lendecke [Thu, 12 Mar 2015 14:19:02 +0000 (14:19 +0000)]
lib: Remove tdb_errorstr_compat

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRemove tdb_[first|next]key_compat
Volker Lendecke [Thu, 12 Mar 2015 14:14:24 +0000 (14:14 +0000)]
Remove tdb_[first|next]key_compat

This is essentially a revert of 3a8faefd.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove tdb_open_compat
Volker Lendecke [Thu, 12 Mar 2015 13:56:09 +0000 (13:56 +0000)]
lib: Remove tdb_open_compat

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove ntdb
Volker Lendecke [Thu, 12 Mar 2015 13:17:15 +0000 (13:17 +0000)]
lib: Remove ntdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agowaf: Do not recurse into ntdb
Volker Lendecke [Thu, 12 Mar 2015 13:16:49 +0000 (13:16 +0000)]
waf: Do not recurse into ntdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agodbwrap: Remove a ntdb reference
Volker Lendecke [Thu, 12 Mar 2015 13:40:43 +0000 (13:40 +0000)]
dbwrap: Remove a ntdb reference

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRemove ntdb protection from db_open_tdb
Volker Lendecke [Thu, 12 Mar 2015 13:39:40 +0000 (13:39 +0000)]
Remove ntdb protection from db_open_tdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRemove ntdb protection from tdb_wrap
Volker Lendecke [Thu, 12 Mar 2015 13:39:12 +0000 (13:39 +0000)]
Remove ntdb protection from tdb_wrap

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoDocs: Remove some ntdb references
Volker Lendecke [Thu, 12 Mar 2015 13:34:15 +0000 (13:34 +0000)]
Docs: Remove some ntdb references

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agopython: Remove ntdb references
Volker Lendecke [Thu, 12 Mar 2015 13:27:49 +0000 (13:27 +0000)]
python: Remove ntdb references

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoautobuild: Remove ntdb target
Volker Lendecke [Thu, 12 Mar 2015 13:25:38 +0000 (13:25 +0000)]
autobuild: Remove ntdb target

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRemove ntdb from scripts
Volker Lendecke [Thu, 12 Mar 2015 13:18:34 +0000 (13:18 +0000)]
Remove ntdb from scripts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoparam: Remove "use ntdb" reference
Volker Lendecke [Thu, 12 Mar 2015 13:10:12 +0000 (13:10 +0000)]
param: Remove "use ntdb" reference

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRevert "Samba3-HOWTO: mention NTDB."
Volker Lendecke [Thu, 12 Mar 2015 13:09:01 +0000 (13:09 +0000)]
Revert "Samba3-HOWTO: mention NTDB."

This reverts commit c5bd2ae338c0b67304ee253e3b5139b50cc1d0e5.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoparam: Remove "use ntdb"
Volker Lendecke [Thu, 12 Mar 2015 13:07:31 +0000 (13:07 +0000)]
param: Remove "use ntdb"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove unused util_ntdb.[ch]
Volker Lendecke [Thu, 12 Mar 2015 13:05:25 +0000 (13:05 +0000)]
lib: Remove unused util_ntdb.[ch]

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agodbwrap: Remove dbwrap_ntdb
Volker Lendecke [Thu, 12 Mar 2015 13:03:07 +0000 (13:03 +0000)]
dbwrap: Remove dbwrap_ntdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agodbwrap: Remove ntdb logic from dbwrap_local_open
Volker Lendecke [Thu, 12 Mar 2015 12:57:33 +0000 (12:57 +0000)]
dbwrap: Remove ntdb logic from dbwrap_local_open

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agolib: Remove "use_ntdb" param from secrets_init_path
Volker Lendecke [Thu, 12 Mar 2015 12:45:12 +0000 (12:45 +0000)]
lib: Remove "use_ntdb" param from secrets_init_path

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoRemove callers of lp_use_ntdb
Volker Lendecke [Thu, 12 Mar 2015 12:39:37 +0000 (12:39 +0000)]
Remove callers of lp_use_ntdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agosamdb: Ignore ntdb in secrets_tdb_sync
Volker Lendecke [Fri, 13 Mar 2015 14:34:36 +0000 (14:34 +0000)]
samdb: Ignore ntdb in secrets_tdb_sync

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agopassdb: Fix the O3 developer build
Volker Lendecke [Mon, 16 Mar 2015 06:45:28 +0000 (07:45 +0100)]
passdb: Fix the O3 developer build

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Mar 17 11:29:38 CET 2015 on sn-devel-104

4 years agolib/util: Make ECHILD in samba_runcmd_io_handler an error
Andrew Bartlett [Wed, 18 Feb 2015 23:41:34 +0000 (12:41 +1300)]
lib/util: Make ECHILD in samba_runcmd_io_handler an error

We now print out a nasty message and set and error if we get ECHILD,
as we no longer set SIGIGN on SIGCHLD in the standard process model.

This was why samba_kcc was able to fail totally without us noticing.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 17 07:05:43 CET 2015 on sn-devel-104

4 years agos4-process_standard: Remove signal(SIGCHLD, SIG_IGN)
Andrew Bartlett [Wed, 18 Feb 2015 23:45:31 +0000 (12:45 +1300)]
s4-process_standard: Remove signal(SIGCHLD, SIG_IGN)

We replace this with a pipe between parent and child, and then watch
for a read event in the parent to indicate that the child has gone away.

The removal of signal(SIGCHLD, SIG_IGN) requires us to then call
waitpid().  We can't do that in a main loop as we want to get the exit
status to the legitimate waitpid calls in routines like
samba_runcmd_*().

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agoselftest: rename env member to nt4_member
Michael Adam [Fri, 6 Mar 2015 09:01:33 +0000 (10:01 +0100)]
selftest: rename env member to nt4_member

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 17 01:46:18 CET 2015 on sn-devel-104

4 years agoselftest: rename env s3dc_schannel to nt4_dc_schannel
Michael Adam [Fri, 6 Mar 2015 08:39:54 +0000 (09:39 +0100)]
selftest: rename env s3dc_schannel to nt4_dc_schannel

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env s3dc to nt4_dc
Michael Adam [Fri, 6 Mar 2015 08:34:11 +0000 (09:34 +0100)]
selftest: rename env s3dc to nt4_dc

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env s3member_rfc2307 to ad_member_rfc2307
Michael Adam [Thu, 5 Mar 2015 23:58:45 +0000 (00:58 +0100)]
selftest: rename env s3member_rfc2307 to ad_member_rfc2307

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env s3member to ad_member.
Michael Adam [Thu, 5 Mar 2015 22:46:14 +0000 (23:46 +0100)]
selftest: rename env s3member to ad_member.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env dc to ad_dc_ntvfs
Michael Adam [Thu, 5 Mar 2015 22:38:26 +0000 (23:38 +0100)]
selftest: rename env dc to ad_dc_ntvfs

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: rename env plugin_s4_dc to ad_dc
Michael Adam [Thu, 5 Mar 2015 17:08:43 +0000 (18:08 +0100)]
selftest: rename env plugin_s4_dc to ad_dc

This is the environment that represents our supported production
setup of an active directory domain controller.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: make blackbox.pkinit test independent of test environment.
Michael Adam [Mon, 16 Mar 2015 09:37:35 +0000 (10:37 +0100)]
selftest: make blackbox.pkinit test independent of test environment.

This lets the test not clutter the main selftest prefix directory
with temporary data.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: make blackbox.ktpass test independent of test environment.
Michael Adam [Mon, 16 Mar 2015 09:34:37 +0000 (10:34 +0100)]
selftest: make blackbox.ktpass test independent of test environment.

This also prevents the test from cluttering the main
selftest prefix directory with temporary data.

Note: this test is currently skipped but it should
be adapted because of the environment renames anyways.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest: make blackbox.passwords test independent of test environment.
Michael Adam [Mon, 16 Mar 2015 09:27:56 +0000 (10:27 +0100)]
selftest: make blackbox.passwords test independent of test environment.

This also prevents the test from cluttering the main
selftest directort with temporary data.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoselftest:test_kinit: remove commented out line with outdated content.
Michael Adam [Mon, 16 Mar 2015 09:20:01 +0000 (10:20 +0100)]
selftest:test_kinit: remove commented out line with outdated content.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agodoc: fix the idmap_script manpage to be named idmap_script
Michael Adam [Tue, 3 Feb 2015 13:41:27 +0000 (14:41 +0100)]
doc: fix the idmap_script manpage to be named idmap_script

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): G√ľnther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Mar 16 23:03:34 CET 2015 on sn-devel-104

4 years agos3:winbind:grent: don't stop when querying one domain fails.
Michael Adam [Sun, 25 Jan 2015 11:16:50 +0000 (12:16 +0100)]
s3:winbind:grent: don't stop when querying one domain fails.

Just continue with the next domain.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: convert wb_next_grent to use wb_query_group_list.
Michael Adam [Fri, 23 Jan 2015 13:23:16 +0000 (14:23 +0100)]
s3:winbind:grent: convert wb_next_grent to use wb_query_group_list.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind: add wb_query_group_list module - async query group list
Michael Adam [Fri, 23 Jan 2015 13:06:40 +0000 (14:06 +0100)]
s3:winbind: add wb_query_group_list module - async query group list

Modeled after wb_query_user_list.c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: refactor duplication into wb_next_grent_send_do()
Michael Adam [Wed, 21 Jan 2015 11:32:04 +0000 (12:32 +0100)]
s3:winbind:grent: refactor duplication into wb_next_grent_send_do()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: move resetting next_group up.
Michael Adam [Tue, 20 Jan 2015 11:25:29 +0000 (12:25 +0100)]
s3:winbind:grent: move resetting next_group up.

This is to make it more obvious that this is a case
of code duplication.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: use wb_next_domain() in wb_next_grent.c
Michael Adam [Tue, 20 Jan 2015 09:25:37 +0000 (10:25 +0100)]
s3:winbind:grent: use wb_next_domain() in wb_next_grent.c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: fix a debug message.
Michael Adam [Sun, 25 Jan 2015 11:20:35 +0000 (12:20 +0100)]
s3:winbind:grent: fix a debug message.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: refactor duplication into wb_next_pwent_send_do()
Michael Adam [Mon, 19 Jan 2015 12:51:39 +0000 (13:51 +0100)]
s3:winbind:pwent: refactor duplication into wb_next_pwent_send_do()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: move resetting next_user up.
Michael Adam [Tue, 20 Jan 2015 10:06:51 +0000 (11:06 +0100)]
s3:winbind:pwent: move resetting next_user up.

This does not change the behaviour and makes it more evident
that we have anothe code duplication here:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (state->gstate->num_users == 0) {
...
}

subreq = wb_fill_pwent_send(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

is for the current setting of variables equivalent
to the block found elsewhere:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (state->gstate->next_user >= state->gstate->num_users) {
...
}

subreq = wb_fill_pwent_send(...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

because both num_users is set to a non-negative
value and num_users starts at 0 and is incremented up to
num_users.

The code duplication will be factored out next.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: move wb_next_domain() to winbindd_util.c for re-use
Michael Adam [Tue, 20 Jan 2015 09:07:59 +0000 (10:07 +0100)]
s3:winbind:pwent: move wb_next_domain() to winbindd_util.c for re-use

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: rename wb_next_find_domain to wb_next_domain
Michael Adam [Tue, 20 Jan 2015 08:41:31 +0000 (09:41 +0100)]
s3:winbind:pwent: rename wb_next_find_domain to wb_next_domain

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:pwent: use wb_next_find_domain()
Michael Adam [Sat, 17 Jan 2015 22:34:37 +0000 (23:34 +0100)]
s3:winbind:pwent: use wb_next_find_domain()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:util: fix comment typo
Michael Adam [Tue, 20 Jan 2015 07:39:58 +0000 (08:39 +0100)]
s3:winbind:util: fix comment typo

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:util_sid: donate an empty line.
Michael Adam [Mon, 19 Jan 2015 07:14:44 +0000 (08:14 +0100)]
s3:util_sid: donate an empty line.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:winbind:grent: don't stop group enumeration when a group has no gid
Michael Adam [Mon, 19 Jan 2015 12:51:55 +0000 (13:51 +0100)]
s3:winbind:grent: don't stop group enumeration when a group has no gid

simply continue with the next group

Note: this patch introduces some code duplication to make it
easier to create minimal backport patch. Subsequent patches
will provide some refactoring to reduce the duplication.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=8905

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agodsdb: fix the user_account_control test.
Michael Adam [Mon, 16 Mar 2015 16:22:01 +0000 (17:22 +0100)]
dsdb: fix the user_account_control test.

On my system (Fedora 21) the test fails with:

[1(0)/1 at 0s] samba4.user_account_control.python(dc)
teardown_env(dc)
Traceback (most recent call last):
  File "/home/obnox/devel/samba/master-push.git/source4/dsdb/tests/python/user_account_control.py", line 23, in <module>
    from subunit.run import SubunitTestRunner
ImportError: No module named subunit.run

This fixes it for me.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Mar 16 20:25:33 CET 2015 on sn-devel-104

4 years agoselftest: Add missing variable to @exported_envvars
Andreas Schneider [Mon, 16 Mar 2015 16:43:59 +0000 (17:43 +0100)]
selftest: Add missing variable to @exported_envvars

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
4 years agoctdb-tests: Add tests for "ctdb reloadips" and "ctdb recover"
Martin Schwenke [Fri, 13 Mar 2015 04:00:03 +0000 (15:00 +1100)]
ctdb-tests: Add tests for "ctdb reloadips" and "ctdb recover"

Although much of the test infrastructure in recent commits is actually
targeted for "reloadnodes", it is worthwhile adding some tests for
"reloadips" and "recover".  This allows most of the test
infrastructure to be tried out against known good code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Mar 16 09:18:55 CET 2015 on sn-devel-104