libads: ensure the right ccache is used during spnego bind
commita1743de74f09d5bf695f077f5127d02352a014e2
authorStefan Metzmacher <metze@samba.org>
Wed, 6 Jul 2016 10:44:11 +0000 (6 12:44 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 12 Jul 2016 01:23:33 +0000 (12 03:23 +0200)
treec30ca61261f2c2674bb38754dfbc93c985fd7cd5
parent2672968851966e5c01e4fc4d906b45b5c047e655
libads: ensure the right ccache is used during spnego bind

When doing spnego sasl bind:
1. Try working without kinit only if a password is not
   provided
2. When using kinit, ensure the KRB5CCNAME env var is set
   to a private memory ccache, so that the bind is on behalf
   of the requested user.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 12 03:23:33 CEST 2016 on sn-devel-144
source3/libads/sasl.c