Various tweaks, from Jason McIntyre.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17534 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.Dd May 1, 2006
|
.Dd May 12, 2006
|
||||||
.Dt KRB5_ACL_MATCH_FILE 3
|
.Dt KRB5_ACL_MATCH_FILE 3
|
||||||
.Os HEIMDAL
|
.Os HEIMDAL
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@@ -63,48 +63,49 @@ Lines starting with # are treated like comments and ignored.
|
|||||||
.Nm krb5_acl_match_string
|
.Nm krb5_acl_match_string
|
||||||
matches ACL format against a string.
|
matches ACL format against a string.
|
||||||
.Pp
|
.Pp
|
||||||
The ACL format have tree format specifiers, s, f, r.
|
The ACL format has three format specifiers: s, f, and r.
|
||||||
Each specifier will pull of one argument from the varable arguments
|
Each specifier will retrieve one argument from the variable arguments
|
||||||
for ether maching or storing data.
|
for either matching or storing data.
|
||||||
The input string is split up using " " and "\t" as delimiter, multiple
|
The input string is split up using " " and "\et" as a delimiter; multiple
|
||||||
" " and "\t" in a row are considered to be the same.
|
" " and "\et" in a row are considered to be the same.
|
||||||
.Pp
|
.Pp
|
||||||
.Bl -tag -width "f" -offset indent
|
.Bl -tag -width "fXX" -offset indent
|
||||||
.It s
|
.It s
|
||||||
matches a string using strcmp (case sensetive).
|
Matches a string using
|
||||||
|
.Xr strcmp 3
|
||||||
|
(case sensitive).
|
||||||
.It f
|
.It f
|
||||||
matches the string with
|
Matches the string with
|
||||||
.Xr fnmatch 3 .
|
.Xr fnmatch 3 .
|
||||||
The
|
The
|
||||||
.Fa flags
|
.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
|
.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
|
freed with
|
||||||
.Xr free 3 .
|
.Xr free 3 .
|
||||||
There is no need to
|
There is no need to
|
||||||
.Xr free 3
|
.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 .
|
.Dv NULL .
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
All unknown format specifiers causes an error.
|
All unknown format specifiers cause an error.
|
||||||
.Pp
|
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
.Bd -literal
|
.Bd -literal -offset indent
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
ret = krb5_acl_match_string(context, "foo", "s", "foo");
|
ret = krb5_acl_match_string(context, "foo", "s", "foo");
|
||||||
if (ret)
|
if (ret)
|
||||||
krb5_errx(context, 1, "acl didn't match");
|
krb5_errx(context, 1, "acl didn't match");
|
||||||
ret = krb5_acl_match_string(context, "foo foo baz/kaka",
|
ret = krb5_acl_match_string(context, "foo foo baz/kaka",
|
||||||
"ss", "foo", &s, "foo/*");
|
"ss", "foo", &s, "foo/*");
|
||||||
if (ret) {
|
if (ret) {
|
||||||
/* no need to free(s) on error */
|
/* no need to free(s) on error */
|
||||||
assert(s == NULL);
|
assert(s == NULL);
|
||||||
krb5_errx(context, 1, "acl didn't match");
|
krb5_errx(context, 1, "acl didn't match");
|
||||||
}
|
}
|
||||||
free(s);
|
free(s);
|
||||||
.Ed
|
.Ed
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr krb5 3
|
.Xr krb5 3
|
||||||
|
Reference in New Issue
Block a user