MCPcopy Create free account
hub / github.com/apache/httpd / authn_dbd_prepare

Function authn_dbd_prepare

modules/aaa/mod_authn_dbd.c:61–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static const char *authn_dbd_prepare(cmd_parms *cmd, void *cfg, const char *query)
62{
63 static unsigned int label_num = 0;
64 char *label;
65 const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
66 if (err)
67 return err;
68
69 if (authn_dbd_prepare_fn == NULL) {
70 authn_dbd_prepare_fn = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_prepare);
71 if (authn_dbd_prepare_fn == NULL) {
72 return "You must load mod_dbd to enable AuthDBD functions";
73 }
74 authn_dbd_acquire_fn = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_acquire);
75 }
76 label = apr_psprintf(cmd->pool, "authn_dbd_%d", ++label_num);
77
78 authn_dbd_prepare_fn(cmd->server, query, label);
79
80 /* save the label here for our own use */
81 return ap_set_string_slot(cmd, cfg, label);
82}
83
84static const command_rec authn_dbd_cmds[] =
85{

Callers

nothing calls this directly

Calls 2

ap_check_cmd_contextFunction · 0.85
ap_set_string_slotFunction · 0.85

Tested by

no test coverage detected