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

Function authz_dbd_prepare

modules/aaa/mod_authz_dbd.c:78–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static const char *authz_dbd_prepare(cmd_parms *cmd, void *cfg,
79 const char *query)
80{
81 static unsigned int label_num = 0;
82 char *label;
83 const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
84 if (err)
85 return err;
86
87 if (dbd_prepare == NULL) {
88 dbd_prepare = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_prepare);
89 if (dbd_prepare == NULL) {
90 return "You must load mod_dbd to enable AuthzDBD functions";
91 }
92 dbd_handle = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_acquire);
93 }
94 label = apr_psprintf(cmd->pool, "authz_dbd_%d", ++label_num);
95
96 dbd_prepare(cmd->server, query, label);
97
98 /* save the label here for our own use */
99 return ap_set_string_slot(cmd, cfg, label);
100}
101
102static const command_rec authz_dbd_cmds[] = {
103 AP_INIT_FLAG("AuthzDBDLoginToReferer", ap_set_flag_slot,

Callers

nothing calls this directly

Calls 3

ap_check_cmd_contextFunction · 0.85
dbd_prepareFunction · 0.85
ap_set_string_slotFunction · 0.85

Tested by

no test coverage detected