diff options
Diffstat (limited to 'source/libsmb/cliconnect.c')
-rw-r--r-- | source/libsmb/cliconnect.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index 6e6f7a5ebe9..983d9012f04 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -762,7 +762,20 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, #endif free(OIDs[i]); } - DEBUG(3,("got principal=%s\n", principal)); + + DEBUG(3,("got principal=%s\n", principal ? principal : "<null>")); + + if (got_kerberos_mechanism && (principal == NULL)) { + /* + * It is WRONG to depend on the principal sent in the negprot + * reply, but right now we do it. So for safety (don't + * segfault later) disable Kerberos when no principal was + * sent. -- VL + */ + DEBUG(1, ("Kerberos mech was offered, but no principal was sent\n")); + DEBUGADD(1, ("Disabling Kerberos\n")); + cli->use_kerberos = False; + } fstrcpy(cli->user_name, user); |