Bug 7471 - cli_krb5_get_ticket() used unconditionally in .../source3/libsmb/clispnego.c
cli_krb5_get_ticket() used unconditionally in .../source3/libsmb/clispnego.c
Status: RESOLVED WORKSFORME
Product: Samba 3.5
Classification: Unclassified
Component: Build environment
3.5.3
Other Other
: P3 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-28 02:27 UTC by Joachim Schmitz
Modified: 2012-09-18 15:03 UTC (History)
0 users

See Also:


Attachments
patch (1.53 KB, patch)
2010-09-27 07:53 UTC, Joachim Schmitz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Schmitz 2010-05-28 02:27:29 UTC
cli_krb5_get_ticket() used unconditionally in .../source3/libsmb/clispnego.c.
Possible patch (but I'm not really sure whether this is a good one):

diff -u ./source3/libsmb/clispnego.c.orig ./source3/libsmb/clispnego.c
--- ./source3/libsmb/clispnego.c.orig	2010-05-17 06:51:23.000000000 -0500
+++ ./source3/libsmb/clispnego.c	2010-05-27 05:12:43.000000000 -0500
@@ -387,6 +387,7 @@
 	DATA_BLOB tkt, tkt_wrapped;
 	const char *krb_mechs[] = {OID_KERBEROS5_OLD, OID_KERBEROS5, OID_NTLMSSP, NULL};
 
+#ifdef HAVE_KRB5 /* ??? TODO! */
 	/* get a kerberos ticket for the service and extract the session key */
 	retval = cli_krb5_get_ticket(principal, time_offset,
 					&tkt, session_key_krb5, extra_ap_opts, NULL, 
@@ -394,6 +395,7 @@
 
 	if (retval)
 		return retval;
+#endif
 
 	/* wrap that up in a nice GSS-API wrapping */
 	tkt_wrapped = spnego_gen_krb5_wrap(tkt, TOK_ID_KRB_AP_REQ);


bye, Jojo
Comment 1 Joachim Schmitz 2010-09-27 07:53:59 UTC
Created attachment 5987 [details]
patch

Actually the real problem was a missing prototype. In connection wioth c99 style (neede foe desiganated initializer) this led to a compiler error.
Attached patch has 2 alternatives of fixing this, i.e. only one of the 2 changes is needed.
Comment 2 Joachim Schmitz 2012-09-18 15:03:37 UTC
Seems to be fixed, I haven't seen this issue in recent samba versions anymore