libads: ensure the right ccache is used during gssapi bind
authorStefan Metzmacher <metze@samba.org>
Wed, 6 Jul 2016 10:48:11 +0000 (12:48 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 11 Jul 2016 21:46:17 +0000 (23:46 +0200)
commit2672968851966e5c01e4fc4d906b45b5c047e655
treec73280f269301d7ec3d5a1181dcc73198b4811e3
parenta391e9202db6a8f64f2fe12d0ab5752f6e684f84
libads: ensure the right ccache is used during gssapi bind

When doing gssapi 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>
source3/libads/sasl.c