Ticket #6 (closed enhancement: fixed)

Opened 17 years ago

Last modified 16 years ago

Nothing is using com_err

Reported by: broder Assigned to: broder
Priority: major Component: macathena-standard
Keywords: Cc:

Description

In particular, moira and discuss at least are not printing out the actual error code texts, just the error codes.

We should probably get help from eichin or someone who actually knows what the hell com_err does to try and fix this.

Attachments

com_err_hate.diff (8.8 kB) - added by broder on 05/05/08 14:00:30.
Difference between compile_et on Linux and on OS X

Change History

02/06/08 02:20:14 changed by broder

  • status changed from new to assigned.

Spent a while screwing around with this tonight. Here's what I found:

Apparently I'm linking against the com_err that comes with the OS X Kerberos framework. This is, of course, yet another com_err. It seems to assume that things linking against it are all bundles, and offers the convenient option of putting the error table into the bundle's Localizable.strings. Failing that, it seems to look in various paths like /Library/Managed Preferences/evan/discuss.plist, /Library/Managed Preferences/discuss.plist, /Users/evan/Library/Preferences/ByHost/discuss.0017f2c8b92a.plist (the hex string, for the record, is my MAC address), /Users/evan/Library/Preferences/discuss.plist, and so forth.

I've tried the obvious approach to creating an error table that com_err will like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>KEManager 32201987</key>
	<string>dsc</string>
	<key>KEMessage 32201987</key>
	<string>Meeting does not exist</string>
</dict>
</plist>

but that doesn't seem to be it.

02/06/08 02:24:21 changed by broder

Oh - if other people feel like checking this out, the source code for OS X's Kerberos framework is at http://www.opensource.apple.com/darwinsource/10.5.1/ (search for Kerberos - you can't miss it).

The relevant files seem to be KerberosFramework/KerberosErrors/Sources/com_err.c and KerberosFramework/KerberosLogin/Sources/KerberosLogin/KLString.c

05/05/08 14:00:30 changed by broder

  • attachment com_err_hate.diff added.

Difference between compile_et on Linux and on OS X

05/05/08 14:02:36 changed by broder

  • priority changed from minor to major.

jdreed pointed me specifically at the differences between compile_et on different platforms as being responsible for the com_err issues. I've posted the diff of the output on Debathena and on MacAthena. I'm not really sure how to reconcile this without providing my own copy of compile_et, though. Suggestions would be appreciated.

01/11/09 02:12:14 changed by broder

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in r172, r173, r174

On Linux systems, initialize_foo_error_table(), well, initializes an error table.

On OS X, compile_et creates an initialize_foo_error_table() macro that does nothing. If you're linking the error table into a bundle via a Localizable.strings file, it's not necessary to do anything to initialize the error table.

However, if you're not using a bundle, then you have to use add_error_table(&et_foo_error_table) to initialize the error table.

Patches to fix all versions have been upstreamed into the Athena svn repository in revisions 23271, 23277, 23278, and 23279