vlendec/samba-autobuild/.git
5 years agolib: texpect. Fix the build on Solaris.
Tom Schulz [Fri, 13 Feb 2015 21:47:14 +0000 (13:47 -0800)]
lib: texpect. Fix the build on Solaris.

Bug 11092 - texpect requires routines err and errx

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

Signed-off-by: Tom Schulz <schulz@adi.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Feb 17 18:09:52 CET 2015 on sn-devel-104

5 years agogroup.py: Fix wrong example option, remove wrong comment line
Marc Muehlfeld [Sat, 24 Jan 2015 14:59:40 +0000 (15:59 +0100)]
group.py: Fix wrong example option, remove wrong comment line

Replaced "--gid" with the correct "--gid-number" in Example 3.
Additionally removed the first comment line in group.py, which
was wrong in that file.

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agobuildtools: Use separate storage for each function in runonce
Petr Viktorin [Fri, 16 Jan 2015 14:24:03 +0000 (15:24 +0100)]
buildtools: Use separate storage for each function in runonce

The runonce decorator used shared storage for all functions, and
dispatched only on arguments, so a call would be eliminated if
a different runonce function had already been called with the same
arguments.

Use separate storage for each decorated function.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Simo Sorce <simo@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoForce rebuild of ldb if pyldb-util is not available.
Jelmer Vernooij [Wed, 21 Jan 2015 01:58:49 +0000 (02:58 +0100)]
Force rebuild of ldb if pyldb-util is not available.

This is necessary since pyldb-util uses ldb_private.h, so we want to
build against the same source ldb.

Change-Id: I802974b9eef7deb102fea15b67ec5f87e8e353bd
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agowscript: Expand tabs.
Jelmer Vernooij [Wed, 21 Jan 2015 01:58:48 +0000 (02:58 +0100)]
wscript: Expand tabs.

Change-Id: I2746f775accceeb2eeb02679f2c91b02085560b6
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agorpc_talloc: Update instructions to use standard unittest runner.
Jelmer Vernooij [Wed, 21 Jan 2015 01:58:47 +0000 (02:58 +0100)]
rpc_talloc: Update instructions to use standard unittest runner.

Change-Id: Id90541b01073f1156ccba562ba750245aad091c2
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoRemove documentation for testsuite-count subunit extension, which is no longer used.
Jelmer Vernooij [Wed, 21 Jan 2015 01:58:46 +0000 (02:58 +0100)]
Remove documentation for testsuite-count subunit extension, which is no longer used.

Change-Id: Ie7f671fdac4f878e1eea157ee7e300977a68deb0
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoUpdate selftest README to point at upstream subunit repository for protocol description.
Jelmer Vernooij [Wed, 21 Jan 2015 01:58:45 +0000 (02:58 +0100)]
Update selftest README to point at upstream subunit repository for protocol description.

Change-Id: I50c2a5e9847d269486cb5157357592004779704a
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agorpcclient: Fix and enhance rpcclient output
Robin Hack [Fri, 30 Jan 2015 12:18:20 +0000 (13:18 +0100)]
rpcclient: Fix and enhance rpcclient output

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

When rpcclient is called like:
$ rpcclient -c "getdata . Osversion"
at end of output is added one nonsense line
OsVersion: Osversion:

This patch removes this line and adds more human friendly ouput:
OsMajor: num
OsMinor: num
OsBuild: num

for OsVersion query.

For OsVersionEx two more lines are added:
OsMajor: num
OsMinor: num
OsBuild: num
ServicePackMajor: num
ServicePackMinor: num

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agolib/crypto: Document what crypto code is used for, and if GnuTLS supports it
Andrew Bartlett [Mon, 16 Feb 2015 22:51:34 +0000 (11:51 +1300)]
lib/crypto: Document what crypto code is used for, and if GnuTLS supports it

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Feb 17 11:45:15 CET 2015 on sn-devel-104

5 years agos3/vfs: remove unused SMB_VFS_DISK_FREE() small_query parameter
David Disseldorp [Mon, 16 Feb 2015 18:26:24 +0000 (19:26 +0100)]
s3/vfs: remove unused SMB_VFS_DISK_FREE() small_query parameter

The small_query parameter for SMB_VFS_DISK_FREE() was, prior to the
previous commit, used to obtain 16-bit wide free-space information for
the deprecated dskattr SMB_COM_QUERY_INFORMATION_DISK command.

With the dskattr handler now performing the 16-bit collapse directly,
the small_query parameter can be removed from the entire code path.

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): Tue Feb 17 05:37:20 CET 2015 on sn-devel-104

5 years agosmbd/reply: convert free space to 16bit in dskattr handler
David Disseldorp [Mon, 16 Feb 2015 18:26:23 +0000 (19:26 +0100)]
smbd/reply: convert free space to 16bit in dskattr handler

The deprecated Core Protocol dskattr SMB_COM_QUERY_INFORMATION_DISK
command provides free space information in the form of 16-bit words.

Until now, this has been handled by passing the dskattr specific
small_query boolean through to disk_norm() via the SMB_VFS_DISK_FREE VFS
hook. disk_norm(small_query=true) then modifies the block size and free
space values such that they fit in the 16-bit field.

This change adds the command specific logic to the dskattr handler, so
that it can be removed from the SMB_VFS_DISK_FREE()->disk_norm() code
path. In doing so, it fixes dskattr request handling against opaque VFS
backends that don't call disk_norm(), such as vfs_glusterfs.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_ceph: fix disk_free_fn callback
Yan, Zheng [Fri, 13 Feb 2015 10:25:57 +0000 (18:25 +0800)]
vfs_ceph: fix disk_free_fn callback

Free space and available space should be in unit of block size. Besides,
we should call disk_norm() to adjust the returned values.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Mon Feb 16 18:14:02 CET 2015 on sn-devel-104

5 years agos4-messaging: Unify list of possible messages into messaging.idl
Andrew Bartlett [Sun, 15 Feb 2015 23:43:40 +0000 (12:43 +1300)]
s4-messaging: Unify list of possible messages into messaging.idl

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Feb 16 14:48:41 CET 2015 on sn-devel-104

5 years agolibrpc: Move messaging.idl to the top level
Andrew Bartlett [Sun, 15 Feb 2015 23:25:44 +0000 (12:25 +1300)]
librpc: Move messaging.idl to the top level

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4-messaging: Remove unused struct imessaging_rec
Andrew Bartlett [Sun, 15 Feb 2015 23:16:03 +0000 (12:16 +1300)]
s4-messaging: Remove unused struct imessaging_rec

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agodebug: Set close-on-exec for the main log file FD
Andrew Bartlett [Mon, 16 Feb 2015 02:59:11 +0000 (15:59 +1300)]
debug: Set close-on-exec for the main log file FD

This does not change the properties of dup2() of the fd as STDERR, however this is closed
before we start smbd or winbindd as child processes.

This is needed otherwise the logfile remains open in the child process, and
logfile rotation can mean this old log remains on disk indefinatly.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11100
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 16 11:42:47 CET 2015 on sn-devel-104

5 years agoAdd Solaris ports as a tevent backend.
Jeremy Allison [Mon, 22 Jul 2013 21:23:33 +0000 (14:23 -0700)]
Add Solaris ports as a tevent backend.

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): Sun Feb 15 23:25:07 CET 2015 on sn-devel-104

5 years agomessaging4: Enable POOL_USAGE
Volker Lendecke [Wed, 11 Feb 2015 15:31:26 +0000 (15:31 +0000)]
messaging4: Enable POOL_USAGE

With this you can watch "samba"'s talloc hierarchy live using

smbcontrol <pid> pool-usage

Enjoy :-)

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): Sat Feb 14 01:59:19 CET 2015 on sn-devel-104

5 years agolib: Use talloc_report_str
Volker Lendecke [Tue, 10 Feb 2015 21:17:44 +0000 (22:17 +0100)]
lib: Use talloc_report_str

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Add talloc_report_str()
Volker Lendecke [Wed, 11 Feb 2015 12:19:05 +0000 (12:19 +0000)]
lib: Add talloc_report_str()

This creates a talloc report into a string and will replace the code used in
source3/lib/tallocmsg.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessaging4: Use messages_dgm
Volker Lendecke [Sun, 8 Feb 2015 14:33:39 +0000 (15:33 +0100)]
messaging4: Use messages_dgm

This replaces the transport mechanism in source4 with calls to the
messages_dgm code. It is supposed to enable "smbcontrol samba pool-usage"
as an example without having to rewrite smbcontrol using the source4
based messaging subsystem.

This moves the source3 based names.tdb (which is unused so far) to the
lock directory, source4 does not have a cache directory.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessaging3: Use message_hdr_[put|get]
Volker Lendecke [Wed, 11 Feb 2015 15:28:55 +0000 (15:28 +0000)]
messaging3: Use message_hdr_[put|get]

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessaging: Define a binary format for message headers
Volker Lendecke [Tue, 16 Sep 2014 12:09:35 +0000 (14:09 +0200)]
messaging: Define a binary format for message headers

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Add server_id marshalling
Volker Lendecke [Tue, 16 Sep 2014 00:11:19 +0000 (02:11 +0200)]
lib: Add server_id marshalling

Will be used soon to make source3 and source4 messaging-protocol
compatible.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoctdb: server_id_get->server_id_fetch
Volker Lendecke [Fri, 10 Oct 2014 06:35:08 +0000 (08:35 +0200)]
ctdb: server_id_get->server_id_fetch

server_id_get with the next patch will be a global parsing function.
I've decided to rename this here in ctdb, as it's only a static function
in ctdb_client.c and apparently not intended for wider use. Please speak
up if you don't like this :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessaging3: Use messaging_dgm_ref
Volker Lendecke [Sat, 4 Oct 2014 09:21:18 +0000 (11:21 +0200)]
messaging3: Use messaging_dgm_ref

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Add messages_dgm_ref.[ch]
Volker Lendecke [Sat, 4 Oct 2014 09:15:12 +0000 (11:15 +0200)]
lib: Add messages_dgm_ref.[ch]

We only have one messaging_dgm context per process. But we will use this from
two completely independent messaging subsystems which are independently
initialized. We need to coordinate creation and destruction, do this via
talloc.

I know this looks like a step back, but when in the future we have really just
one messaging subsystem, this can go again. My immediate goal is to make
source3 and source4 transport-compatible, and this looks like a quick way
towards that goal.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessages_dgm: Make it an independent lib
Volker Lendecke [Sat, 4 Oct 2014 09:11:46 +0000 (11:11 +0200)]
messages_dgm: Make it an independent lib

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessages_dgm: Add a few #includes
Volker Lendecke [Sat, 4 Oct 2014 09:14:26 +0000 (11:14 +0200)]
messages_dgm: Add a few #includes

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agounix_msg: remove cookie from unix_msg_init
Volker Lendecke [Sun, 14 Sep 2014 15:52:07 +0000 (17:52 +0200)]
unix_msg: remove cookie from unix_msg_init

"pid" and "sock" are sufficient I guess as randomizers to distinguish messages.
In theory, a pid could be recycled very quickly, which might mix up in-flight
messages. But once a few messages have passed, "cookie" would be incremented as
another indicator of a fresh message.

Why? Remove messages_dgm dependency on samba-util

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessages_dgm: Move directory handling up
Volker Lendecke [Sat, 4 Oct 2014 08:58:15 +0000 (10:58 +0200)]
messages_dgm: Move directory handling up

When we want to use messages_dgm in source4, we need to find better
places for the lock and socket directories. Source4 does not have the
concept of a cache directory. So I chose "private dir"/sock and "lock
dir"/msg as subdirectories.

This moves directory creation from messages_dgm.c to messages.c,
source4/lib/messaging will have its own way of doing this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessages_dgm: Only pass "unique" to messaging_dgm_init
Volker Lendecke [Sat, 4 Oct 2014 08:40:24 +0000 (10:40 +0200)]
messages_dgm: Only pass "unique" to messaging_dgm_init

We have only one context per pid, so messaging_dgm_init can do getpid()
itself.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agomessaging4: Use server_id_db
Volker Lendecke [Wed, 4 Feb 2015 11:31:24 +0000 (11:31 +0000)]
messaging4: Use server_id_db

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoRemove an unused function call.
Richard Sharpe [Fri, 13 Feb 2015 02:22:17 +0000 (18:22 -0800)]
Remove an unused function call.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Feb 13 23:29:54 CET 2015 on sn-devel-104

5 years agoselftest: re-enable nss_winbind via nss_wrapper in the test-envs.
Günther Deschner [Mon, 2 Feb 2015 13:54:01 +0000 (14:54 +0100)]
selftest: re-enable nss_winbind via nss_wrapper in the test-envs.

Without exporting these new variables, we can never access or test nss_winbind
from the selftest environments.

This shows that our posixacl test probably needs fixing since now
two subtests fail against plugin_s4_dc:local. This env was just
not complete without winbind in nsswitch. The test failure is
probably due to the strangeness of the AD/DC setup that the
domain administrator uses the same uid as the root user, which
in the selftest case is overridden to be the calling user.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Feb 13 20:57:12 CET 2015 on sn-devel-104

5 years agos4-selftest: push up the "users" gid to make gid collision more unlikely.
Günther Deschner [Thu, 5 Feb 2015 15:07:35 +0000 (16:07 +0100)]
s4-selftest: push up the "users" gid to make gid collision more unlikely.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos4:selftest: avoid creating two groups with GID 0 in provision
Michael Adam [Tue, 3 Feb 2015 13:59:06 +0000 (14:59 +0100)]
s4:selftest: avoid creating two groups with GID 0 in provision

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos4:selftest: avoid creating two entries for UID 0 in provision
Michael Adam [Mon, 2 Feb 2015 15:05:17 +0000 (16:05 +0100)]
s4:selftest: avoid creating two entries for UID 0 in provision

Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoselftest: run the samba.nss tests against :local environments
Michael Adam [Sat, 7 Feb 2015 11:16:30 +0000 (12:16 +0100)]
selftest: run the samba.nss tests against :local environments

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agoselftest/knownfail: add newline to end of file.
Michael Adam [Sat, 7 Feb 2015 13:32:43 +0000 (14:32 +0100)]
selftest/knownfail: add newline to end of file.

git always complains about what vim does to the file...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agodocs: Fix vfs_shadow_copy(8)
Volker Lendecke [Fri, 13 Feb 2015 13:06:29 +0000 (14:06 +0100)]
docs: Fix vfs_shadow_copy(8)

Found by Miguel Medalha <miguelmedalha@sapo.pt>

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Feb 13 18:24:38 CET 2015 on sn-devel-104

5 years agos3-passdb: lift annoying debug message level.
Günther Deschner [Tue, 3 Feb 2015 14:24:25 +0000 (15:24 +0100)]
s3-passdb: lift annoying debug message level.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Feb 13 15:54:18 CET 2015 on sn-devel-104

5 years agoctdb-recoverd: Abort when daemon can take recovery lock during recovery
Martin Schwenke [Tue, 27 Jan 2015 01:55:42 +0000 (12:55 +1100)]
ctdb-recoverd: Abort when daemon can take recovery lock during recovery

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): Fri Feb 13 09:48:15 CET 2015 on sn-devel-104

5 years agoctdb-recoverd: Improve error messages on recovery lock coherence fail
Martin Schwenke [Wed, 17 Dec 2014 09:33:19 +0000 (20:33 +1100)]
ctdb-recoverd: Improve error messages on recovery lock coherence fail

When the daemon is able to take the recovery lock during recovery we
might as well guess that the cluster filesystem has a lock coherence
problem and print a more useful message.  This will be more helpful to
those trying out cluster filesystems that don't have lock coherence or
that are difficult to setup.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Don't release and re-take the recovery lock
Martin Schwenke [Tue, 9 Dec 2014 02:51:27 +0000 (13:51 +1100)]
ctdb-recoverd: Don't release and re-take the recovery lock

Just continue to hold it, otherwise a broken node might win an
election and grab the lock.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Simplify ctdb_recovery_lock()
Martin Schwenke [Tue, 9 Dec 2014 03:50:38 +0000 (14:50 +1100)]
ctdb-recoverd: Simplify ctdb_recovery_lock()

Have it just silently take or fail to take the lock, except on an
unexpected failure (where it should log an error).

This means that when it is called we need to keep the old behaviour
and explicitly release the lock.  In do_recovery() the lock is
released and a message is printed before attempting to take the lock.
In the daemon sanity check the lock must be released in the error path
if it is actually taken.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Remove check_recovery_lock()
Martin Schwenke [Tue, 9 Dec 2014 03:45:08 +0000 (14:45 +1100)]
ctdb-recoverd: Remove check_recovery_lock()

This has not done anything useful since commit
b9d8bb23af8abefb2d967e9b4e9d6e60c4a3b520.  Instead, just check that
the lock is held.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Improve logging when recovery lock file is changed
Martin Schwenke [Tue, 9 Dec 2014 03:09:40 +0000 (14:09 +1100)]
ctdb-recoverd: Improve logging when recovery lock file is changed

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: New function ctdb_recovery_unlock()
Martin Schwenke [Tue, 9 Dec 2014 03:07:20 +0000 (14:07 +1100)]
ctdb-recoverd: New function ctdb_recovery_unlock()

Unlock the recovery lock file.  This way knowledge of the file
descriptor isn't sprinkled throughout the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: New function ctdb_recovery_have_lock()
Martin Schwenke [Tue, 9 Dec 2014 02:50:22 +0000 (13:50 +1100)]
ctdb-recoverd: New function ctdb_recovery_have_lock()

True if this recovery daemon holds the lock.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-daemon: Log a warning when setting obsolete tunables
Martin Schwenke [Tue, 9 Dec 2014 02:49:06 +0000 (13:49 +1100)]
ctdb-daemon: Log a warning when setting obsolete tunables

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-daemon: Mark tunable VerifyRecoveryLock as obsolete
Martin Schwenke [Tue, 9 Dec 2014 02:47:42 +0000 (13:47 +1100)]
ctdb-daemon: Mark tunable VerifyRecoveryLock as obsolete

It is pointless having a recovery lock but not sanity checking that it
is working.  Also, the logic that uses this tunable is confusing.  In
some places the recovery lock is released unnecessarily because the
tunable isn't set.

Simplify the logic by assuming that if a recovery lock is specified
then it should be verified.

Update documentation that references this tunable.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-doc: Improve documentation of the recovery lock
Martin Schwenke [Tue, 3 Feb 2015 03:27:11 +0000 (14:27 +1100)]
ctdb-doc: Improve documentation of the recovery lock

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agosnprintf: Try to support %j
Volker Lendecke [Wed, 11 Feb 2015 16:16:50 +0000 (17:16 +0100)]
snprintf: Try to support %j

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 12 23:34:33 CET 2015 on sn-devel-104

5 years agotorture/ioctl: add test_ioctl_sparse_copy_chunk test
David Disseldorp [Mon, 9 Feb 2015 11:09:35 +0000 (12:09 +0100)]
torture/ioctl: add test_ioctl_sparse_copy_chunk test

This test copies unallocated and allocated ranges from a sparse file
into a sparse and non-sparse destination file using FSCTL_SRV_COPYCHUNK.

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): Thu Feb 12 03:19:32 CET 2015 on sn-devel-104

5 years agotorture/ioctl: add sparse_compressed test
David Disseldorp [Mon, 9 Feb 2015 11:09:34 +0000 (12:09 +0100)]
torture/ioctl: add sparse_compressed test

This test checks whether a file marked with sparse and compression
attributes is deallocated following FSCTL_SET_ZERO_DATA.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture/ioctl: extend sparse_hole_dealloc test
David Disseldorp [Mon, 9 Feb 2015 11:09:33 +0000 (12:09 +0100)]
torture/ioctl: extend sparse_hole_dealloc test

Check whether unwritten extents in a sparse file are allocated.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture/ioctl: add sparse_hole_dealloc test
David Disseldorp [Mon, 9 Feb 2015 11:09:32 +0000 (12:09 +0100)]
torture/ioctl: add sparse_hole_dealloc test

This test finds the minimum length at which a zeroed range in a sparse
file is deallocated by the underlying filesystem.
It also checks whether zeroed neighbours are merged for deallocation.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture/ioctl: fix check_[zero/pattern]() for len=0
David Disseldorp [Mon, 9 Feb 2015 11:09:31 +0000 (12:09 +0100)]
torture/ioctl: fix check_[zero/pattern]() for len=0

Subtraction currently triggers an underflow.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_prealloc: Remove call to gpfs_prealloc
Christof Schmitt [Tue, 10 Feb 2015 20:36:17 +0000 (13:36 -0700)]
vfs_prealloc: Remove call to gpfs_prealloc

Calling gpfs_prealloc changes the actual size of the file, and this
should not be done implicitly. Also this code does not compile due to
the missing dependency to the gpfs library. The best way solution here
is probably removing the call to gpfs_prealloc. The vfs_gpfs module
already implements the call to gpfs_prelloc when this can be done
safely.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb 11 02:03:09 CET 2015 on sn-devel-104

5 years agolib: Fix a typo
Volker Lendecke [Tue, 10 Feb 2015 20:11:54 +0000 (20:11 +0000)]
lib: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3: smbclient: Allinfo leaves the file handle open.
Jeremy Allison [Tue, 10 Feb 2015 17:32:11 +0000 (09:32 -0800)]
s3: smbclient: Allinfo leaves the file handle open.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Feb 10 23:28:46 CET 2015 on sn-devel-104

5 years agosmbd: Fix a typo
Volker Lendecke [Tue, 10 Feb 2015 16:26:47 +0000 (17:26 +0100)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Feb 10 20:27:32 CET 2015 on sn-devel-104

5 years agosmbd: Fix a typo
Volker Lendecke [Mon, 9 Feb 2015 14:42:23 +0000 (14:42 +0000)]
smbd: Fix a typo

http://www.oxfordlearnersdictionaries.com/definition/english/veto_2 says it's
vetoed, not vetod

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
5 years agosmbd: Make "check_veto_path" static
Volker Lendecke [Mon, 9 Feb 2015 14:42:08 +0000 (14:42 +0000)]
smbd: Make "check_veto_path" static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
5 years agoUpdate mailing list references to point at lists.samba.org
Andrew Bartlett [Mon, 9 Feb 2015 23:26:56 +0000 (12:26 +1300)]
Update mailing list references to point at lists.samba.org

The mailing lists are on lists.samba.org, but there are many references that use the shorthand of samba.org

Some references to samba@ have been changed to samba-technical@ where this make more sense.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 10 07:08:28 CET 2015 on sn-devel-104

5 years agoRemove obsolete SGI packaging
Andrew Bartlett [Mon, 9 Feb 2015 23:30:32 +0000 (12:30 +1300)]
Remove obsolete SGI packaging

This has not worked since before the source3 and source4 trees were imported many years ago

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agoprinting/cups: pack requested-attributes with IPP_TAG_KEYWORD
David Disseldorp [Tue, 3 Feb 2015 18:26:42 +0000 (19:26 +0100)]
printing/cups: pack requested-attributes with IPP_TAG_KEYWORD

The CUPS IPP_GET_JOBS requested-attributes array indicates which job
attributes the caller would like in the cupsd response.

Until now, Samba has packed these attributes with a IPP_TAG_NAME
format tag. In recent versions of CUPS, this results in the IPP_GET_JOBS
response only including the job-id and job-printer-uri fields, even with
JobPrivateValues=none configured.

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

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): Tue Feb 10 01:38:58 CET 2015 on sn-devel-104

5 years agogencache: don't fail gencache_stabilize if there were records to delete.
Michael Adam [Wed, 4 Feb 2015 13:47:20 +0000 (14:47 +0100)]
gencache: don't fail gencache_stabilize if there were records to delete.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonfs4: Fix a confusing debug message
Volker Lendecke [Thu, 5 Feb 2015 11:47:22 +0000 (12:47 +0100)]
nfs4: Fix a confusing debug message

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Feb  9 12:25:06 CET 2015 on sn-devel-104

5 years agotorture-krb5: Provide a generic handler to catch and print unexpected KRB_ERROR packets
Andrew Bartlett [Sat, 7 Feb 2015 06:45:24 +0000 (19:45 +1300)]
torture-krb5: Provide a generic handler to catch and print unexpected KRB_ERROR packets

This may aid debugging in the future.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Feb  8 10:37:23 CET 2015 on sn-devel-104

5 years agoauth/kerberos: Use talloc_stackframe to avoid memory and FD leak of event context
Andrew Bartlett [Thu, 5 Feb 2015 19:53:21 +0000 (08:53 +1300)]
auth/kerberos: Use talloc_stackframe to avoid memory and FD leak of event context

The smb_krb5_send_and_recv_func_forced and smb_krb5_send_and_recv_func
functions could leak an event context including an epoll FD and some
memory.  This may explain a flapping test in krb5.kdc

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
5 years agotorture-krb5: Add test for TGS-REQ with type KRB5_NT_PRINCIPAL, KRB5_NT_SRV_INST...
Andrew Bartlett [Thu, 5 Feb 2015 03:44:23 +0000 (16:44 +1300)]
torture-krb5: Add test for TGS-REQ with type KRB5_NT_PRINCIPAL, KRB5_NT_SRV_INST, KRB5_NT_SRV_HST

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: Add test in for normal TGS-REQ
Andrew Bartlett [Thu, 5 Feb 2015 02:49:40 +0000 (15:49 +1300)]
torture-krb5: Add test in for normal TGS-REQ

For example, host/server

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: Split out TEST_AS_REQ_SELF recv testing routine
Andrew Bartlett [Wed, 4 Feb 2015 21:11:42 +0000 (10:11 +1300)]
torture-krb5: Split out TEST_AS_REQ_SELF recv testing routine

This duplicates more code, but re-using the callbacks makes it much, much harder to debug

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: Add additional assertions for non-canon TGS-REP
Andrew Bartlett [Tue, 3 Feb 2015 02:51:41 +0000 (15:51 +1300)]
torture-krb5: Add additional assertions for non-canon TGS-REP

This confirms that the KDC does not modify the returned principal in a TGS-REP unconditionally.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agotorture-krb5: Further test improvements to cover KRB5_GC_CANONICALIZE on krbtgt/
Andrew Bartlett [Tue, 3 Feb 2015 02:22:52 +0000 (15:22 +1300)]
torture-krb5: Further test improvements to cover KRB5_GC_CANONICALIZE on krbtgt/

This covers more of the protocol, and confirms which tests actually send network
packets (and so actually run the assertions in the send_and_recv handlers.
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest: Run krb5.kdc with an account that has a UPN and an SPN
Andrew Bartlett [Mon, 2 Feb 2015 22:36:49 +0000 (11:36 +1300)]
selftest: Run krb5.kdc with an account that has a UPN and an SPN

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: Add tests for AS-REQ to our own name
Andrew Bartlett [Mon, 2 Feb 2015 02:01:40 +0000 (15:01 +1300)]
torture-krb5: Add tests for AS-REQ to our own name

This allows us to probe the behaviour of AS-REQ requests against a principal other than krbtgt/

This alos allows verification of behaviour of principals of type KRB5_NT_ENTERPRISE_PRINCIPAL

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agotorture-krb5: Improve the assertions in our KDC tests to be more explicit
Andrew Bartlett [Mon, 2 Feb 2015 00:55:25 +0000 (13:55 +1300)]
torture-krb5: Improve the assertions in our KDC tests to be more explicit

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: Reformat and re-work test to be easier to follow
Andrew Bartlett [Sun, 1 Feb 2015 23:18:23 +0000 (12:18 +1300)]
torture-krb5: Reformat and re-work test to be easier to follow

The behaviour is the same as in the previous commit, but it is much easier to follow
as the main test code now indicates to the send_and_recv callbacks what stage of the
test we are at, and resets the packet counter between stages.

This also re-orders the code so that the send and recv callbacks for each stage
are next to each other, and uses a case statement in the main send_and_recv driver
for clarity.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: Add tests for the canonicalise TGS-REQ case
Andrew Bartlett [Fri, 30 Jan 2015 05:17:16 +0000 (18:17 +1300)]
torture-krb5: Add tests for the canonicalise TGS-REQ case

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: add TGS-REQ testing to krb5.kdc.canon testsuite
Andrew Bartlett [Thu, 29 Jan 2015 23:31:10 +0000 (12:31 +1300)]
torture-krb5: add TGS-REQ testing to krb5.kdc.canon testsuite

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agokdc: make Samba KDC pass new TGS-REQ and AS-REQ (to self) testing
Andrew Bartlett [Thu, 29 Jan 2015 23:31:29 +0000 (12:31 +1300)]
kdc: make Samba KDC pass new TGS-REQ and AS-REQ (to self) testing

This also reverts 51b94ab3fd4d13ee38813eb7d20db11edaa667a8 as our
testing shows Windows 2012R2 does not have this behaviour.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agokdc: fixup KDC to use functions portable to MIT krb5
Andrew Bartlett [Sun, 1 Feb 2015 23:38:07 +0000 (12:38 +1300)]
kdc: fixup KDC to use functions portable to MIT krb5

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agotorture-krb5: Do not do post-recv checks if the packet recv failed
Andrew Bartlett [Sat, 7 Feb 2015 07:58:42 +0000 (20:58 +1300)]
torture-krb5: Do not do post-recv checks if the packet recv failed

This may be the cause of the flapping tests in this code previously,
as the recv_buf would be 0 length.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
5 years agoctdb-tests: Add new "ctdb setreclock" test
Martin Schwenke [Mon, 2 Feb 2015 10:21:20 +0000 (21:21 +1100)]
ctdb-tests: Add new "ctdb setreclock" test

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): Wed Feb  4 05:40:55 CET 2015 on sn-devel-104

5 years agoctdb-daemon: Fix SET_RECLOCK_FILE regression
Martin Schwenke [Wed, 28 Jan 2015 07:51:42 +0000 (18:51 +1100)]
ctdb-daemon: Fix SET_RECLOCK_FILE regression

If the recovery lock file is unset then this dereferences a NULL
pointer.  The regression is due to commit
6f1ac7af0f87d85402d708231e45a69713bba026.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agosamba-tool: Create NIS enabled users and unixHomeDirectory attribute
Marc Muehlfeld [Sat, 31 Jan 2015 18:44:26 +0000 (19:44 +0100)]
samba-tool: Create NIS enabled users and unixHomeDirectory attribute

Allow to create NIS enabled user accounts via 'samba-tool user add'.

To create NIS enabled accounts, the parameters
--uid-number=, --login-shell=, --unix-home=, --gid-number=
are mandatory. Because we didn't had a parameter to set unixHomeDirectory
yet, this patch also adds this feature.

'unixUserPassword: ABCD!efgh12345$67890' is added by default, when you
enable NIS on an account in ADUC. The same we do in samba-tool.

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

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Marc Muehlfeld <mmuehlfeld@samba.org>
Autobuild-Date(master): Tue Feb  3 17:18:32 CET 2015 on sn-devel-104

5 years agos4-samdb/tests: Assert on expected set of attributes for new User object
Kamen Mazdrashki [Sun, 25 Jan 2015 19:39:17 +0000 (21:39 +0200)]
s4-samdb/tests: Assert on expected set of attributes for new User object

Change-Id: I225b64ff7492b41852fecb914f464a6c8d504a2c
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb  3 07:30:17 CET 2015 on sn-devel-104

5 years agos4-dsdb/tests: Assert on expected set of attributes for restored objects
Kamen Mazdrashki [Sun, 25 Jan 2015 16:16:58 +0000 (18:16 +0200)]
s4-dsdb/tests: Assert on expected set of attributes for restored objects

Change-Id: I788406d9c3839d108cea508cf2a59488d495f141
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos4-dsdb: Refactor user objects defaults setter to use attribute/value map
Kamen Mazdrashki [Tue, 27 Jan 2015 23:43:10 +0000 (01:43 +0200)]
s4-dsdb: Refactor user objects defaults setter to use attribute/value map

Change-Id: Iaa32af4225219a4c5c42c663022e8be429b8a1d2
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agodsdb: Do not use _ prefix in tombstone_reanimate module
Andrew Bartlett [Thu, 22 Jan 2015 04:22:52 +0000 (17:22 +1300)]
dsdb: Do not use _ prefix in tombstone_reanimate module

This should only be used by the C library.

Andrew Bartlett

Change-Id: I00da64de1443a7c6b21aafae79e126180eb1a3d4
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
5 years agos4-dsdb: common helper to determine "primaryGroupID" attribute value
Kamen Mazdrashki [Sun, 18 Jan 2015 21:58:13 +0000 (23:58 +0200)]
s4-dsdb: common helper to determine "primaryGroupID" attribute value

At the moment current implementation does not check if group RID
is existing group RID - this responsibility is left to the caller.

Change-Id: I8c58dd23a7185d63fa2117be0617884eb78d13c1
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agos4-dsdb: Common helper for setting "sAMAccountType" on User objects
Kamen Mazdrashki [Mon, 12 Jan 2015 02:46:38 +0000 (04:46 +0200)]
s4-dsdb: Common helper for setting "sAMAccountType" on User objects

Change-Id: I4480e7d1ed0c754e960028e0be9a90ee56935e94
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agos4-dsdb: Move User object default attribute values in separate helper
Kamen Mazdrashki [Mon, 12 Jan 2015 01:30:17 +0000 (03:30 +0200)]
s4-dsdb: Move User object default attribute values in separate helper

Change-Id: I1e291bcf0a5c9b2fca11323dc7f8be29f5145d42
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agos4-tests: Add tombstone_reanimation test case to s4 test suite
Kamen Mazdrashki [Tue, 20 Jan 2015 23:03:13 +0000 (01:03 +0200)]
s4-tests: Add tombstone_reanimation test case to s4 test suite

DC, USERNAME and PASSWORD are passed as environment variables
prefixed with TEST_

Change-Id: I84ff628496bfa3e0538011400328585d080f21b8
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agos4-dsdb/tests: Do not pre-create LoadParm - connect_samdb_env() will handle it
Kamen Mazdrashki [Sun, 28 Dec 2014 02:23:33 +0000 (04:23 +0200)]
s4-dsdb/tests: Do not pre-create LoadParm - connect_samdb_env() will handle it

Change-Id: I3483c5aa50de2f7aca19e4d7cc4fa49bbe5f889d
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
5 years agos4-dsdb-test: Use common base method for restoring Deleted objects
Kamen Mazdrashki [Thu, 27 Nov 2014 16:49:15 +0000 (17:49 +0100)]
s4-dsdb-test: Use common base method for restoring Deleted objects

Change-Id: I266b58ced814cf7ea3616862506df5b55f4f1d8c
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>