util_ldap_cache.c revision 1ceeea823d893a985971a745ac9e29f4e70bf6aa
/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* util_ldap_cache.c: LDAP cache things
*
* Original code from auth_ldap module for Apache v1.3:
* Copyright 1998, 1999 Enbridge Pipelines Inc.
* Copyright 1999-2001 Dave Carrigan
*/
#include "httpd.h"
#include "util_ldap.h"
#include "util_ldap_cache.h"
#include <apr_strings.h>
#if APR_HAS_LDAP
/* ------------------------------------------------------------------ */
unsigned long util_ldap_url_node_hash(void *n)
{
util_url_node_t *node = n;
}
int util_ldap_url_node_compare(void *a, void *b)
{
util_url_node_t *na = a;
util_url_node_t *nb = b;
}
{
util_url_node_t *n = c;
if (node) {
return NULL;
}
return node;
}
else {
return NULL;
}
}
{
util_url_node_t *node = n;
}
{
util_url_node_t *node = n;
char *buf;
const char *type_str;
int x;
for (x=0;x<3;x++) {
switch (x) {
case 0:
type_str = "Searches";
break;
case 1:
type_str = "Compares";
break;
case 2:
default:
type_str = "DN Compares";
break;
}
if (cache_node->marktime) {
}
else
date_str[0] = 0;
"<tr valign='top'>"
"<td nowrap>%s (%s)</td>"
"<td nowrap>%ld</td>"
"<td nowrap>%ld</td>"
"<td nowrap>%ld</td>"
"<td nowrap>%ld</td>"
"<td nowrap>%s</td>"
"<tr>",
date_str);
}
}
/* ------------------------------------------------------------------ */
/* Cache functions for search nodes */
unsigned long util_ldap_search_node_hash(void *n)
{
util_search_node_t *node = n;
}
int util_ldap_search_node_compare(void *a, void *b)
{
util_search_node_t *na = a;
util_search_node_t *nb = b;
}
{
util_search_node_t *node = c;
/* safety check */
if (newnode) {
/* copy vals */
int i = 0;
return NULL;
}
for (;k;k--) {
return NULL;
}
}
else
i++;
}
}
else {
}
return NULL;
}
return NULL;
}
} else {
}
}
return (void *)newnode;
}
{
int i = 0;
util_search_node_t *node = n;
for (;k;k--,i++) {
}
}
}
}
{
util_search_node_t *node = n;
char *buf;
"<tr valign='top'>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
"<tr>",
date_str);
}
/* ------------------------------------------------------------------ */
unsigned long util_ldap_compare_node_hash(void *n)
{
util_compare_node_t *node = n;
}
int util_ldap_compare_node_compare(void *a, void *b)
{
util_compare_node_t *na = a;
util_compare_node_t *nb = b;
}
{
util_compare_node_t *n = c;
if (node) {
return NULL;
}
return node;
}
else {
return NULL;
}
}
{
util_compare_node_t *node = n;
}
{
util_compare_node_t *node = n;
char *buf, *cmp_result;
cmp_result = "LDAP_COMPARE_TRUE";
}
cmp_result = "LDAP_COMPARE_FALSE";
}
else {
}
"<tr valign='top'>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
"<tr>",
}
/* ------------------------------------------------------------------ */
unsigned long util_ldap_dn_compare_node_hash(void *n)
{
util_dn_compare_node_t *node = n;
}
int util_ldap_dn_compare_node_compare(void *a, void *b)
{
util_dn_compare_node_t *na = a;
util_dn_compare_node_t *nb = b;
}
{
util_dn_compare_node_t *n = c;
if (node) {
return NULL;
}
return node;
}
else {
return NULL;
}
}
{
util_dn_compare_node_t *node = n;
}
{
util_dn_compare_node_t *node = n;
char *buf;
"<tr valign='top'>"
"<td nowrap>%s</td>"
"<td nowrap>%s</td>"
"<tr>",
}
/* ------------------------------------------------------------------ */
{
}
return result;
}
#endif
return APR_SUCCESS;
}
{
/* Remove any existing shm segment with this name. */
if (result != APR_SUCCESS) {
return result;
}
/* Determine the usable size of the shm segment. */
/* This will create a rmm "handler" to get into the shared memory area */
if (result != APR_SUCCESS) {
return result;
}
#endif
return APR_SUCCESS;
}
#endif /* APR_HAS_LDAP */