[381] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Re: parse/unparse inconsistency

daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Mon Oct 18 23:01:44 1993

Date: Mon, 18 Oct 93 23:00:22 EDT
From: tytso@MIT.EDU (Theodore Ts'o)
To: Jim_Miller@suite.com
Cc: krb5-bugs@MIT.EDU
In-Reply-To: Jim Miller's message of Mon, 18 Oct 93 19:11:13 -0500,

   From: jim@bilbo.suite.com (Jim Miller)
   Date: Mon, 18 Oct 93 19:11:13 -0500

   Krb5_unparse_name does not handle '\n' or '\b'.  Or perhaps,
   krb5_parse_name handles them unnecessarily.

krb5_parse_name handles the unnecessarily; this is not a problem though,
since while 

	For all krb5_principals x, krb5_parse(krb5_unparse(x)) == x  

must be true, 

	For all character strings x, krb5_unparse(krb5_parse(x)) == x

does not necessarily have to be true.  For example, krb5_unparse of
krb5_parse of "tytso" will be "tytso@ATHENA.MIT.EDU" (if the local realm
is ATHENA.MIT.EDU).

However, it's probably useful that krb5_unparse_name handles '\n' and
'\b'; I'll add them.

   Actually, looking at "unparse" again, I believe it doesn't even
   handle '\t' correctly.

Yup, this is a bug.  I'll fix it.

							- Ted



home help back first fref pref prev next nref lref last post