File: krb5_acl_match_file.cat3

package info (click to toggle)
heimdal 7.1.0%2Bdfsg-13%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 41,436 kB
  • sloc: ansic: 354,938; sh: 12,104; makefile: 4,353; yacc: 1,774; perl: 1,572; python: 748; lex: 732; java: 119; awk: 41
file content (60 lines) | stat: -rw-r--r-- 2,731 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
KRB5_ACL_MATCH_FILE(3)   BSD Library Functions Manual   KRB5_ACL_MATCH_FILE(3)

NNAAMMEE
     kkrrbb55__aaccll__mmaattcchh__ffiillee, kkrrbb55__aaccll__mmaattcchh__ssttrriinngg -- ACL matching functions

LLIIBBRRAARRYY
     Kerberos 5 Library (libkrb5, -lkrb5)

SSYYNNOOPPSSIISS
     _k_r_b_5___e_r_r_o_r___c_o_d_e
     kkrrbb55__aaccll__mmaattcchh__ffiillee(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _c_h_a_r _*_f_i_l_e,
         _c_o_n_s_t _c_h_a_r _*_f_o_r_m_a_t, _._._.);

     _k_r_b_5___e_r_r_o_r___c_o_d_e
     kkrrbb55__aaccll__mmaattcchh__ssttrriinngg(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g,
         _c_o_n_s_t _c_h_a_r _*_f_o_r_m_a_t, _._._.);

DDEESSCCRRIIPPTTIIOONN
     kkrrbb55__aaccll__mmaattcchh__ffiillee matches ACL format against each line in a file.
     Lines starting with # are treated like comments and ignored.

     kkrrbb55__aaccll__mmaattcchh__ssttrriinngg 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 match-
     ing or storing data.  The input string is split up using " " and "\t" as
     a delimiter; multiple " " and "\t" in a row are considered to be the
     same.

           s    Matches a string using strcmp(3) (case sensitive).

           f    Matches the string with fnmatch(3).  The _f_l_a_g_s argument (the
                last argument) passed to the fnmatch function is 0.

           r    Returns a copy of the string in the char ** passed in; the
                copy must be freed with free(3).  There is no need to free(3)
                the string on error: the function will clean up and set the
                pointer to NULL.

     All unknown format specifiers cause an error.

EEXXAAMMPPLLEESS
           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);

SSEEEE AALLSSOO
     krb5(3)

HEIMDAL                          May 12, 2006                          HEIMDAL