[PATCH] Fix kerberos authentication with Vista
Stefan (metze) Metzmacher
metze at samba.org
Tue Dec 11 17:19:28 GMT 2007
Hi Andreas,
> DEBUG(3,("got principal=%s\n", principal ? principal : "<null>"));
>
> + /* If we get a bad principal, try to guess it */
> + if (strcmp(principal, CLI_IGNORE_PRINCIPAL) == 0) {
> + char *realm = NULL;
> + DEBUG(3,("got a bad principal, trying to guess ...\n"));
> + realm = lp_realm();
> + if (realm && *realm) {
> + asprintf(&principal, "%s$@%s", cli->called.name, realm);
> + DEBUG(3,("guessed principal=%s\n", principal ? principal : "<null>"));
> + } else {
> + DEBUG(0,("please specify 'realm =' in smb.conf\n"));
> + }
> + }
> +
> if (got_kerberos_mechanism && (principal == NULL)) {
> /*
> * It is WRONG to depend on the principal sent in the negprot
when is the principal from asprintf() free'ed?
Also we should share some code with the libads/ principal detection...
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20071211/5be444ce/signature.bin
More information about the samba-technical
mailing list