sfrench/samba-autobuild/.git
7 years agopidl: support HRESULT as return code in wireshark autogenerated dissectors.
Günther Deschner [Mon, 28 Sep 2015 05:28:28 +0000 (07:28 +0200)]
pidl: support HRESULT as return code in wireshark autogenerated dissectors.

Guenther

Change-Id: I68b7c579c5a519e429d2f4c2b3f63247e02f24e3
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-on: https://code.wireshark.org/review/16718
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agotevent: fix confused documentation
Michael Adam [Mon, 5 Sep 2016 15:33:38 +0000 (17:33 +0200)]
tevent: fix confused documentation

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep  6 23:16:34 CEST 2016 on sn-devel-144

7 years agoidmap_script: add missing "IDTOSID" argument to the script command line.
Björn Baumbach [Fri, 26 Aug 2016 15:16:51 +0000 (17:16 +0200)]
idmap_script: add missing "IDTOSID" argument to the script command line.

According to the documentation the commands should look like
"IDTOSID UID xxxx" instead of "UID xxxx".

This fixes changes of commit b4239ca096738f553b0f9d7fa6aaa4219b72ef7f:
    idmap_script: Parallelize script calls

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

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep  6 19:32:57 CEST 2016 on sn-devel-144

7 years agotests/dns_forwarder: Fail out with an assertion instead OOB error
Garming Sam [Thu, 9 Jun 2016 01:52:38 +0000 (03:52 +0200)]
tests/dns_forwarder: Fail out with an assertion instead OOB error

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Sep  6 15:41:54 CEST 2016 on sn-devel-144

7 years agotests/dns_forwarder: Check that the subprocess is still living
Garming Sam [Thu, 7 Jul 2016 04:58:27 +0000 (16:58 +1200)]
tests/dns_forwarder: Check that the subprocess is still living

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/dns_forwarder: Wait for port for 15 seconds
Garming Sam [Mon, 5 Sep 2016 22:48:57 +0000 (10:48 +1200)]
tests/dns_forwarder: Wait for port for 15 seconds

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agosamba-tool: Remove --use-xattrs support without --use-ntvfs
Andrew Bartlett [Sun, 4 Sep 2016 09:33:30 +0000 (21:33 +1200)]
samba-tool: Remove --use-xattrs support without --use-ntvfs

The only reasonable use --use-xattrs=no should be used is in selftest,
and there is no need for that or --use-xattrs=auto without
--use-ntvfs, all systems we support in production for the AD DC have
xattrs, as using smbd needs posix ACLs.

This also removes the option entirely if NTVFS support is omitted from
the build.

I would prefer to get rid of the option, but currently selftest relies
on the default of --use-xattrs=auto, and we first should get rid of
that auto-detection, which will then mean we need --use-xattrs=no
specified wherever we specify --use-ntvfs.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Sep  6 04:21:42 CEST 2016 on sn-devel-144

7 years agowafsamba: add -Werror=format-security to the developer build
Stefan Metzmacher [Fri, 2 Sep 2016 15:23:28 +0000 (17:23 +0200)]
wafsamba: add -Werror=format-security to the developer build

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep  5 20:23:00 CEST 2016 on sn-devel-144

7 years agoselftest: detect older tshark version
Uri Simchoni [Mon, 5 Sep 2016 05:52:52 +0000 (08:52 +0300)]
selftest: detect older tshark version

Detect older versions of tshark, which do not recognize
the -Y option, and skip the kerberos enc type tests

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep  5 16:31:58 CEST 2016 on sn-devel-144

7 years agocopyright: Add the missing notices for garbage collect tombstones
Bob Campbell [Sun, 4 Sep 2016 23:24:19 +0000 (11:24 +1200)]
copyright: Add the missing notices for garbage collect tombstones

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Mon Sep  5 08:14:26 CEST 2016 on sn-devel-144

7 years agodsdb: refactor part of garbage_collect_tombstones into new function
Bob Campbell [Sun, 4 Sep 2016 22:48:13 +0000 (10:48 +1200)]
dsdb: refactor part of garbage_collect_tombstones into new function

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agoscript/release.sh: use 8 byte gpg key ids
Stefan Metzmacher [Fri, 2 Sep 2016 06:47:56 +0000 (08:47 +0200)]
script/release.sh: use 8 byte gpg key ids

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  2 22:05:33 CEST 2016 on sn-devel-144

7 years agogensec/spnego: work around missing server mechListMIC in SMB servers
Stefan Metzmacher [Thu, 1 Sep 2016 06:08:23 +0000 (08:08 +0200)]
gensec/spnego: work around missing server mechListMIC in SMB servers

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Sep  2 18:10:44 CEST 2016 on sn-devel-144

7 years agokcc: Fix a -Werror,-Wformat-security error
Volker Lendecke [Fri, 2 Sep 2016 07:17:33 +0000 (09:17 +0200)]
kcc: Fix a -Werror,-Wformat-security error

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): Fri Sep  2 13:54:45 CEST 2016 on sn-devel-144

7 years agos4-dsdb: Change debug level for replication
Andreas Schneider [Wed, 24 Aug 2016 09:33:16 +0000 (11:33 +0200)]
s4-dsdb: Change debug level for replication

Most of the time it is spamming the logs, so increase the level to debug
for most messages.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  2 05:06:00 CEST 2016 on sn-devel-144

7 years agokrb5_wrap: Remove extra parentheses causing compile error
Anoop C S [Thu, 1 Sep 2016 05:55:32 +0000 (11:25 +0530)]
krb5_wrap: Remove extra parentheses causing compile error

Signed-off-by: Anoop C S <anoopcs@redhat.com>
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): Thu Sep  1 21:02:54 CEST 2016 on sn-devel-144

7 years agoctdb-tests: Add a test to ensure that CTDB works with no eventscripts
Martin Schwenke [Mon, 29 Aug 2016 06:52:45 +0000 (16:52 +1000)]
ctdb-tests: Add a test to ensure that CTDB works with no eventscripts

This only tests something on local daemons, since the configuration
can't be easily manipulated on a real cluster.

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

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): Thu Sep  1 17:15:06 CEST 2016 on sn-devel-144

7 years agoctdb-tests: Conditionally use temporary config file for local daemons
Martin Schwenke [Mon, 29 Aug 2016 06:49:07 +0000 (16:49 +1000)]
ctdb-tests: Conditionally use temporary config file for local daemons

If there's configuration in the environment then daemons_start()
should use a temporary configuration file with that appended.

This means that global overrides don't (harmlessly) build up in the
configuration file during each test and individual tests can override
configuration when calling daemons_start() directly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-tests: Factor out function config_from_environment()
Martin Schwenke [Mon, 29 Aug 2016 06:05:33 +0000 (16:05 +1000)]
ctdb-tests: Factor out function config_from_environment()

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Don't steal control structure before synchronous reply
Martin Schwenke [Tue, 30 Aug 2016 22:29:13 +0000 (08:29 +1000)]
ctdb-daemon: Don't steal control structure before synchronous reply

If *async_reply isn't set then the calling code will reply to the
control and free the control structure.  In some places the control
structure pointer is stolen onto state before a synchronous exit due
to an error condition.  The error handling then frees state and
returns an error.  The calling code will access-after-free when trying
to reply to the control.

To make this easier to understand, the convention is that any
(immediate) error results in a synchronous reply to the control via an
error return code AND *async_reply not being set.  In this case the
control structure pointer should never be stolen onto state.  State is
never used for a synchronous reply, it is only ever used by a
callback.

Also initialise state->c to NULL so that any premature call to a
callback (e.g. in an immediate error path) is more obvious.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Handle failure immediately, do housekeeping later
Martin Schwenke [Fri, 26 Aug 2016 06:38:56 +0000 (16:38 +1000)]
ctdb-daemon: Handle failure immediately, do housekeeping later

The callback should never be called before an immediate return.  The
callback might reply to a control and the caller of
ctdb_event_script_callback_v() may not have assigned/stolen the
pointer to control structure into the private data.  Therefore,
calling the callback can dereference an uninitialised pointer to the
control structure when attempting to reply.

An event script isn't being run until the child has been forked.  So
update relevant state and set the destructor after this.

If the child can't be forked then free the state and return with an
error.  The callback will not be called and the caller will process
the error correctly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoctdb-daemon: Schedule running of callback if there are no event scripts
Martin Schwenke [Fri, 26 Aug 2016 06:29:47 +0000 (16:29 +1000)]
ctdb-daemon: Schedule running of callback if there are no event scripts

The callback should never be called before an immediate return.  The
callback might reply to a control and the caller of
ctdb_event_script_callback_v() may not have assigned/stolen the
pointer to control structure into the private data.  Therefore,
calling the callback can dereference an uninitialised pointer to the
control structure when attempting to reply.

ctdb_event_script_callback_v() must succeed when there are no event
scripts.  On success the caller will mark the call as asynchronous and
expect the callback to be called.  Given that it can't be called
before return then it needs to be scheduled.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agoRemove unused python selftest
Douglas Bagnall [Tue, 23 Aug 2016 00:11:59 +0000 (12:11 +1200)]
Remove unused python selftest

It doesn't work, isn't changing, and causes a little bit of extra
confusion.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep  1 13:29:46 CEST 2016 on sn-devel-144

7 years agogc_tombstones: Typo fix
Garming Sam [Thu, 1 Sep 2016 02:26:53 +0000 (14:26 +1200)]
gc_tombstones: Typo fix

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglasbagnall@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Thu Sep  1 09:38:47 CEST 2016 on sn-devel-144

7 years agodsdb: Do not check isDeleted as a possible link
Andrew Bartlett [Thu, 1 Sep 2016 02:17:27 +0000 (14:17 +1200)]
dsdb: Do not check isDeleted as a possible link

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agolib/ldb-samba: Add test for DSDB_MATCH_FOR_EXPUNGE match rule
Andrew Bartlett [Thu, 1 Sep 2016 01:34:12 +0000 (13:34 +1200)]
lib/ldb-samba: Add test for DSDB_MATCH_FOR_EXPUNGE match rule

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agodsdb: Add comments to dsdb_garbage_collect_tombstones()
Andrew Bartlett [Thu, 1 Sep 2016 01:23:11 +0000 (13:23 +1200)]
dsdb: Add comments to dsdb_garbage_collect_tombstones()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agosamba-tool: Run samba-tool domain tombstones expunge in a transaction
Andrew Bartlett [Thu, 1 Sep 2016 00:13:40 +0000 (12:13 +1200)]
samba-tool: Run samba-tool domain tombstones expunge in a transaction

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoselftest: Add test for 'samba-tool tombstones expunge'
Andrew Bartlett [Wed, 31 Aug 2016 05:07:29 +0000 (17:07 +1200)]
selftest: Add test for 'samba-tool tombstones expunge'

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agodsdb: Use a date comparison in the search to avoid returning all deleted objects
Andrew Bartlett [Mon, 29 Aug 2016 22:30:51 +0000 (10:30 +1200)]
dsdb: Use a date comparison in the search to avoid returning all deleted objects

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agodsdb: Expose ldb error string to dsdb_garbage_collect_tombstones() callers
Andrew Bartlett [Mon, 29 Aug 2016 22:22:47 +0000 (10:22 +1200)]
dsdb: Expose ldb error string to dsdb_garbage_collect_tombstones() callers

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agosamba-tool: Add command-line tool to trigger tombstone expunge
Andrew Bartlett [Mon, 29 Aug 2016 06:36:19 +0000 (18:36 +1200)]
samba-tool: Add command-line tool to trigger tombstone expunge

This allows us to carefully test the garbage collection of tombstoned objects
without running the full server and waiting for the timer to expire

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agopython: Add binding for dsdb_garbage_collect_tombstones()
Andrew Bartlett [Mon, 18 Jul 2016 01:11:10 +0000 (13:11 +1200)]
python: Add binding for dsdb_garbage_collect_tombstones()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agodsdb: Expand garbage_collect_tombstones to expunge links also
Andrew Bartlett [Mon, 18 Jul 2016 01:17:52 +0000 (13:17 +1200)]
dsdb: Expand garbage_collect_tombstones to expunge links also

This requires a significant rework, as we can no longer
do a one-level search and hope to find most of the deleted
objects.  Therefore we fall back to a full scan, but less often.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agodsdb: move tombstone lifetime calculation out of dsdb_garbage_collect_tombstones()
Andrew Bartlett [Mon, 29 Aug 2016 07:02:39 +0000 (19:02 +1200)]
dsdb: move tombstone lifetime calculation out of dsdb_garbage_collect_tombstones()

This will allow it to be specified by the caller when we add python bindings

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agodsdb: Rework more KCC service-specific details out of dsdb_garbage_collect_tombstones()
Andrew Bartlett [Mon, 29 Aug 2016 06:56:10 +0000 (18:56 +1200)]
dsdb: Rework more KCC service-specific details out of dsdb_garbage_collect_tombstones()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agodsdb: Rework kcc_deleted() into dsdb_garbage_collect_tombstones()
Andrew Bartlett [Mon, 18 Jul 2016 01:10:23 +0000 (13:10 +1200)]
dsdb: Rework kcc_deleted() into dsdb_garbage_collect_tombstones()

This is so that in a future commit, we can wrap this in python and allow it to be called
from outside the samba server processs.

This requires that we rework the callers and internals to avoid reference to
private data structures of the KCC service.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agokcc: Move kcc/kcc_deleted.c into kcc/garbage_collect_tombstones.c
Andrew Bartlett [Sun, 17 Jul 2016 23:53:50 +0000 (11:53 +1200)]
kcc: Move kcc/kcc_deleted.c into kcc/garbage_collect_tombstones.c

This is in preperation for a python binding for this function

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoldb: Fix comment on ldb_register_extended_match_rule
Andrew Bartlett [Mon, 29 Aug 2016 06:20:45 +0000 (18:20 +1200)]
ldb: Fix comment on ldb_register_extended_match_rule

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoldb-samba: Add new extended match rule DSDB_MATCH_FOR_EXPUNGE
Andrew Bartlett [Mon, 29 Aug 2016 06:20:18 +0000 (18:20 +1200)]
ldb-samba: Add new extended match rule DSDB_MATCH_FOR_EXPUNGE

This allows us to find links that need to be expunged
without passing the whole DB up in the search response.

While each message still needs to be examined, this code
only has to do memory allocation for entries with links

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agopydsdb: Raise TypeError for type errors, rather than incorrectly raising an LdbError
Andrew Bartlett [Wed, 24 Aug 2016 23:28:32 +0000 (11:28 +1200)]
pydsdb: Raise TypeError for type errors, rather than incorrectly raising an LdbError

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoselftest: Correct name of samba4.blackbox.dbcheck.release-4-5-0-pre1
Andrew Bartlett [Tue, 30 Aug 2016 23:39:24 +0000 (11:39 +1200)]
selftest: Correct name of samba4.blackbox.dbcheck.release-4-5-0-pre1

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agotevent: Fix some typos
Volker Lendecke [Wed, 31 Aug 2016 14:12:33 +0000 (16:12 +0200)]
tevent: Fix some typos

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 Sep  1 05:48:38 CEST 2016 on sn-devel-144

7 years agoldb: Fix a signed/unsigned hickup
Volker Lendecke [Wed, 31 Aug 2016 13:38:11 +0000 (15:38 +0200)]
ldb: Fix a signed/unsigned hickup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-libads: Do not use deprecated krb5_change_password()
Andreas Schneider [Tue, 30 Aug 2016 10:48:09 +0000 (12:48 +0200)]
s3-libads: Do not use deprecated krb5_change_password()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Sep  1 00:43:51 CEST 2016 on sn-devel-144

7 years agos3-libads: Do not use deprecated krb5_get_init_creds_opt_init()
Andreas Schneider [Fri, 26 Aug 2016 15:08:57 +0000 (17:08 +0200)]
s3-libads: Do not use deprecated krb5_get_init_creds_opt_init()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agos3-libads: Support for MIT Kerberos ntstatus from init_creds
Andreas Schneider [Tue, 30 Aug 2016 10:38:46 +0000 (12:38 +0200)]
s3-libads: Support for MIT Kerberos ntstatus from init_creds

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agos3-libads: Use non-deprecated function to get the error
Andreas Schneider [Tue, 30 Aug 2016 10:33:39 +0000 (12:33 +0200)]
s3-libads: Use non-deprecated function to get the error

krb5_get_init_creds_opt_get_error is deprecated.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agos4-heimdal: Export krb5_init_creds_* functions
Andreas Schneider [Tue, 30 Aug 2016 10:13:11 +0000 (12:13 +0200)]
s4-heimdal: Export krb5_init_creds_* functions

The function krb5_get_init_creds_opt_get_error() is deprecated and
krb5_init_creds_init() and krb5_init_creds_get_error() should be used
now.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agos3-libads: Rename smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt()
Andreas Schneider [Fri, 26 Aug 2016 14:44:05 +0000 (16:44 +0200)]
s3-libads: Rename smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Move unwrap_edata_ntstatus() and make it static
Andreas Schneider [Thu, 25 Aug 2016 15:07:01 +0000 (17:07 +0200)]
krb5_wrap: Move unwrap_edata_ntstatus() and make it static

This also removes the asn1util dependency from krb5_wrap and moves it to
libads which is the only user.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Remove unused smb_krb5_principal_compare_any_realm()
Andreas Schneider [Tue, 30 Aug 2016 12:21:52 +0000 (14:21 +0200)]
krb5_wrap: Remove unused smb_krb5_principal_compare_any_realm()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Remove unused smb_krb5_parse_name_norealm()
Andreas Schneider [Tue, 30 Aug 2016 12:20:03 +0000 (14:20 +0200)]
krb5_wrap: Remove unused smb_krb5_parse_name_norealm()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_unparse_name() documentation
Andreas Schneider [Tue, 30 Aug 2016 12:17:19 +0000 (14:17 +0200)]
krb5_wrap: Improve smb_krb5_unparse_name() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_parse_name() documentation
Andreas Schneider [Tue, 30 Aug 2016 12:13:43 +0000 (14:13 +0200)]
krb5_wrap: Improve smb_krb5_parse_name() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_cc_copy_creds()
Andreas Schneider [Tue, 30 Aug 2016 06:54:04 +0000 (08:54 +0200)]
krb5_wrap: Document smb_krb5_cc_copy_creds()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Use 'samba-kdc' for com_err whoami in krb5_warnx()
Andreas Schneider [Tue, 30 Aug 2016 06:50:26 +0000 (08:50 +0200)]
krb5_wrap: Use 'samba-kdc' for com_err whoami in krb5_warnx()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve krb5_warnx() documentation
Andreas Schneider [Tue, 30 Aug 2016 06:50:05 +0000 (08:50 +0200)]
krb5_wrap: Improve krb5_warnx() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_principal_set_type() documentation
Andreas Schneider [Tue, 30 Aug 2016 06:44:27 +0000 (08:44 +0200)]
krb5_wrap: Improve smb_krb5_principal_set_type() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_principal_get_type() documentation
Andreas Schneider [Tue, 30 Aug 2016 06:40:16 +0000 (08:40 +0200)]
krb5_wrap: Improve smb_krb5_principal_get_type() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_get_allowed_weak_crypto() documentation
Andreas Schneider [Mon, 29 Aug 2016 15:27:06 +0000 (17:27 +0200)]
krb5_wrap: Improve smb_krb5_get_allowed_weak_crypto() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_get_krb5_error_message()
Andreas Schneider [Mon, 29 Aug 2016 15:24:41 +0000 (17:24 +0200)]
krb5_wrap: Document smb_get_krb5_error_message()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_get_principal_from_service_hostname()
Andreas Schneider [Mon, 29 Aug 2016 15:22:20 +0000 (17:22 +0200)]
krb5_wrap: Document smb_krb5_get_principal_from_service_hostname()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename kerberos_get_principal_from_service_hostname()
Andreas Schneider [Mon, 29 Aug 2016 15:19:14 +0000 (17:19 +0200)]
krb5_wrap: Rename kerberos_get_principal_from_service_hostname()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_principal_set_realm() documentation
Andreas Schneider [Mon, 29 Aug 2016 15:14:17 +0000 (17:14 +0200)]
krb5_wrap: Improve smb_krb5_principal_set_realm() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Fix documentation of smb_krb5_principal_get_realm()
Andreas Schneider [Mon, 29 Aug 2016 15:11:32 +0000 (17:11 +0200)]
krb5_wrap: Fix documentation of smb_krb5_principal_get_realm()

Create a valid doxygen documentation.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_make_pac_checksum()
Andreas Schneider [Mon, 29 Aug 2016 15:09:02 +0000 (17:09 +0200)]
krb5_wrap: Document smb_krb5_make_pac_checksum()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_make_principal()
Andreas Schneider [Mon, 29 Aug 2016 10:10:48 +0000 (12:10 +0200)]
krb5_wrap: Document smb_krb5_make_principal()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_kinit_s4u2_ccache() documentation
Andreas Schneider [Mon, 29 Aug 2016 10:04:43 +0000 (12:04 +0200)]
krb5_wrap: Improve smb_krb5_kinit_s4u2_ccache() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename kerberos_kinit_s4u2_cc()
Andreas Schneider [Mon, 29 Aug 2016 09:59:18 +0000 (11:59 +0200)]
krb5_wrap: Rename kerberos_kinit_s4u2_cc()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_kinit_password_ccache()
Andreas Schneider [Mon, 29 Aug 2016 09:53:06 +0000 (11:53 +0200)]
krb5_wrap: Document smb_krb5_kinit_password_ccache()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename kerberos_kinit_password_cc()
Andreas Schneider [Mon, 29 Aug 2016 09:47:11 +0000 (11:47 +0200)]
krb5_wrap: Rename kerberos_kinit_password_cc()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Improve smb_krb5_kinit_keyblock_cache() documentation
Andreas Schneider [Mon, 29 Aug 2016 09:41:04 +0000 (11:41 +0200)]
krb5_wrap: Improve smb_krb5_kinit_keyblock_cache() documentation

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename kerberos_kinit_keyblock_cc()
Andreas Schneider [Mon, 29 Aug 2016 09:33:24 +0000 (11:33 +0200)]
krb5_wrap: Rename kerberos_kinit_keyblock_cc()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Add MIT implmentation of smb_krb5_keyblock_init_contents()
Andreas Schneider [Mon, 29 Aug 2016 09:29:34 +0000 (11:29 +0200)]
krb5_wrap: Add MIT implmentation of smb_krb5_keyblock_init_contents()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agowaf: Check for the correct function name
Andreas Schneider [Mon, 29 Aug 2016 09:22:29 +0000 (11:22 +0200)]
waf: Check for the correct function name

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_keyblock_init_contents()
Andreas Schneider [Mon, 29 Aug 2016 09:21:07 +0000 (11:21 +0200)]
krb5_wrap: Document smb_krb5_keyblock_init_contents()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_kt_get_name()
Andreas Schneider [Mon, 29 Aug 2016 09:10:30 +0000 (11:10 +0200)]
krb5_wrap: Document smb_krb5_kt_get_name()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename smb_krb5_keytab_name()
Andreas Schneider [Mon, 29 Aug 2016 09:07:48 +0000 (11:07 +0200)]
krb5_wrap: Rename smb_krb5_keytab_name()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_kt_open()
Andreas Schneider [Mon, 29 Aug 2016 09:05:19 +0000 (11:05 +0200)]
krb5_wrap: Document smb_krb5_kt_open()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename smb_krb5_open_keytab()
Andreas Schneider [Mon, 29 Aug 2016 09:03:51 +0000 (11:03 +0200)]
krb5_wrap: Rename smb_krb5_open_keytab()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Fix whitespace issues in smb_krb5_kt_open_relative()
Andreas Schneider [Mon, 29 Aug 2016 08:58:43 +0000 (10:58 +0200)]
krb5_wrap: Fix whitespace issues in smb_krb5_kt_open_relative()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_kt_open_relative()
Andreas Schneider [Mon, 29 Aug 2016 08:46:26 +0000 (10:46 +0200)]
krb5_wrap: Document smb_krb5_kt_open_relative()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename smb_krb5_open_keytab_relative()
Andreas Schneider [Mon, 29 Aug 2016 08:42:57 +0000 (10:42 +0200)]
krb5_wrap: Rename smb_krb5_open_keytab_relative()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_enctype_to_string()
Andreas Schneider [Mon, 29 Aug 2016 07:32:25 +0000 (09:32 +0200)]
krb5_wrap: Document smb_krb5_enctype_to_string()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_kt_free_entry()
Andreas Schneider [Mon, 29 Aug 2016 07:29:57 +0000 (09:29 +0200)]
krb5_wrap: Document smb_krb5_kt_free_entry()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_kt_get_enctype_from_entry()
Andreas Schneider [Mon, 29 Aug 2016 07:27:55 +0000 (09:27 +0200)]
krb5_wrap: Document smb_krb5_kt_get_enctype_from_entry()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename smb_get_enctype_from_kt_entry()
Andreas Schneider [Mon, 29 Aug 2016 07:17:37 +0000 (09:17 +0200)]
krb5_wrap: Rename smb_get_enctype_from_kt_entry()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Remove unneeded smb_krb5_get_init_creds_opt_free()
Andreas Schneider [Mon, 29 Aug 2016 07:13:51 +0000 (09:13 +0200)]
krb5_wrap: Remove unneeded smb_krb5_get_init_creds_opt_free()

Call the Kerberos function directly.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Remove unneeded smb_krb5_get_init_creds_opt_alloc()
Andreas Schneider [Mon, 29 Aug 2016 07:12:38 +0000 (09:12 +0200)]
krb5_wrap: Remove unneeded smb_krb5_get_init_creds_opt_alloc()

Call the Kerberos function directly.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Remove unused handle_krberror_packet()
Andreas Schneider [Mon, 29 Aug 2016 07:11:17 +0000 (09:11 +0200)]
krb5_wrap: Remove unused handle_krberror_packet()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Remove unneded smb_krb5_free_error()
Andreas Schneider [Mon, 29 Aug 2016 07:09:18 +0000 (09:09 +0200)]
krb5_wrap: Remove unneded smb_krb5_free_error()

krb5_free_error() is availalbe in MIT and Heimdal. Both implementations
free the contents and the pointer. krb5_free_data_contents() is Heimdal
only. Which function you need to call depends.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_gen_netbios_krb5_address()
Andreas Schneider [Mon, 29 Aug 2016 06:57:47 +0000 (08:57 +0200)]
krb5_wrap: Document smb_krb5_gen_netbios_krb5_address()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_free_addresses()
Andreas Schneider [Mon, 29 Aug 2016 06:53:56 +0000 (08:53 +0200)]
krb5_wrap: Document smb_krb5_free_addresses()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Document smb_krb5_renew_ticket()
Andreas Schneider [Mon, 29 Aug 2016 06:50:28 +0000 (08:50 +0200)]
krb5_wrap: Document smb_krb5_renew_ticket()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Remove redundant comment
Andreas Schneider [Mon, 29 Aug 2016 06:36:59 +0000 (08:36 +0200)]
krb5_wrap: Remove redundant comment

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Move krb5_princ_component() to the top
Andreas Schneider [Mon, 29 Aug 2016 06:35:54 +0000 (08:35 +0200)]
krb5_wrap: Move krb5_princ_component() to the top

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Rename get_krb5_smb_session_key()
Andreas Schneider [Fri, 26 Aug 2016 15:07:18 +0000 (17:07 +0200)]
krb5_wrap: Rename get_krb5_smb_session_key()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Move krb5_free_unparsed_name() to the top
Andreas Schneider [Fri, 26 Aug 2016 14:54:12 +0000 (16:54 +0200)]
krb5_wrap: Move krb5_free_unparsed_name() to the top

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agokrb5_wrap: Cleanup some code in ads_krb5_cli_get_ticket()
Andreas Schneider [Fri, 26 Aug 2016 14:51:38 +0000 (16:51 +0200)]
krb5_wrap: Cleanup some code in ads_krb5_cli_get_ticket()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>