Wireshark-bugs: [Wireshark-bugs] [Bug 4518] New: somewhat misleading error messages in -K option

Date: Tue, 23 Feb 2010 09:48:32 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4518

           Summary: somewhat misleading error messages in -K option
                    processing
           Product: Wireshark
           Version: 1.2.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Low
         Component: TShark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: jlselsewh@xxxxxxxxx


Build Information:
Wireshark and tshark 1.2.5, built from source.
--
In epan/dissectors/packet-kerberos.c, there is this code in a couple of places
for beginning the -K keytab-file processing:

        /* should use a file in the wireshark users dir */
        ret = krb5_kt_resolve(krb5_ctx, filename, &keytab);
        if(ret){
                fprintf(stderr, "KERBEROS ERROR: Could not open keytab file
:%s\n",filename);

                return;
        }

        ret = krb5_kt_start_seq_get(krb5_ctx, keytab, &cursor);
        if(ret){
                fprintf(stderr, "KERBEROS ERROR: Could not read from keytab
file :%s\n",filename);
                return;
        }

The two error messages are a bit misleading.  Per the KRB5 API doc at
http://www.ncsa.illinois.edu/UserInfo/Resources/Software/kerberos/krb5api/krb5api4.html
and elsewhere, krb5_kt_resolve() does *not* try to open the keytab file, but
rather just sees if the name is wrongly formatted.  So the first message should
be "Could not resolve keytab file ..."  If the keytab filename is wrong, it
will be detected in the call to krb5_kt_start_seq_get().  So the second message
should be something like "Could not open or read from keytab file ...".

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.