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

 Index  Statistics  Last 
Directory./modules/aaa
Filenamemod_auth_basic.c
ModifiedWed Jul 12 12:38:44 2006

Pass Half Fail Excluded Total
Function
2
33.33%
4
66.67%
0
0.00%
6
100%
Expressions
4
3.31%
117
96.69%
0
0.00%
121
100%
Conditions
0
0.00%
0
0.00%
22
100.00%
0
0.00%
22
100%
MC/DC
0
0.00%
6
100.00%
0
0.00%
6
100%
Branches

if
0
0.00%
0
0.00%
15
100.00%
0
0.00%
15
100%
for
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%
while
0
0.00%
0
0.00%
3
100.00%
0
0.00%
3
100%
case
0
0.00%
0
0.00%
4
100.00%
0
0.00%
4
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#include "apr_strings.h"
18#include "apr_md5.h"            /* for apr_password_validate */
19#include "apr_lib.h"            /* for apr_isspace */
20#include "apr_base64.h"         /* for apr_base64_decode et al */
21#define APR_WANT_STRFUNC        /* for strcasecmp */
22#include "apr_want.h"
23
24#include "ap_config.h"
25#include "httpd.h"
26#include "http_config.h"
27#include "http_core.h"
28#include "http_log.h"
29#include "http_protocol.h"
30#include "http_request.h"
31#include "ap_provider.h"
32
33#include "mod_auth.h"
34
35typedef struct {
36    authn_provider_list *providers;
37    char *dir;
38    int authoritative;
39} auth_basic_config_rec;
40
41static void *create_auth_basic_dir_config : call=1
c
reate_auth_basic_dir_config(apr_pool_t *p, char *d)
42{
43    auth_basic_config_rec *conf = apr_pcalloc(p : modules/aaa/mod_auth_basic.c line=41 column=55
p
, sizeof(*conf));
44
45    conf : modules/aaa/mod_auth_basic.c line=43 column=28
c
onf-> : enter=1, leave=1
-
>dir : modules/aaa/mod_auth_basic.c line=37 column=11
d
ir = : enter=1, leave=1
=
 d : modules/aaa/mod_auth_basic.c line=41 column=64
d
;
46    /* Any failures are fatal. */
47    conf : modules/aaa/mod_auth_basic.c line=43 column=28
c
onf-> : enter=1, leave=1
-
>authoritative : modules/aaa/mod_auth_basic.c line=38 column=9
a
uthoritative = : enter=1, leave=1
=
 1;
48
49    return : pass=1
r
eturn conf : modules/aaa/mod_auth_basic.c line=43 column=28
c
onf;
50}
51
52static const char *add_authn_provider : call=0
a
dd_authn_provider(cmd_parms *cmd, void *config,
53                                      const char *arg)
54{
55    auth_basic_config_rec *conf = (auth_basic_config_rec*)config : modules/aaa/mod_auth_basic.c line=52 column=61
c
onfig;
56    authn_provider_list *newp;
57
58    newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp = : pass=0
=
 apr_pcalloc(cmd : modules/aaa/mod_auth_basic.c line=52 column=50
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, sizeof(authn_provider_list));
59    newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp-> : enter=0, leave=0
-
>provider_name : modules/aaa/mod_auth.h line=71 column=17 provider_name = : enter=0, leave=0
=
 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_auth_basic.c line=52 column=50
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, arg : modules/aaa/mod_auth_basic.c line=53 column=51
a
rg);
60
61    /* lookup and cache the actual provider now */
62    newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp-> : enter=0, leave=0
-
>provider : modules/aaa/mod_auth.h line=72 column=27 provider = : enter=0, leave=0
=
 ap_lookup_provider : enter=0, leave=0

ap_lookup_provider : include/ap_provider.h line=64 column=20
a
p_lookup_provider(AUTHN_PROVIDER_GROUP,
63                                        newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp-> : enter=0, leave=0
-
>provider_name : modules/aaa/mod_auth.h line=71 column=17 provider_name, "0");
64
65    if : true=0, false=0
i
f (newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp-> : enter=0, leave=0
-
>provider : modules/aaa/mod_auth.h line=72 column=27 provider == : true=0, false=0
=
= NULL) {
66        /* by the time they use it, the provider should be loaded and
67           registered with us. */
68        return : pass=0
r
eturn apr_psprintf : enter=0, leave=0

apr_psprintf : /usr/include/apr-1/apr_strings.h line=170 column=28
a
pr_psprintf(cmd : modules/aaa/mod_auth_basic.c line=52 column=50
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool,
69                            "Unknown Authn provider: %s",
70                            newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp-> : enter=0, leave=0
-
>provider_name : modules/aaa/mod_auth.h line=71 column=17 provider_name);
71    }
72
73    if : true=0, false=0
i
f (! : true=0, false=0
!
newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp-> : enter=0, leave=0
-
>provider : modules/aaa/mod_auth.h line=72 column=27 provider-> : enter=0, leave=0
-
>check_password : modules/aaa/mod_auth.h line=57 column=20 check_password) {
74        /* if it doesn't provide the appropriate function, reject it */
75        return : pass=0
r
eturn apr_psprintf : enter=0, leave=0

apr_psprintf : /usr/include/apr-1/apr_strings.h line=170 column=28
a
pr_psprintf(cmd : modules/aaa/mod_auth_basic.c line=52 column=50
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool,
76                            "The '%s' Authn provider doesn't support "
77                            "Basic Authentication", newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp-> : enter=0, leave=0
-
>provider_name : modules/aaa/mod_auth.h line=71 column=17 provider_name);
78    }
79
80    /* Add it to the list now. */
81    if : true=0, false=0
i
f (! : true=0, false=0
!
conf : modules/aaa/mod_auth_basic.c line=55 column=28
c
onf-> : enter=0, leave=0
-
>providers : modules/aaa/mod_auth_basic.c line=36 column=26
p
roviders) {
82        conf : modules/aaa/mod_auth_basic.c line=55 column=28
c
onf-> : enter=0, leave=0
-
>providers : modules/aaa/mod_auth_basic.c line=36 column=26
p
roviders = : enter=0, leave=0
=
 newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp;
83    }
84    else {
85        authn_provider_list *last = conf : modules/aaa/mod_auth_basic.c line=55 column=28
c
onf-> : enter=0, leave=0
-
>providers : modules/aaa/mod_auth_basic.c line=36 column=26
p
roviders;
86
87        while : true=0, false=0
w
hile (last : modules/aaa/mod_auth_basic.c line=85 column=30
l
ast-> : enter=0, leave=0
-
>next : modules/aaa/mod_auth.h line=73 column=26 next) {
88            last : modules/aaa/mod_auth_basic.c line=85 column=30
l
ast = : pass=0
=
 last : modules/aaa/mod_auth_basic.c line=85 column=30
l
ast-> : enter=0, leave=0
-
>next : modules/aaa/mod_auth.h line=73 column=26 next;
89        }
90        last : modules/aaa/mod_auth_basic.c line=85 column=30
l
ast-> : enter=0, leave=0
-
>next : modules/aaa/mod_auth.h line=73 column=26 next = : enter=0, leave=0
=
 newp : modules/aaa/mod_auth_basic.c line=56 column=26
n
ewp;
91    }
92
93    return : pass=0
r
eturn NULL;
94}
95
96static const command_rec auth_basic_cmds[] =
97{
98    AP_INIT_ITERATE("AuthBasicProvider", add_authn_provider : modules/aaa/mod_auth_basic.c line=52 column=20
a
dd_authn_provider, NULL, OR_AUTHCFG,
99                    "specify the auth providers for a directory or location"),
100    AP_INIT_FLAG("AuthBasicAuthoritative", ap_set_flag_slot : include/http_config.h line=523 column=33
a
p_set_flag_slot,
101                 (void *)APR_OFFSETOF(auth_basic_config_rec, authoritative : modules/aaa/mod_auth_basic.c line=38 column=9
a
uthoritative),
102                 OR_AUTHCFG,
103                 "Set to 'Off' to allow access control to be passed along to "
104                 "lower modules if the UserID is not known to this module"),
105    {NULL}
106};
107
108module AP_MODULE_DECLARE_DATA auth_basic_module;
109
110/* These functions return 0 if client is OK, and proper error status
111 * if not... either HTTP_UNAUTHORIZED, if we made a check, and it failed, or
112 * HTTP_INTERNAL_SERVER_ERROR, if things are so totally confused that we
113 * couldn't figure out how to tell if the client is authorized or not.
114 *
115 * If they return DECLINED, and all other modules also decline, that's
116 * treated by the server core as a configuration error, logged and
117 * reported as such.
118 */
119
120static void note_basic_auth_failure : call=0
n
ote_basic_auth_failure(request_rec *r)
121{
122    apr_table_setn : enter=0, leave=0

apr_table_setn : /usr/include/apr-1/apr_tables.h line=282 column=19
a
pr_table_setn(r : modules/aaa/mod_auth_basic.c line=120 column=50
r
-> : enter=0, leave=0
-
>err_headers_out : include/httpd.h line=906 column=18
e
rr_headers_out,
123                   (PROXYREQ_PROXY == : true=0, false=0
=
r : modules/aaa/mod_auth_basic.c line=120 column=50
r
-> : enter=0, leave=0
-
>proxyreq : include/httpd.h line=806 column=9
p
roxyreq) conditional operator : true=0, false=0
?
 "Proxy-Authenticate"
124                                                   : "WWW-Authenticate",
125                   apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(r : modules/aaa/mod_auth_basic.c line=120 column=50
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, "Basic realm=\"", ap_auth_name : enter=0, leave=0

ap_auth_name : include/http_core.h line=317 column=26
a
p_auth_name(r : modules/aaa/mod_auth_basic.c line=120 column=50
r
),
126                               "\"", NULL));
127}
128
129static int get_basic_auth : call=0
g
et_basic_auth(request_rec *r, const char **user,
130                          const char **pw)
131{
132    const char *auth_line;
133    char *decoded_line;
134    int length;
135
136    /* Get the appropriate header */
137    auth_line : modules/aaa/mod_auth_basic.c line=132 column=17
a
uth_line = : pass=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_auth_basic.c line=129 column=40
r
-> : enter=0, leave=0
-
>headers_in : include/httpd.h line=901 column=18
h
eaders_in, (PROXYREQ_PROXY == : true=0, false=0
=
r : modules/aaa/mod_auth_basic.c line=129 column=40
r
-> : enter=0, leave=0
-
>proxyreq : include/httpd.h line=806 column=9
p
roxyreq)
138                                              conditional operator : true=0, false=0
?
 "Proxy-Authorization"
139                                              : "Authorization");
140
141    if : true=0, false=0
i
f (! : true=0, false=0
!
auth_line : modules/aaa/mod_auth_basic.c line=132 column=17
a
uth_line) {
142        note_basic_auth_failure : enter=0, leave=0

note_basic_auth_failure : modules/aaa/mod_auth_basic.c line=120 column=13
n
ote_basic_auth_failure(r : modules/aaa/mod_auth_basic.c line=129 column=40
r
);
143        return : pass=0
r
eturn HTTP_UNAUTHORIZED;
144    }
145
146    if : true=0, false=0
i
f (strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
s
trcasecmp(ap_getword : enter=0, leave=0

ap_getword : include/httpd.h line=1299 column=20
a
p_getword(r : modules/aaa/mod_auth_basic.c line=129 column=40
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, &auth_line : modules/aaa/mod_auth_basic.c line=132 column=17
a
uth_line, ' '), "Basic")) {
147        /* Client tried to authenticate using wrong auth scheme */
148        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_auth_basic.c line=129 column=40
r
,
149                      "client used wrong authentication scheme: %s", r : modules/aaa/mod_auth_basic.c line=129 column=40
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri);
150        note_basic_auth_failure : enter=0, leave=0

note_basic_auth_failure : modules/aaa/mod_auth_basic.c line=120 column=13
n
ote_basic_auth_failure(r : modules/aaa/mod_auth_basic.c line=129 column=40
r
);
151        return : pass=0
r
eturn HTTP_UNAUTHORIZED;
152    }
153
154    /* Skip leading spaces. */
155    while : true=0, false=0
w
hile (apr_isspace(* dereference : enter=0, leave=0
*
auth_line : modules/aaa/mod_auth_basic.c line=132 column=17
a
uth_line)) {
156        auth_line : modules/aaa/mod_auth_basic.c line=132 column=17
a
uth_line++ : pass=0
+
+;
157    }
158
159    decoded_line : modules/aaa/mod_auth_basic.c line=133 column=11
d
ecoded_line = : pass=0
=
 apr_palloc : enter=0, leave=0

apr_palloc : /usr/include/apr-1/apr_pools.h line=419 column=21
a
pr_palloc(r : modules/aaa/mod_auth_basic.c line=129 column=40
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, apr_base64_decode_len : enter=0, leave=0

apr_base64_decode_len : /usr/include/apr-1/apr_base64.h line=88 column=18
a
pr_base64_decode_len(auth_line : modules/aaa/mod_auth_basic.c line=132 column=17
a
uth_line) + : pass=0
+
 1);
160    length : modules/aaa/mod_auth_basic.c line=134 column=9
l
ength = : pass=0
=
 apr_base64_decode : enter=0, leave=0

apr_base64_decode : /usr/include/apr-1/apr_base64.h line=96 column=18
a
pr_base64_decode(decoded_line : modules/aaa/mod_auth_basic.c line=133 column=11
d
ecoded_line, auth_line : modules/aaa/mod_auth_basic.c line=132 column=17
a
uth_line);
161    /* Null-terminate the string. */
162    decoded_line : modules/aaa/mod_auth_basic.c line=133 column=11
d
ecoded_line[length : modules/aaa/mod_auth_basic.c line=134 column=9
l
ength] = : enter=0, leave=0
=
 '\0';
163
164    *user : modules/aaa/mod_auth_basic.c line=129 column=56
u
ser = : enter=0, leave=0
=
 ap_getword_nulls : enter=0, leave=0

ap_getword_nulls : include/httpd.h line=1338 column=20
a
p_getword_nulls(r : modules/aaa/mod_auth_basic.c line=129 column=40
r
-> : enter=0, leave=0
-
>pool : include/httpd.h line=780 column=17
p
ool, (const char**)&decoded_line : modules/aaa/mod_auth_basic.c line=133 column=11
d
ecoded_line, ':');
165    *pw : modules/aaa/mod_auth_basic.c line=130 column=40
p
= : enter=0, leave=0
=
 decoded_line : modules/aaa/mod_auth_basic.c line=133 column=11
d
ecoded_line;
166
167    /* set the user, even though the user is unauthenticated at this point */
168    r : modules/aaa/mod_auth_basic.c line=129 column=40
r
-> : enter=0, leave=0
-
>user : include/httpd.h line=930 column=11
u
ser = : enter=0, leave=0
=
 (char *) * dereference : enter=0, leave=0
*
user : modules/aaa/mod_auth_basic.c line=129 column=56
u
ser;
169
170    return : pass=0
r
eturn OK;
171}
172
173/* Determine user ID, and check if it really is that user, for HTTP
174 * basic authentication...
175 */
176static int authenticate_basic_user : call=0
a
uthenticate_basic_user(request_rec *r)
177{
178    auth_basic_config_rec *conf = ap_get_module_config(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>per_dir_config : include/httpd.h line=977 column=30
p
er_dir_config,
179                                                       &auth_basic_module : modules/aaa/mod_auth_basic.c line=108 column=31
a
uth_basic_module);
180    const char *sent_user, *sent_pw, *current_auth;
181    int res;
182    authn_status auth_result;
183    authn_provider_list *current_provider;
184
185    /* Are we configured to be Basic auth? */
186    current_auth : modules/aaa/mod_auth_basic.c line=180 column=39
c
urrent_auth = : pass=0
=
 ap_auth_type : enter=0, leave=0

ap_auth_type : include/http_core.h line=310 column=26
a
p_auth_type(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
);
187    if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
current_auth : modules/aaa/mod_auth_basic.c line=180 column=39
c
urrent_auth || : true=0, false=0
|
MC/DC independently affect : true=0, false=0
strcasecmp : enter=0, leave=0

strcasecmp : /usr/include/string.h line=536 column=12
sTF
trcasecmp(current_auth : modules/aaa/mod_auth_basic.c line=180 column=39
c
urrent_auth, "Basic")) {
188        return : pass=0
r
eturn DECLINED;
189    }
190
191    /* We need an authentication realm. */
192    if : true=0, false=0
i
f (! : true=0, false=0
!
ap_auth_name : enter=0, leave=0

ap_auth_name : include/http_core.h line=317 column=26
a
p_auth_name(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
)) {
193        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,
194                      0, r : modules/aaa/mod_auth_basic.c line=176 column=49
r
, "need AuthName: %s", r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri);
195        return : pass=0
r
eturn HTTP_INTERNAL_SERVER_ERROR;
196    }
197
198    r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>ap_auth_type : include/httpd.h line=932 column=11
a
p_auth_type = : enter=0, leave=0
=
 "Basic";
199
200    res : modules/aaa/mod_auth_basic.c line=181 column=9
r
es = : pass=0
=
 get_basic_auth : enter=0, leave=0

get_basic_auth : modules/aaa/mod_auth_basic.c line=129 column=12
g
et_basic_auth(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
, &sent_user : modules/aaa/mod_auth_basic.c line=180 column=17
s
ent_user, &sent_pw : modules/aaa/mod_auth_basic.c line=180 column=29
s
ent_pw);
201    if : true=0, false=0
i
f (res : modules/aaa/mod_auth_basic.c line=181 column=9
r
es) {
202        return : pass=0
r
eturn res : modules/aaa/mod_auth_basic.c line=181 column=9
r
es;
203    }
204
205    current_provider : modules/aaa/mod_auth_basic.c line=183 column=26
c
urrent_provider = : pass=0
=
 conf : modules/aaa/mod_auth_basic.c line=178 column=28
c
onf-> : enter=0, leave=0
-
>providers : modules/aaa/mod_auth_basic.c line=36 column=26
p
roviders;
206    do {
207        const authn_provider *provider;
208
209        /* For now, if a provider isn't set, we'll be nice and use the file
210         * provider.
211         */
212        if : true=0, false=0
i
f (! : true=0, false=0
!
current_provider : modules/aaa/mod_auth_basic.c line=183 column=26
c
urrent_provider) {
213            provider : modules/aaa/mod_auth_basic.c line=207 column=31
p
rovider = : pass=0
=
 ap_lookup_provider : enter=0, leave=0

ap_lookup_provider : include/ap_provider.h line=64 column=20
a
p_lookup_provider(AUTHN_PROVIDER_GROUP,
214                                          AUTHN_DEFAULT_PROVIDER, "0");
215
216            if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
provider : modules/aaa/mod_auth_basic.c line=207 column=31
p
rovider || : true=0, false=0
|
! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
provider : modules/aaa/mod_auth_basic.c line=207 column=31
p
rovider-> : enter=0, leave=0
-
>check_password : modules/aaa/mod_auth.h line=57 column=20 check_password) {
217                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_auth_basic.c line=176 column=49
r
,
218                              "No Authn provider configured");
219                auth_result : modules/aaa/mod_auth_basic.c line=182 column=18
a
uth_result = : pass=0
=
 AUTH_GENERAL_ERROR : modules/aaa/mod_auth.h line=50 column=5 AUTH_GENERAL_ERROR;
220                break : pass=0
b
reak;
221            }
222            apr_table_setn : enter=0, leave=0

apr_table_setn : /usr/include/apr-1/apr_tables.h line=282 column=19
a
pr_table_setn(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>notes : include/httpd.h line=910 column=18
n
otes, AUTHN_PROVIDER_NAME_NOTE, AUTHN_DEFAULT_PROVIDER);
223        }
224        else {
225            provider : modules/aaa/mod_auth_basic.c line=207 column=31
p
rovider = : pass=0
=
 current_provider : modules/aaa/mod_auth_basic.c line=183 column=26
c
urrent_provider-> : enter=0, leave=0
-
>provider : modules/aaa/mod_auth.h line=72 column=27 provider;
226            apr_table_setn : enter=0, leave=0

apr_table_setn : /usr/include/apr-1/apr_tables.h line=282 column=19
a
pr_table_setn(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>notes : include/httpd.h line=910 column=18
n
otes, AUTHN_PROVIDER_NAME_NOTE, current_provider : modules/aaa/mod_auth_basic.c line=183 column=26
c
urrent_provider-> : enter=0, leave=0
-
>provider_name : modules/aaa/mod_auth.h line=71 column=17 provider_name);
227        }
228
229
230        auth_result : modules/aaa/mod_auth_basic.c line=182 column=18
a
uth_result = : pass=0
=
 check_password : enter=0, leave=0

provider : modules/aaa/mod_auth_basic.c line=207 column=31
check_password : modules/aaa/mod_auth.h line=57 column=20
p
rovider-> : enter=0, leave=0
-
>check_password : modules/aaa/mod_auth.h line=57 column=20 check_password(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
sent_user : modules/aaa/mod_auth_basic.c line=180 column=17
s
ent_user, sent_pw : modules/aaa/mod_auth_basic.c line=180 column=29
s
ent_pw);
231
232        apr_table_unset : enter=0, leave=0

apr_table_unset : /usr/include/apr-1/apr_tables.h line=290 column=19
a
pr_table_unset(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>notes : include/httpd.h line=910 column=18
n
otes, AUTHN_PROVIDER_NAME_NOTE);
233
234        /* Something occured. Stop checking. */
235        if : true=0, false=0
i
f (auth_result : modules/aaa/mod_auth_basic.c line=182 column=18
a
uth_result != : true=0, false=0
!
AUTH_USER_NOT_FOUND : modules/aaa/mod_auth.h line=49 column=5 AUTH_USER_NOT_FOUND) {
236            break : pass=0
b
reak;
237        }
238
239        /* If we're not really configured for providers, stop now. */
240        if : true=0, false=0
i
f (! : true=0, false=0
!
conf : modules/aaa/mod_auth_basic.c line=178 column=28
c
onf-> : enter=0, leave=0
-
>providers : modules/aaa/mod_auth_basic.c line=36 column=26
p
roviders) {
241            break : pass=0
b
reak;
242        }
243
244        current_provider : modules/aaa/mod_auth_basic.c line=183 column=26
c
urrent_provider = : pass=0
=
 current_provider : modules/aaa/mod_auth_basic.c line=183 column=26
c
urrent_provider-> : enter=0, leave=0
-
>next : modules/aaa/mod_auth.h line=73 column=26 next;
245    } while : true=0, false=0
w
hile (current_provider : modules/aaa/mod_auth_basic.c line=183 column=26
c
urrent_provider);
246
247    if : true=0, false=0
i
f (auth_result : modules/aaa/mod_auth_basic.c line=182 column=18
a
uth_result != : true=0, false=0
!
AUTH_GRANTED : modules/aaa/mod_auth.h line=47 column=5 AUTH_GRANTED) {
248        int return_code;
249
250        /* If we're not authoritative, then any error is ignored. */
251        if : true=0, false=0
i
f (! : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
(conf : modules/aaa/mod_auth_basic.c line=178 column=28
c
onf-> : enter=0, leave=0
-
>authoritative : modules/aaa/mod_auth_basic.c line=38 column=9
a
uthoritative) && : true=0, false=0
&
auth_result : modules/aaa/mod_auth_basic.c line=182 column=18
a
uth_result != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
AUTH_DENIED : modules/aaa/mod_auth.h line=46 column=5 AUTH_DENIED) {
252            return : pass=0
r
eturn DECLINED;
253        }
254
255        switch : pass=0
s
witch (auth_result : modules/aaa/mod_auth_basic.c line=182 column=18
a
uth_result) {
256        case : true=0, false=0
c
ase AUTH_DENIED:
257            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_auth_basic.c line=176 column=49
r
,
258                      "user %s: authentication failure for \"%s\": "
259                      "Password Mismatch",
260                      sent_user : modules/aaa/mod_auth_basic.c line=180 column=17
s
ent_user, r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri);
261            return_code : modules/aaa/mod_auth_basic.c line=248 column=13
r
eturn_code = : pass=0
=
 HTTP_UNAUTHORIZED;
262            break : pass=0
b
reak;
263        case : true=0, false=0
c
ase AUTH_USER_NOT_FOUND:
264            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_auth_basic.c line=176 column=49
r
,
265                      "user %s not found: %s", sent_user : modules/aaa/mod_auth_basic.c line=180 column=17
s
ent_user, r : modules/aaa/mod_auth_basic.c line=176 column=49
r
-> : enter=0, leave=0
-
>uri : include/httpd.h line=946 column=11
u
ri);
266            return_code : modules/aaa/mod_auth_basic.c line=248 column=13
r
eturn_code = : pass=0
=
 HTTP_UNAUTHORIZED;
267            break : pass=0
b
reak;
268        case : true=0, false=0
c
ase AUTH_GENERAL_ERROR:
269        default : true=0, false=0
d
efault:
270            /* We'll assume that the module has already said what its error
271             * was in the logs.
272             */
273            return_code : modules/aaa/mod_auth_basic.c line=248 column=13
r
eturn_code = : pass=0
=
 HTTP_INTERNAL_SERVER_ERROR;
274            break : pass=0
b
reak;
275        }
276
277        /* If we're returning 403, tell them to try again. */
278        if : true=0, false=0
i
f (return_code : modules/aaa/mod_auth_basic.c line=248 column=13
r
eturn_code == : true=0, false=0
=
= HTTP_UNAUTHORIZED) {
279            note_basic_auth_failure : enter=0, leave=0

note_basic_auth_failure : modules/aaa/mod_auth_basic.c line=120 column=13
n
ote_basic_auth_failure(r : modules/aaa/mod_auth_basic.c line=176 column=49
r
);
280        }
281        return : pass=0
r
eturn return_code : modules/aaa/mod_auth_basic.c line=248 column=13
r
eturn_code;
282    }
283
284    return : pass=0
r
eturn OK;
285}
286
287static void register_hooks : call=1
r
egister_hooks(apr_pool_t *p)
288{
289    ap_hook_check_user_id : enter=1, leave=1

ap_hook_check_user_id : modules/aaa/ line=128 column=1
a
p_hook_check_user_id(authenticate_basic_user : modules/aaa/mod_auth_basic.c line=176 column=12
a
uthenticate_basic_user,NULL,NULL,APR_HOOK_MIDDLE);
290}
291
292module AP_MODULE_DECLARE_DATA auth_basic_module =
293{
294    STANDARD20_MODULE_STUFF,
295    create_auth_basic_dir_config : modules/aaa/mod_auth_basic.c line=41 column=14
c
reate_auth_basic_dir_config,  /* dir config creater */
296    NULL,                          /* dir merger --- default is to override */
297    NULL,                          /* server config */
298    NULL,                          /* merge server config */
299    auth_basic_cmds : modules/aaa/mod_auth_basic.c line=96 column=26
a
uth_basic_cmds,               /* command apr_table_t */
300    register_hooks : modules/aaa/mod_auth_basic.c line=287 column=13
r
egister_hooks                 /* register hooks */
301};
302[EOF]


Generated by expcov