expcov report - Generated Sat Oct 15 21:39:18 2016

 Index  Statistics  Last 
Directory./modules/aaa
Filenamemod_authz_host.c
ModifiedSat Jun 14 20:44:19 2008

Pass Half Fail Excluded Total
Function
2
28.57%
5
71.43%
0
0.00%
7
100%
Expressions
11
6.15%
168
93.85%
0
0.00%
179
100%
Conditions
1
2.70%
0
0.00%
36
97.30%
0
0.00%
37
100%
MC/DC
0
0.00%
11
100.00%
0
0.00%
11
100%
Branches

if
0
0.00%
0
0.00%
31
100.00%
0
0.00%
31
100%
for
1
33.33%
0
0.00%
2
66.67%
0
0.00%
3
100%
while
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%
case
0
0.00%
0
0.00%
6
100.00%
0
0.00%
6
100%

1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements.  See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License.  You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * Security options etc.
19 *
20 * Module derived from code originally written by Rob McCool
21 *
22 */
23
24#include "apr_strings.h"
25#include "apr_network_io.h"
26#include "apr_md5.h"
27
28#define APR_WANT_STRFUNC
29#define APR_WANT_BYTEFUNC
30#include "apr_want.h"
31
32#include "ap_config.h"
33#include "httpd.h"
34#include "http_core.h"
35#include "http_config.h"
36#include "http_log.h"
37#include "http_request.h"
38
39#if APR_HAVE_NETINET_IN_H
40#include <netinet/in.h>
41#endif
42
43enum allowdeny_type {
44    T_ENV,
45    T_NENV,
46    T_ALL,
47    T_IP,
48    T_HOST,
49    T_FAIL
50};
51
52typedef struct {
53    apr_int64_t limited;
54    union {
55        char *from;
56        apr_ipsubnet_t *ip;
57    } x;
58    enum allowdeny_type type;
59} allowdeny;
60
61/* things in the 'order' array */
62#define DENY_THEN_ALLOW 0
63#define ALLOW_THEN_DENY 1
64#define MUTUAL_FAILURE 2
65
66typedef struct {
67    int order[METHODS];
68    apr_array_header_t *allows;
69    apr_array_header_t *denys;
70} authz_host_dir_conf;
71
72module AP_MODULE_DECLARE_DATA authz_host_module;
73
74static void *create_authz_host_dir_config : call=1
c
reate_authz_host_dir_config(apr_pool_t *p, char *dummy)
75{
76    int i;
77    authz_host_dir_conf *conf =
78        (authz_host_dir_conf *)apr_pcalloc(p : modules/aaa/mod_authz_host.c line=74 column=55
p
, sizeof(authz_host_dir_conf));
79
80    for : true=64, false=1
f
or (i : modules/aaa/mod_authz_host.c line=76 column=9
i
 = : pass=1
=
 0; i : modules/aaa/mod_authz_host.c line=76 column=9
i
 < : true=64, false=1
<
 METHODS; ++ : pass=64
+
+i : modules/aaa/mod_authz_host.c line=76 column=9
i
) {
81        conf : modules/aaa/mod_authz_host.c line=77 column=26
c
onf-> : enter=64, leave=64
-
>order : modules/aaa/mod_authz_host.c line=67 column=9
o
rder[i : modules/aaa/mod_authz_host.c line=76 column=9
i
= : enter=64, leave=64
=
 DENY_THEN_ALLOW;
82    }
83    conf : modules/aaa/mod_authz_host.c line=77 column=26
c
onf-> : enter=1, leave=1
-
>allows : modules/aaa/mod_authz_host.c line=68 column=25
a
llows = : enter=1, leave=1
=
 apr_array_make : enter=1, leave=1

apr_array_make : /usr/include/apr-1/apr_tables.h line=111 column=35
a
pr_array_make(p : modules/aaa/mod_authz_host.c line=74 column=55
p
, 1, sizeof(allowdeny));
84    conf : modules/aaa/mod_authz_host.c line=77 column=26
c
onf-> : enter=1, leave=1
-
>denys : modules/aaa/mod_authz_host.c line=69 column=25
d
enys = : enter=1, leave=1
=
 apr_array_make : enter=1, leave=1

apr_array_make : /usr/include/apr-1/apr_tables.h line=111 column=35
a
pr_array_make(p : modules/aaa/mod_authz_host.c line=74 column=55
p
, 1, sizeof(allowdeny));
85
86    return : pass=1
r
eturn (void *)conf : modules/aaa/mod_authz_host.c line=77 column=26
c
onf;
87}
88
89static const char *order : call=0
o
rder(cmd_parms *cmd, void *dv, const char *arg)
90{
91    authz_host_dir_conf *d = (authz_host_dir_conf *) dv : modules/aaa/mod_authz_host.c line=89 column=48
d
v;
92    int i, o;
93
94    if : true=0, false=0
i
f (! : true=0, false=0
!
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(arg : modules/aaa/mod_authz_host.c line=89 column=64
a
rg, "allow,deny"))
95        o : modules/aaa/mod_authz_host.c line=92 column=12
o
 = : pass=0
=
 ALLOW_THEN_DENY;
96    else if : true=0, false=0
i
f (! : true=0, false=0
!
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(arg : modules/aaa/mod_authz_host.c line=89 column=64
a
rg, "deny,allow"))
97        o : modules/aaa/mod_authz_host.c line=92 column=12
o
 = : pass=0
=
 DENY_THEN_ALLOW;
98    else if : true=0, false=0
i
f (! : true=0, false=0
!
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(arg : modules/aaa/mod_authz_host.c line=89 column=64
a
rg, "mutual-failure"))
99        o : modules/aaa/mod_authz_host.c line=92 column=12
o
 = : pass=0
=
 MUTUAL_FAILURE;
100    else
101        return : pass=0
r
eturn "unknown order";
102
103    for : true=0, false=0
f
or (i : modules/aaa/mod_authz_host.c line=92 column=9
i
 = : pass=0
=
 0; i : modules/aaa/mod_authz_host.c line=92 column=9
i
 < : true=0, false=0
<
 METHODS; ++ : pass=0
+
+i : modules/aaa/mod_authz_host.c line=92 column=9
i
)
104        if : true=0, false=0
i
f (cmd : modules/aaa/mod_authz_host.c line=89 column=37
c
md-> : enter=0, leave=0
-
>limited : include/http_config.h line=279 column=17
l
imited & : pass=0
&
 (AP_METHOD_BIT << : pass=0
<
i : modules/aaa/mod_authz_host.c line=92 column=9
i
))
105            d : modules/aaa/mod_authz_host.c line=91 column=26
d
-> : enter=0, leave=0
-
>order : modules/aaa/mod_authz_host.c line=67 column=9
o
rder[i : modules/aaa/mod_authz_host.c line=92 column=9
i
= : enter=0, leave=0
=
 o : modules/aaa/mod_authz_host.c line=92 column=12
o
;
106
107    return : pass=0
r
eturn NULL;
108}
109
110static const char *allow_cmd : call=0
a
llow_cmd(cmd_parms *cmd, void *dv, const char *from,
111                             const char *where_c)
112{
113    authz_host_dir_conf *d = (authz_host_dir_conf *) dv : modules/aaa/mod_authz_host.c line=110 column=52
d
v;
114    allowdeny *a;
115    char *where = apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(cmd : modules/aaa/mod_authz_host.c line=110 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, where_c : modules/aaa/mod_authz_host.c line=111 column=42
w
here_c);
116    char *s;
117    char msgbuf[120];
118    apr_status_t rv;
119
120    if : true=0, false=0
i
f (strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(from : modules/aaa/mod_authz_host.c line=110 column=68
f
rom, "from"))
121        return : pass=0
r
eturn "allow and deny must be followed by 'from'";
122
123    a : modules/aaa/mod_authz_host.c line=114 column=16
a
 = : pass=0
=
 (allowdeny *) apr_array_push : enter=0, leave=0

apr_array_push : /usr/include/apr-1/apr_tables.h line=121 column=21
a
pr_array_push(cmd : modules/aaa/mod_authz_host.c line=110 column=41
c
md-> : enter=0, leave=0
-
>info : include/http_config.h line=275 column=11
i
nfo conditional operator : true=0, false=0
?
 d : modules/aaa/mod_authz_host.c line=113 column=26
d
-> : enter=0, leave=0
-
>allows : modules/aaa/mod_authz_host.c line=68 column=25
a
llows : d : modules/aaa/mod_authz_host.c line=113 column=26
d
-> : enter=0, leave=0
-
>denys : modules/aaa/mod_authz_host.c line=69 column=25
d
enys);
124    a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>x : modules/aaa/mod_authz_host.c line=57 column=7
x
.from : modules/aaa/mod_authz_host.c line=55 column=15
f
rom = : pass=0
=
 where : modules/aaa/mod_authz_host.c line=115 column=11
w
here;
125    a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>limited : modules/aaa/mod_authz_host.c line=53 column=17
l
imited = : enter=0, leave=0
=
 cmd : modules/aaa/mod_authz_host.c line=110 column=41
c
md-> : enter=0, leave=0
-
>limited : include/http_config.h line=279 column=17
l
imited;
126
127    if : true=0, false=0
i
f (! : true=0, false=0
!
strncasecmp : enter=0, leave=0

strncasecmp : /usr/include/string.h line=540 column=12
s
trncasecmp(where : modules/aaa/mod_authz_host.c line=115 column=11
w
here, "env=!", 5)) {
128        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>type : modules/aaa/mod_authz_host.c line=58 column=25
t
ype = : enter=0, leave=0
=
 T_NENV : modules/aaa/mod_authz_host.c line=45 column=5
T
_NENV;
129        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>x : modules/aaa/mod_authz_host.c line=57 column=7
x
.from : modules/aaa/mod_authz_host.c line=55 column=15
f
rom += : pass=0
+
= 5;
130
131    }
132    else if : true=0, false=0
i
f (! : true=0, false=0
!
strncasecmp : enter=0, leave=0

strncasecmp : /usr/include/string.h line=540 column=12
s
trncasecmp(where : modules/aaa/mod_authz_host.c line=115 column=11
w
here, "env=", 4)) {
133        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>type : modules/aaa/mod_authz_host.c line=58 column=25
t
ype = : enter=0, leave=0
=
 T_ENV : modules/aaa/mod_authz_host.c line=44 column=5
T
_ENV;
134        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>x : modules/aaa/mod_authz_host.c line=57 column=7
x
.from : modules/aaa/mod_authz_host.c line=55 column=15
f
rom += : pass=0
+
= 4;
135
136    }
137    else if : true=0, false=0
i
f (! : true=0, false=0
!
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(where : modules/aaa/mod_authz_host.c line=115 column=11
w
here, "all")) {
138        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>type : modules/aaa/mod_authz_host.c line=58 column=25
t
ype = : enter=0, leave=0
=
 T_ALL : modules/aaa/mod_authz_host.c line=46 column=5
T
_ALL;
139    }
140    else if : true=0, false=0
i
f ((s : modules/aaa/mod_authz_host.c line=116 column=11
s
 = : pass=0
=
 ap_strchr(where : modules/aaa/mod_authz_host.c line=115 column=11
w
here, '/'))) {
141        *s : modules/aaa/mod_authz_host.c line=116 column=11
s
++ : pass=0
+
= : enter=0, leave=0
=
 '\0';
142        rv : modules/aaa/mod_authz_host.c line=118 column=18
r
= : pass=0
=
 apr_ipsubnet_create : enter=0, leave=0

apr_ipsubnet_create : /usr/include/apr-1/apr_network_io.h line=722 column=27
a
pr_ipsubnet_create(&a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>x : modules/aaa/mod_authz_host.c line=57 column=7
x
.ip : modules/aaa/mod_authz_host.c line=56 column=25
i
p, where : modules/aaa/mod_authz_host.c line=115 column=11
w
here, s : modules/aaa/mod_authz_host.c line=116 column=11
s
cmd : modules/aaa/mod_authz_host.c line=110 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool);
143        if : true=0, false=0
i
f(APR_STATUS_IS_EINVAL(rv : modules/aaa/mod_authz_host.c line=118 column=18
r
v)) {
144            /* looked nothing like an IP address */
145            return : pass=0
r
eturn "An IP address was expected";
146        }
147        else if : true=0, false=0
i
f (rv : modules/aaa/mod_authz_host.c line=118 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS) {
148            apr_strerror : enter=0, leave=0

apr_strerror : /usr/include/apr-1/apr_errno.h line=52 column=21
a
pr_strerror(rv : modules/aaa/mod_authz_host.c line=118 column=18
r
v, msgbuf : modules/aaa/mod_authz_host.c line=117 column=10
m
sgbuf, sizeof msgbuf);
149            return : pass=0
r
eturn apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(cmd : modules/aaa/mod_authz_host.c line=110 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, msgbuf : modules/aaa/mod_authz_host.c line=117 column=10
m
sgbuf);
150        }
151        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>type : modules/aaa/mod_authz_host.c line=58 column=25
t
ype = : enter=0, leave=0
=
 T_IP : modules/aaa/mod_authz_host.c line=47 column=5
T
_IP;
152    }
153    else if : true=0, false=0
i
f (! : true=0, false=0
!
APR_STATUS_IS_EINVAL(rv : modules/aaa/mod_authz_host.c line=118 column=18
r
= : pass=0
=
 apr_ipsubnet_create : enter=0, leave=0

apr_ipsubnet_create : /usr/include/apr-1/apr_network_io.h line=722 column=27
a
pr_ipsubnet_create(&a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>x : modules/aaa/mod_authz_host.c line=57 column=7
x
.ip : modules/aaa/mod_authz_host.c line=56 column=25
i
p, where : modules/aaa/mod_authz_host.c line=115 column=11
w
here,
154                                                            NULL, cmd : modules/aaa/mod_authz_host.c line=110 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool))) {
155        if : true=0, false=0
i
f (rv : modules/aaa/mod_authz_host.c line=118 column=18
r
!= : true=0, false=0
!
= APR_SUCCESS) {
156            apr_strerror : enter=0, leave=0

apr_strerror : /usr/include/apr-1/apr_errno.h line=52 column=21
a
pr_strerror(rv : modules/aaa/mod_authz_host.c line=118 column=18
r
v, msgbuf : modules/aaa/mod_authz_host.c line=117 column=10
m
sgbuf, sizeof msgbuf);
157            return : pass=0
r
eturn apr_pstrdup : enter=0, leave=0

apr_pstrdup : /usr/include/apr-1/apr_strings.h line=95 column=21
a
pr_pstrdup(cmd : modules/aaa/mod_authz_host.c line=110 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, msgbuf : modules/aaa/mod_authz_host.c line=117 column=10
m
sgbuf);
158        }
159        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>type : modules/aaa/mod_authz_host.c line=58 column=25
t
ype = : enter=0, leave=0
=
 T_IP : modules/aaa/mod_authz_host.c line=47 column=5
T
_IP;
160    }
161    else { /* no slash, didn't look like an IP address => must be a host */
162        a : modules/aaa/mod_authz_host.c line=114 column=16
a
-> : enter=0, leave=0
-
>type : modules/aaa/mod_authz_host.c line=58 column=25
t
ype = : enter=0, leave=0
=
 T_HOST : modules/aaa/mod_authz_host.c line=48 column=5
T
_HOST;
163    }
164
165    return : pass=0
r
eturn NULL;
166}
167
168static char its_an_allow;
169
170static const command_rec authz_host_cmds[] =
171{
172    AP_INIT_TAKE1("order", order : modules/aaa/mod_authz_host.c line=89 column=20
o
rder, NULL, OR_LIMIT,
173                  "'allow,deny', 'deny,allow', or 'mutual-failure'"),
174    AP_INIT_ITERATE2("allow", allow_cmd : modules/aaa/mod_authz_host.c line=110 column=20
a
llow_cmd, &its_an_allow : modules/aaa/mod_authz_host.c line=168 column=13
i
ts_an_allow, OR_LIMIT,
175                     "'from' followed by hostnames or IP-address wildcards"),
176    AP_INIT_ITERATE2("deny", allow_cmd : modules/aaa/mod_authz_host.c line=110 column=20
a
llow_cmd, NULL, OR_LIMIT,
177                     "'from' followed by hostnames or IP-address wildcards"),
178    {NULL}
179};
180
181static int in_domain : call=0
i
n_domain(const char *domain, const char *what)
182{
183    int dl = strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(domain : modules/aaa/mod_authz_host.c line=181 column=34
d
omain);
184    int wl = strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(what : modules/aaa/mod_authz_host.c line=181 column=54
w
hat);
185
186    if : true=0, false=0
i
f ((wl : modules/aaa/mod_authz_host.c line=184 column=9
w
- : pass=0
-
 dl : modules/aaa/mod_authz_host.c line=183 column=9
d
l) >= : true=0, false=0
>
= 0) {
187        if : true=0, false=0
i
f (strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(domain : modules/aaa/mod_authz_host.c line=181 column=34
d
omain, &what : modules/aaa/mod_authz_host.c line=181 column=54
w
hat[] : enter=0, leave=0
[
wl : modules/aaa/mod_authz_host.c line=184 column=9
w
- : pass=0
-
 dl : modules/aaa/mod_authz_host.c line=183 column=9
d
l]) != : true=0, false=0
!
= 0) {
188            return : pass=0
r
eturn 0;
189        }
190
191        /* Make sure we matched an *entire* subdomain --- if the user
192         * said 'allow from good.com', we don't want people from nogood.com
193         * to be able to get in.
194         */
195
196        if : true=0, false=0
i
f (wl : modules/aaa/mod_authz_host.c line=184 column=9
w
== : true=0, false=0
=
dl : modules/aaa/mod_authz_host.c line=183 column=9
d
l) {
197            return : pass=0
r
eturn 1;                /* matched whole thing */
198        }
199        else {
200            return : pass=0
r
eturn (domain : modules/aaa/mod_authz_host.c line=181 column=34
d
omain[] : enter=0, leave=0
[
0] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '.' || : true=0, false=0
|
what : modules/aaa/mod_authz_host.c line=181 column=54
w
hat[] : enter=0, leave=0
[
wl : modules/aaa/mod_authz_host.c line=184 column=9
w
- : pass=0
-
 dl : modules/aaa/mod_authz_host.c line=183 column=9
d
- : pass=0
-
 1] == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= '.');
201        }
202    }
203    else {
204        return : pass=0
r
eturn 0;
205    }
206}
207
208static int find_allowdeny : call=0
f
ind_allowdeny(request_rec *r, apr_array_header_t *a, int method)
209{
210
211    allowdeny *ap = (allowdeny *) a : modules/aaa/mod_authz_host.c line=208 column=63
a
-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
212    apr_int64_t mmask = (AP_METHOD_BIT << : pass=0
<
method : modules/aaa/mod_authz_host.c line=208 column=70
m
ethod);
213    int i;
214    int gothost = 0;
215    const char *remotehost = NULL;
216
217    for : true=0, false=0
f
or (i : modules/aaa/mod_authz_host.c line=213 column=9
i
 = : pass=0
=
 0; i : modules/aaa/mod_authz_host.c line=213 column=9
i
 < : true=0, false=0
<
 a : modules/aaa/mod_authz_host.c line=208 column=63
a
-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; ++ : pass=0
+
+i : modules/aaa/mod_authz_host.c line=213 column=9
i
) {
218        if : true=0, false=0
i
f (! : true=0, false=0
!
(mmask : modules/aaa/mod_authz_host.c line=212 column=17
m
mask & : pass=0
&
 ap : modules/aaa/mod_authz_host.c line=211 column=16
a
p[] : enter=0, leave=0
[
i : modules/aaa/mod_authz_host.c line=213 column=9
i
].limited : modules/aaa/mod_authz_host.c line=53 column=17
l
imited)) {
219            continue : pass=0
c
ontinue;
220        }
221
222        switch : pass=0
s
witch (ap : modules/aaa/mod_authz_host.c line=211 column=16
a
p[] : enter=0, leave=0
[
i : modules/aaa/mod_authz_host.c line=213 column=9
i
].type : modules/aaa/mod_authz_host.c line=58 column=25
t
ype) {
223        case : true=0, false=0
c
ase T_ENV:
224            if : true=0, false=0
i
f (apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/aaa/mod_authz_host.c line=208 column=40
r
-> : enter=0, leave=0
-
>subprocess_env : include/httpd.h line=908 column=18
s
ubprocess_env, ap : modules/aaa/mod_authz_host.c line=211 column=16
a
p[] : enter=0, leave=0
[
i : modules/aaa/mod_authz_host.c line=213 column=9
i
].x : modules/aaa/mod_authz_host.c line=57 column=7
x
.from : modules/aaa/mod_authz_host.c line=55 column=15
f
rom)) {
225                return : pass=0
r
eturn 1;
226            }
227            break : pass=0
b
reak;
228
229        case : true=0, false=0
c
ase T_NENV:
230            if : true=0, false=0
i
f (! : true=0, false=0
!
apr_table_get : enter=0, leave=0

apr_table_get : /usr/include/apr-1/apr_tables.h line=258 column=27
a
pr_table_get(r : modules/aaa/mod_authz_host.c line=208 column=40
r
-> : enter=0, leave=0
-
>subprocess_env : include/httpd.h line=908 column=18
s
ubprocess_env, ap : modules/aaa/mod_authz_host.c line=211 column=16
a
p[] : enter=0, leave=0
[
i : modules/aaa/mod_authz_host.c line=213 column=9
i
].x : modules/aaa/mod_authz_host.c line=57 column=7
x
.from : modules/aaa/mod_authz_host.c line=55 column=15
f
rom)) {
231                return : pass=0
r
eturn 1;
232            }
233            break : pass=0
b
reak;
234
235        case : true=0, false=0
c
ase T_ALL:
236            return : pass=0
r
eturn 1;
237
238        case : true=0, false=0
c
ase T_IP:
239            if : true=0, false=0
i
f (apr_ipsubnet_test : enter=0, leave=0

apr_ipsubnet_test : /usr/include/apr-1/apr_network_io.h line=734 column=18
a
pr_ipsubnet_test(ap : modules/aaa/mod_authz_host.c line=211 column=16
a
p[] : enter=0, leave=0
[
i : modules/aaa/mod_authz_host.c line=213 column=9
i
].x : modules/aaa/mod_authz_host.c line=57 column=7
x
.ip : modules/aaa/mod_authz_host.c line=56 column=25
i
p, r : modules/aaa/mod_authz_host.c line=208 column=40
r
-> : enter=0, leave=0
-
>connection : include/httpd.h line=782 column=15
c
onnection-> : enter=0, leave=0
-
>remote_addr : include/httpd.h line=1057 column=21
r
emote_addr)) {
240                return : pass=0
r
eturn 1;
241            }
242            break : pass=0
b
reak;
243
244        case : true=0, false=0
c
ase T_HOST:
245            if : true=0, false=0
i
f (! : true=0, false=0
!
gothost : modules/aaa/mod_authz_host.c line=214 column=9
g
othost) {
246                int remotehost_is_ip;
247
248                remotehost : modules/aaa/mod_authz_host.c line=215 column=17
r
emotehost = : pass=0
=
 ap_get_remote_host : enter=0, leave=0

ap_get_remote_host : include/http_core.h line=201 column=26
a
p_get_remote_host(r : modules/aaa/mod_authz_host.c line=208 column=40
r
-> : enter=0, leave=0
-
>connection : include/httpd.h line=782 column=15
c
onnection,
249                                                r : modules/aaa/mod_authz_host.c line=208 column=40
r
-> : enter=0, leave=0
-
>per_dir_config : include/httpd.h line=977 column=30
p
er_dir_config,
250                                                REMOTE_DOUBLE_REV,
251                                                &remotehost_is_ip : modules/aaa/mod_authz_host.c line=246 column=21
r
emotehost_is_ip);
252
253                if : true=0, false=0
i
f ((remotehost : modules/aaa/mod_authz_host.c line=215 column=17
r
emotehost == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= NULL) || : true=0, false=0
|
MC/DC independently affect : true=0, false=0

remotehost_is_ip : modules/aaa/mod_authz_host.c line=246 column=21
rTF
emotehost_is_ip) {
254                    gothost : modules/aaa/mod_authz_host.c line=214 column=9
g
othost = : pass=0
=
 1;
255                }
256                else {
257                    gothost : modules/aaa/mod_authz_host.c line=214 column=9
g
othost = : pass=0
=
 2;
258                }
259            }
260
261            if : true=0, false=0
i
f ((gothost : modules/aaa/mod_authz_host.c line=214 column=9
g
othost == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 2) && : true=0, false=0
&
MC/DC independently affect : true=0, false=0
in_domain : enter=0, leave=0

in_domain : modules/aaa/mod_authz_host.c line=181 column=12
iTF
n_domain(ap : modules/aaa/mod_authz_host.c line=211 column=16
a
p[] : enter=0, leave=0
[
i : modules/aaa/mod_authz_host.c line=213 column=9
i
].x : modules/aaa/mod_authz_host.c line=57 column=7
x
.from : modules/aaa/mod_authz_host.c line=55 column=15
f
rom, remotehost : modules/aaa/mod_authz_host.c line=215 column=17
r
emotehost)) {
262                return : pass=0
r
eturn 1;
263            }
264            break : pass=0
b
reak;
265
266        case : true=0, false=0
c
ase T_FAIL:
267            /* do nothing? */
268            break : pass=0
b
reak;
269        }
270    }
271
272    return : pass=0
r
eturn 0;
273}
274
275static int check_dir_access : call=0
c
heck_dir_access(request_rec *r)
276{
277    int method = r : modules/aaa/mod_authz_host.c line=275 column=42
r
-> : enter=0, leave=0
-
>method_number : include/httpd.h line=831 column=9
m
ethod_number;
278    int ret = OK;
279    authz_host_dir_conf *a = (authz_host_dir_conf *)
280        ap_get_module_config(r : modules/aaa/mod_authz_host.c line=275 column=42
r
-> : enter=0, leave=0
-
>per_dir_config : include/httpd.h line=977 column=30
p
er_dir_config, &authz_host_module : modules/aaa/mod_authz_host.c line=72 column=31
a
uthz_host_module);
281
282    if : true=0, false=0
i
f (a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>order : modules/aaa/mod_authz_host.c line=67 column=9
o
rder[] : enter=0, leave=0
[
method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod] == : true=0, false=0
=
= ALLOW_THEN_DENY) {
283        ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et = : pass=0
=
 HTTP_FORBIDDEN;
284        if : true=0, false=0
i
f (find_allowdeny : enter=0, leave=0

find_allowdeny : modules/aaa/mod_authz_host.c line=208 column=12
f
ind_allowdeny(r : modules/aaa/mod_authz_host.c line=275 column=42
r
a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>allows : modules/aaa/mod_authz_host.c line=68 column=25
a
llows, method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod)) {
285            ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et = : pass=0
=
 OK;
286        }
287        if : true=0, false=0
i
f (find_allowdeny : enter=0, leave=0

find_allowdeny : modules/aaa/mod_authz_host.c line=208 column=12
f
ind_allowdeny(r : modules/aaa/mod_authz_host.c line=275 column=42
r
a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>denys : modules/aaa/mod_authz_host.c line=69 column=25
d
enys, method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod)) {
288            ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et = : pass=0
=
 HTTP_FORBIDDEN;
289        }
290    }
291    else if : true=0, false=0
i
f (a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>order : modules/aaa/mod_authz_host.c line=67 column=9
o
rder[] : enter=0, leave=0
[
method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod] == : true=0, false=0
=
= DENY_THEN_ALLOW) {
292        if : true=0, false=0
i
f (find_allowdeny : enter=0, leave=0

find_allowdeny : modules/aaa/mod_authz_host.c line=208 column=12
f
ind_allowdeny(r : modules/aaa/mod_authz_host.c line=275 column=42
r
a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>denys : modules/aaa/mod_authz_host.c line=69 column=25
d
enys, method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod)) {
293            ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et = : pass=0
=
 HTTP_FORBIDDEN;
294        }
295        if : true=0, false=0
i
f (find_allowdeny : enter=0, leave=0

find_allowdeny : modules/aaa/mod_authz_host.c line=208 column=12
f
ind_allowdeny(r : modules/aaa/mod_authz_host.c line=275 column=42
r
a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>allows : modules/aaa/mod_authz_host.c line=68 column=25
a
llows, method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod)) {
296            ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et = : pass=0
=
 OK;
297        }
298    }
299    else {
300        if : true=0, false=0
i
f (MC/DC independently affect : true=0, false=0
find_allowdeny : enter=0, leave=0

find_allowdeny : modules/aaa/mod_authz_host.c line=208 column=12
fTF
ind_allowdeny(r : modules/aaa/mod_authz_host.c line=275 column=42
r
a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>allows : modules/aaa/mod_authz_host.c line=68 column=25
a
llows, method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod)
301            && : true=0, false=0
&
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
find_allowdeny : enter=0, leave=0

find_allowdeny : modules/aaa/mod_authz_host.c line=208 column=12
f
ind_allowdeny(r : modules/aaa/mod_authz_host.c line=275 column=42
r
a : modules/aaa/mod_authz_host.c line=279 column=26
a
-> : enter=0, leave=0
-
>denys : modules/aaa/mod_authz_host.c line=69 column=25
d
enys, method : modules/aaa/mod_authz_host.c line=277 column=9
m
ethod)) {
302            ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et = : pass=0
=
 OK;
303        }
304        else {
305            ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et = : pass=0
=
 HTTP_FORBIDDEN;
306        }
307    }
308
309    if : true=0, false=0
i
f (ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= HTTP_FORBIDDEN
310        && : true=0, false=0
&
& (ap_satisfies : enter=0, leave=0

ap_satisfies : include/http_core.h line=329 column=17
a
p_satisfies(r : modules/aaa/mod_authz_host.c line=275 column=42
r
!= : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= SATISFY_ANY || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
ap_some_auth_required : enter=0, leave=0

ap_some_auth_required : include/http_request.h line=183 column=17
a
p_some_auth_required(r : modules/aaa/mod_authz_host.c line=275 column=42
r
))) {
311        ap_log_rerror : enter=0, leave=0

ap_log_rerror : include/http_log.h line=219 column=18
a
p_log_rerror(APLOG_MARK, APLOG_ERR, 0, r : modules/aaa/mod_authz_host.c line=275 column=42
r
,
312            "client denied by server configuration: %s%s",
313            r : modules/aaa/mod_authz_host.c line=275 column=42
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename conditional operator : true=0, false=0
?
 "" : "uri ",
314            r : modules/aaa/mod_authz_host.c line=275 column=42
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename conditional operator : true=0, false=0
?
 r : modules/aaa/mod_authz_host.c line=275 column=42
r
-> : enter=0, leave=0
-
>filename : include/httpd.h line=948 column=11
f
ilename : r : modules/aaa/mod_authz_host.c line=275 column=42
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri);
315    }
316
317    return : pass=0
r
eturn ret : modules/aaa/mod_authz_host.c line=278 column=9
r
et;
318}
319
320static void register_hooks : call=1
r
egister_hooks(apr_pool_t *p)
321{
322    /* This can be access checker since we don't require r->user to be set. */
323    ap_hook_access_checker : enter=1, leave=1

ap_hook_access_checker : modules/aaa/ line=60 column=1
a
p_hook_access_checker(check_dir_access : modules/aaa/mod_authz_host.c line=275 column=12
c
heck_dir_access,NULL,NULL,APR_HOOK_MIDDLE);
324}
325
326module AP_MODULE_DECLARE_DATA authz_host_module =
327{
328    STANDARD20_MODULE_STUFF,
329    create_authz_host_dir_config : modules/aaa/mod_authz_host.c line=74 column=14
c
reate_authz_host_dir_config,   /* dir config creater */
330    NULL,                           /* dir merger --- default is to override */
331    NULL,                           /* server config */
332    NULL,                           /* merge server config */
333    authz_host_cmds : modules/aaa/mod_authz_host.c line=170 column=26
a
uthz_host_cmds,
334    register_hooks : modules/aaa/mod_authz_host.c line=320 column=13
r
egister_hooks                  /* register hooks */
335};
336[EOF]


Generated by expcov