spelling, from Tomas Olsson
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14684 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -122,13 +122,13 @@ Kerberos 5 Library (libkrb5, -lkrb5)
|
|||||||
.Li krb5_principal
|
.Li krb5_principal
|
||||||
holds the name of a user or service in Kerberos.
|
holds the name of a user or service in Kerberos.
|
||||||
.Pp
|
.Pp
|
||||||
A principal have two parts, a
|
A principal has two parts, a
|
||||||
.Li PrincipalName
|
.Li PrincipalName
|
||||||
and a
|
and a
|
||||||
.Li realm .
|
.Li realm .
|
||||||
The PrincipalName consists of one or more components, in printed form,
|
The PrincipalName consists of one or more components. In printed form,
|
||||||
each components are separated by /.
|
the components are separated by /.
|
||||||
The PrincipalName also have a name-type.
|
The PrincipalName also has a name-type.
|
||||||
.Pp
|
.Pp
|
||||||
Examples of a principal are
|
Examples of a principal are
|
||||||
.Li nisse/root@EXAMPLE.COM
|
.Li nisse/root@EXAMPLE.COM
|
||||||
@@ -137,7 +137,7 @@ and
|
|||||||
.Fn krb5_parse_name
|
.Fn krb5_parse_name
|
||||||
passes a principal name in
|
passes a principal name in
|
||||||
.Fa name
|
.Fa name
|
||||||
to the kerberos pricpal structure.
|
to the kerberos principal structure.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_unparse_name
|
.Fn krb5_unparse_name
|
||||||
prints the principal
|
prints the principal
|
||||||
@@ -148,13 +148,13 @@ to the string
|
|||||||
should be freed with
|
should be freed with
|
||||||
.Xr free 3 .
|
.Xr free 3 .
|
||||||
.Fn krb5_unparse_name_fixed
|
.Fn krb5_unparse_name_fixed
|
||||||
behavies just like
|
behaves just like
|
||||||
.Fn krb5_unparse ,
|
.Fn krb5_unparse ,
|
||||||
but instead unparses the principal into a fixed size buffer.
|
but instead unparses the principal into a fixed size buffer.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_unparse_name_short
|
.Fn krb5_unparse_name_short
|
||||||
just return the principal without the realm if the principal is with
|
just returns the principal without the realm if the principal is
|
||||||
in in the default realm. If the principal isn't, the full name is
|
in the default realm. If the principal isn't, the full name is
|
||||||
returned.
|
returned.
|
||||||
.Fn krb5_unparse_name_fixed_short
|
.Fn krb5_unparse_name_fixed_short
|
||||||
works just like
|
works just like
|
||||||
@@ -164,9 +164,9 @@ but on a fixed size buffer.
|
|||||||
.Fn krb5_build_principal
|
.Fn krb5_build_principal
|
||||||
builds a principal from the realm
|
builds a principal from the realm
|
||||||
.Fa realm
|
.Fa realm
|
||||||
that have the length
|
that has the length
|
||||||
.Fa rlen .
|
.Fa rlen .
|
||||||
each following arguments forms the each component of the principal.
|
The following arguments form the components of the principal.
|
||||||
The list of components is terminated with
|
The list of components is terminated with
|
||||||
.Dv NULL .
|
.Dv NULL .
|
||||||
.Pp
|
.Pp
|
||||||
@@ -175,11 +175,10 @@ works like
|
|||||||
.Fn krb5_build_principal
|
.Fn krb5_build_principal
|
||||||
using vargs.
|
using vargs.
|
||||||
.Pp
|
.Pp
|
||||||
The
|
|
||||||
.Fn krb5_build_principal_ext
|
.Fn krb5_build_principal_ext
|
||||||
and
|
and
|
||||||
.Fn krb5_build_principal_va_ext
|
.Fn krb5_build_principal_va_ext
|
||||||
takes a list of length-value pairs, the list is terminated with a zero
|
take a list of length-value pairs, the list is terminated with a zero
|
||||||
length.
|
length.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_make_principal
|
.Fn krb5_make_principal
|
||||||
@@ -212,40 +211,41 @@ is they are the same, and
|
|||||||
if not.
|
if not.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_principal_match
|
.Fn krb5_principal_match
|
||||||
maches are
|
matches a
|
||||||
.Fa principal
|
.Fa principal
|
||||||
with a
|
against a
|
||||||
.Fa pattern .
|
.Fa pattern .
|
||||||
The patttern is a globbing expression, where each component (separated
|
The pattern is a globbing expression, where each component (separated
|
||||||
by /) of the principal is matched with each other.
|
by /) is matched against the corresponding component of the principal.
|
||||||
.Pp
|
.Pp
|
||||||
|
The
|
||||||
.Fn krb5_principal_get_realm
|
.Fn krb5_principal_get_realm
|
||||||
and
|
and
|
||||||
.Fn krb5_principal_get_comp_string
|
.Fn krb5_principal_get_comp_string
|
||||||
functions return parts of the
|
functions return parts of the
|
||||||
.Fa principal ,
|
.Fa principal ,
|
||||||
either the realm or a specific component.
|
either the realm or a specific component.
|
||||||
Both functions returned string points to data inside the principal, so
|
Both functions return string pointers to data inside the principal, so
|
||||||
they are valid only as long as the principal exists.
|
they are valid only as long as the principal exists.
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Fa component
|
.Fa component
|
||||||
argument to
|
argument to
|
||||||
.Fn krb5_principal_get_comp_string
|
.Fn krb5_principal_get_comp_string
|
||||||
is the component number to return, from zero to the total number of
|
is the index of the component to return, from zero to the total number of
|
||||||
components minus one. If a the requested component number is out of range,
|
components minus one. If the index is out of range
|
||||||
.Dv NULL
|
.Dv NULL
|
||||||
is returned.
|
is returned.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_principal_get_realm
|
.Fn krb5_principal_get_realm
|
||||||
and
|
and
|
||||||
.Fn krb5_principal_get_comp_string
|
.Fn krb5_principal_get_comp_string
|
||||||
can be seen as a replacement for the
|
are replacements for
|
||||||
.Fn krb5_princ_realm ,
|
.Fn krb5_princ_realm ,
|
||||||
.Fn krb5_princ_component
|
.Fn krb5_princ_component
|
||||||
and related macros, described as intermal in the MIT API
|
and related macros, described as internal in the MIT API
|
||||||
specification.
|
specification.
|
||||||
A difference is that these functions return strings, not
|
Unlike the macros, these functions return strings, not
|
||||||
.Dv krb5_data .
|
.Dv krb5_data .
|
||||||
A reason to return
|
A reason to return
|
||||||
.Dv krb5_data
|
.Dv krb5_data
|
||||||
@@ -260,22 +260,21 @@ It's generally not necessary to look at the components of a principal.
|
|||||||
and
|
and
|
||||||
.Fn krb5_principal_set_type
|
.Fn krb5_principal_set_type
|
||||||
get and sets the name type for a principal.
|
get and sets the name type for a principal.
|
||||||
Name type does exists but not really, there are subtile diffrences
|
Name type handling is tricky and not often needed,
|
||||||
when principal types are used and when they are not used.
|
don't use this unless you know what you do.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_princ_realm
|
.Fn krb5_princ_realm
|
||||||
returns the realm component of the principal.
|
returns the realm component of the principal.
|
||||||
Caller must not free realm unless
|
The caller must not free realm unless
|
||||||
.Fn krb5_princ_set_realm
|
.Fn krb5_princ_set_realm
|
||||||
is called to set a new realm after freeing the realm.
|
is called to set a new realm after freeing the realm.
|
||||||
.Fn krb5_princ_set_realm
|
.Fn krb5_princ_set_realm
|
||||||
sets the realm component of a principal. Old realm is not freed.
|
sets the realm component of a principal. Old realm is not freed.
|
||||||
.Pp
|
.Pp
|
||||||
There are two functions
|
|
||||||
.Fn krb5_sname_to_principal
|
.Fn krb5_sname_to_principal
|
||||||
and
|
and
|
||||||
.Fn krb5_sock_to_principal
|
.Fn krb5_sock_to_principal
|
||||||
that are for easy creation of
|
are for easy creation of
|
||||||
.Dq service
|
.Dq service
|
||||||
principals that can, for instance, be used to lookup a key in a keytab.
|
principals that can, for instance, be used to lookup a key in a keytab.
|
||||||
For both functions the
|
For both functions the
|
||||||
@@ -311,9 +310,9 @@ which should be a bound
|
|||||||
or
|
or
|
||||||
.Dv AF_INET6
|
.Dv AF_INET6
|
||||||
socket.
|
socket.
|
||||||
This function require there is a mapping between the address
|
There must be a mapping between the address and
|
||||||
.Fq sockname .
|
.Fq sockname .
|
||||||
This function might try to resolve the name in DNS.
|
The function may try to resolve the name in DNS.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_get_default_principal
|
.Fn krb5_get_default_principal
|
||||||
tries to find out what's a reasonable default principal by looking at
|
tries to find out what's a reasonable default principal by looking at
|
||||||
@@ -325,6 +324,6 @@ the enviroment its run in.
|
|||||||
.Xr krb5.conf 5
|
.Xr krb5.conf 5
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
You can not have a NUL in a component in some of the variable argument
|
You can not have a NUL in a component in some of the variable argument
|
||||||
function above.
|
functions above.
|
||||||
Until someone can give a good example of where it would be a good idea
|
Until someone can give a good example of where it would be a good idea
|
||||||
to have NUL's in a component, this will not be fixed.
|
to have NUL's in a component, this will not be fixed.
|
||||||
|
@@ -101,16 +101,16 @@ Kerberos 5 Library (libkrb5, -lkrb5)
|
|||||||
.Ft krb5_error_code
|
.Ft krb5_error_code
|
||||||
.Fn krb5_vabort "krb5_context context" "const char *fmt" "va_list ap"
|
.Fn krb5_vabort "krb5_context context" "const char *fmt" "va_list ap"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
These functions prints a warning message to some destination.
|
These functions print a warning message to some destination.
|
||||||
.Fa format
|
.Fa format
|
||||||
is a printf style format specifying the message to print. The forms not ending in an
|
is a printf style format specifying the message to print. The forms not ending in an
|
||||||
.Dq x
|
.Dq x
|
||||||
prints the error string associated with
|
print the error string associated with
|
||||||
.Fa code
|
.Fa code
|
||||||
along with the message.
|
along with the message.
|
||||||
The
|
The
|
||||||
.Dq err
|
.Dq err
|
||||||
functions exits with exit status
|
functions exit with exit status
|
||||||
.Fa eval
|
.Fa eval
|
||||||
after printing the message.
|
after printing the message.
|
||||||
.Pp
|
.Pp
|
||||||
@@ -122,7 +122,7 @@ Messages logged with the
|
|||||||
.Dq warn
|
.Dq warn
|
||||||
functions have a log level of 1, while the
|
functions have a log level of 1, while the
|
||||||
.Dq err
|
.Dq err
|
||||||
functions logs with level 0.
|
functions log with level 0.
|
||||||
.Pp
|
.Pp
|
||||||
.Fn krb5_get_err_text
|
.Fn krb5_get_err_text
|
||||||
fetches the human readable strings describing the error-code.
|
fetches the human readable strings describing the error-code.
|
||||||
@@ -130,7 +130,7 @@ fetches the human readable strings describing the error-code.
|
|||||||
.Fn krb5_abort
|
.Fn krb5_abort
|
||||||
and
|
and
|
||||||
.Nm krb5_abortx
|
.Nm krb5_abortx
|
||||||
behavies like
|
behaves like
|
||||||
.Nm krb5_err
|
.Nm krb5_err
|
||||||
and
|
and
|
||||||
.Nm krb5_errx
|
.Nm krb5_errx
|
||||||
|
Reference in New Issue
Block a user