diff --git a/lib/krb5/krb5_acl_match_file.3 b/lib/krb5/krb5_acl_match_file.3 index 88f72ef0f..d30f2def0 100644 --- a/lib/krb5/krb5_acl_match_file.3 +++ b/lib/krb5/krb5_acl_match_file.3 @@ -31,7 +31,7 @@ .\" .\" $Id$ .\" -.Dd May 1, 2006 +.Dd May 12, 2006 .Dt KRB5_ACL_MATCH_FILE 3 .Os HEIMDAL .Sh NAME @@ -63,48 +63,49 @@ Lines starting with # are treated like comments and ignored. .Nm krb5_acl_match_string matches ACL format against a string. .Pp -The ACL format have tree format specifiers, s, f, r. -Each specifier will pull of one argument from the varable arguments -for ether maching or storing data. -The input string is split up using " " and "\t" as delimiter, multiple -" " and "\t" in a row are considered to be the same. +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 " " and "\et" as a delimiter; multiple +" " and "\et" in a row are considered to be the same. .Pp -.Bl -tag -width "f" -offset indent +.Bl -tag -width "fXX" -offset indent .It s -matches a string using strcmp (case sensetive). +Matches a string using +.Xr strcmp 3 +(case sensitive). .It f -matches the string with +Matches the string with .Xr fnmatch 3 . -The +The .Fa flags -argument (the last argument) passed to the fnmatch function is 0. +argument (the last argument) passed to the fnmatch function is 0. .It r -returns a copy the string in the char ** passed in, the copy must be +Returns a copy of the string in the char ** passed in; the copy must be freed with .Xr free 3 . There is no need to .Xr free 3 -the string on error, the function will clean up and set the pointer to +the string on error: the function will clean up and set the pointer to .Dv NULL . .El .Pp -All unknown format specifiers causes an error. -.Pp +All unknown format specifiers cause an error. .Sh EXAMPLES -.Bd -literal - char *s; +.Bd -literal -offset indent +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); +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); .Ed .Sh SEE ALSO .Xr krb5 3