This function takes a principal
verifies that it is in the local realm (using
and then returns the local name of the principal.
isnt in one of the local realms an error is returned.
If the size
of the local name
is too small, an error is returned.
should only be use by an application that implements protocols that
dont transport the login name and thus needs to convert a principal
to a local name.
Protocols should be designed so that they authenticate using
Kerberos, send over the login name and then verify the principal
that is authenticated is allowed to login and the login name.
A way to check if a user is allowed to login is using the function