[Samba] samba-3.2.8 - KRB5_KT_UNKNOWN_TYPE;
Jeremy Allison
jra at samba.org
Tue Feb 17 23:31:29 GMT 2009
On Mon, Feb 16, 2009 at 08:33:47AM -0700, Glenn Machin wrote:
>
> When "use kerberos keytab = yes" in smb.conf is set with samba-3.2.8 and
> the environment variable KRB5_KTNAME is not set with the value using
> prefix "FILE:" or the default_keytab in /etc/krb5.conf is set without
> the prefix i.e.
> default_keytab_name = /etc/v5srvtab
>
> then the function smb_krb5_open_keytab() returns KRB5_KT_UNKNOWN_TYPE.
>
> If smb_krb5_open_keytab with a filename "/etc/v5srvtab" it would work
> fine, however if the "default" keytab is used the expectation is that it
> must have a prefix "FILE:" or "WRFILE:".
>
> Is this the correct logic? It appears that the loop
> while (next_token_talloc(mem_ctx, &tmp, &kt_str, ",")) {
>
> Should have the test
>
> if (tmp[0] == '/')
> found_valid_name = True;
Looks correct to me. Here is the patch I'll add.
Thanks,
Jeremy.
-------------- next part --------------
diff --git a/source/libsmb/clikrb5.c b/source/libsmb/clikrb5.c
index 66dd5f6..9fd4914 100644
--- a/source/libsmb/clikrb5.c
+++ b/source/libsmb/clikrb5.c
@@ -1749,6 +1749,11 @@ done:
tmp += 5;
}
+ if (tmp[0] == '/') {
+ /* Treat as a FILE: keytab definition. */
+ found_valid_name = true;
+ }
+
if (found_valid_name) {
if (tmp[0] != '/') {
ret = KRB5_KT_BADNAME;
More information about the samba
mailing list