keyhole logo

Heimdal Kerberos 5 support functions


Functions

krb5_error_code KRB5_LIB_FUNCTION krb5_acl_match_string (krb5_context context, const char *string, const char *format,...)
krb5_error_code KRB5_LIB_FUNCTION krb5_acl_match_file (krb5_context context, const char *file, const char *format,...)
krb5_error_code krb5_plugin_register (krb5_context context, enum krb5_plugin_type type, const char *name, void *symbol)

Detailed Description


Function Documentation

krb5_error_code KRB5_LIB_FUNCTION krb5_acl_match_file ( krb5_context  context,
const char *  file,
const char *  format,
  ... 
)

krb5_acl_match_file matches ACL format against each line in a file using krb5_acl_match_string(). Lines starting with # are treated like comments and ignored.

Parameters:
context Kerberos 5 context.
file file with acl listed in the file.
format format to match.
... parameter to format string.
Returns:
Return an error code or 0.
See also:
krb5_acl_match_string

krb5_error_code KRB5_LIB_FUNCTION krb5_acl_match_string ( krb5_context  context,
const char *  string,
const char *  format,
  ... 
)

krb5_acl_match_string matches ACL format against a string.

The ACL format has three format specifiers: s, f, and r. Each specifier will retrieve one argument from the variable arguments for either matching or storing data. The input string is split up using " " (space) and "\t" (tab) as a delimiter; multiple and "\t" in a row are considered to be the same.

List of format specifiers:

Parameters:
context Kerberos 5 context
string string to match with
format format to match
... parameter to format string
Returns:
Return an error code or 0.
 char *s;
 
 ret = krb5_acl_match_string(context, "foo", "s", "foo");
 if (ret)
     krb5_errx(context, 1, "acl didn't match");
 ret = krb5_acl_match_string(context, "foo foo baz/kaka",
     "ss", "foo", &s, "foo/\\*");
 if (ret) {
     // no need to free(s) on error
     assert(s == NULL);
     krb5_errx(context, 1, "acl didn't match");
 }
 free(s);

See also:
krb5_acl_match_file

krb5_error_code krb5_plugin_register ( krb5_context  context,
enum krb5_plugin_type  type,
const char *  name,
void *  symbol 
)

Register a plugin symbol name of specific type.

Parameters:
context a Keberos context
type type of plugin symbol
name name of plugin symbol
symbol a pointer to the named symbol
Returns:
In case of error a non zero error com_err error is returned and the Kerberos error string is set.


Generated on Sat Sep 5 22:14:31 2009 for HeimdalKerberos5library by doxygen 1.5.4