diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-09-20 21:29:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:31 -0500 |
commit | 65d4da0ff330740788c4386a71526b6ed3e10162 (patch) | |
tree | c9e4cdd692637af5128325b32ae9e57b7e839309 /source4/lib/credentials.c | |
parent | 9a1ceab6d60549f3c983dd1cf1f9a9ea2ba5dc79 (diff) | |
download | samba-65d4da0ff330740788c4386a71526b6ed3e10162.tar.gz samba-65d4da0ff330740788c4386a71526b6ed3e10162.tar.bz2 samba-65d4da0ff330740788c4386a71526b6ed3e10162.zip |
r10364: Turn gensec:gssapi on by default, except for a login of the form
-Udomain\\user.
This will probably break in a few configurations, so please let me
know. I'll also work to have a way to inhibit kerberos/ntlmssp, as
this removes -k.
Andrew Bartlett
(This used to be commit 3c0dc570b86e79aea5446d7c3bb9750a11bf8ca4)
Diffstat (limited to 'source4/lib/credentials.c')
-rw-r--r-- | source4/lib/credentials.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/lib/credentials.c b/source4/lib/credentials.c index cdef9042b8..4650fee1af 100644 --- a/source4/lib/credentials.c +++ b/source4/lib/credentials.c @@ -121,9 +121,13 @@ const char *cli_credentials_get_principal(struct cli_credentials *cred, TALLOC_C } if (cred->principal_obtained < cred->username_obtained) { - return talloc_asprintf(mem_ctx, "%s@%s", - cli_credentials_get_username(cred, mem_ctx), - cli_credentials_get_realm(cred)); + if (cred->domain_obtained > cred->realm_obtained) { + return NULL; + } else { + return talloc_asprintf(mem_ctx, "%s@%s", + cli_credentials_get_username(cred, mem_ctx), + cli_credentials_get_realm(cred)); + } } return talloc_reference(mem_ctx, cred->principal); } |