Bug 7471 - cli_krb5_get_ticket() used unconditionally in .../source3/libsmb/clispnego.c
Summary: cli_krb5_get_ticket() used unconditionally in .../source3/libsmb/clispnego.c
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.5.3
Hardware: Other Other
: P3 normal
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-05-28 02:27 UTC by Joachim Schmitz (mail address dead)
Modified: 2012-09-18 15:03 UTC (History)
0 users

See Also:

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

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Schmitz (mail address dead) 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;
 	/* 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 (mail address dead) 2010-09-27 07:53:59 UTC
Created attachment 5987 [details]

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 (mail address dead) 2012-09-18 15:03:37 UTC
Seems to be fixed, I haven't seen this issue in recent samba versions anymore