[544] in Kerberos_V5_Development

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

krb5_get_default_realm()

tytso@ATHENA.MIT.EDU (tytso@ATHENA.MIT.EDU)
Wed Dec 19 17:06:13 1990

Why doesn't krb5_get_default_realm return the default string in
allocated memory?

As it currently stands, an applications program is forced to either

1) "guess" how big the default realm, malloc that space, try
get_default_realm(), and if it fails, repeat again with a larger size.

or

2) statically allocate 256 (or whatever) bytes for the realm, call
get_default_realm() and blow up if we ever try running this code in a
site where the realm name is bigger than 256.

It'll be painful to update all uses of krb5_get_default_realm(), but I
think it would be a good thing to do.  What we have right now simply
isn't clean.

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