Lines Matching +full:entry +full:- +full:method
2 * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan
53 * - Berkeley DB 1.85
54 * - Berkeley DB 3.0
55 * - Berkeley DB 4.0
56 * - New Berkeley DB
57 * - LDAP
71 { HDB_INTERFACE_VERSION, "mit-db:", hdb_mdb_create},
104 for (k = *key ? (*key) + 1 : e->keys.val; in hdb_next_enctype2key()
105 k < e->keys.val + e->keys.len; in hdb_next_enctype2key()
108 if(k->key.keytype == enctype){ in hdb_next_enctype2key()
114 "No next enctype %d for hdb-entry", in hdb_next_enctype2key()
132 memset(key->key.keyvalue.data, in hdb_free_key()
134 key->key.keyvalue.length); in hdb_free_key()
173 if (ent->free_entry) in hdb_free_entry()
174 (*ent->free_entry)(context, ent); in hdb_free_entry()
176 for(i = 0; i < ent->entry.keys.len; ++i) { in hdb_free_entry()
177 Key *k = &ent->entry.keys.val[i]; in hdb_free_entry()
179 memset (k->key.keyvalue.data, 0, k->key.keyvalue.length); in hdb_free_entry()
181 free_hdb_entry(&ent->entry); in hdb_free_entry()
192 hdb_entry_ex entry; in hdb_foreach() local
193 ret = db->hdb_firstkey(context, db, flags, &entry); in hdb_foreach()
197 ret = (*func)(context, db, &entry, data); in hdb_foreach()
198 hdb_free_entry(context, &entry); in hdb_foreach()
200 ret = db->hdb_nextkey(context, db, flags, &entry); in hdb_foreach()
216 ret = db->hdb_lock(context, db, HDB_RLOCK); in hdb_check_db_format()
222 ret = (*db->hdb__get)(context, db, tag, &version); in hdb_check_db_format()
223 ret2 = db->hdb_unlock(context, db); in hdb_check_db_format()
249 ret = db->hdb_lock(context, db, HDB_WLOCK); in hdb_init_db()
258 ret = (*db->hdb__put)(context, db, 0, tag, version); in hdb_init_db()
259 ret2 = db->hdb_unlock(context, db); in hdb_init_db()
280 static struct hdb_method method; in find_dynamic_method() local
293 len = p - filename; in find_dynamic_method()
301 if (asprintf(&path, LIBDIR "/hdb_%s.so", prefix) == -1) in find_dynamic_method()
320 if (asprintf(&symbol, "hdb_%s_interface", prefix) == -1) in find_dynamic_method()
336 if (mso->version != HDB_INTERFACE_VERSION) { in find_dynamic_method()
340 prefix, mso->version, HDB_INTERFACE_VERSION); in find_dynamic_method()
346 if (mso->create == NULL) { in find_dynamic_method()
348 "no entry point function in shared mod %s ", in find_dynamic_method()
355 method.create = mso->create; in find_dynamic_method()
356 method.prefix = prefix; in find_dynamic_method()
358 return &method; in find_dynamic_method()
363 * find the relevant method for `filename', returning a pointer to the
365 * return NULL if there's no such method.
373 for (h = methods; h->prefix != NULL; ++h) { in find_method()
374 if (strncmp (filename, h->prefix, strlen(h->prefix)) == 0) { in find_method()
375 *rest = filename + strlen(h->prefix); in find_method()
399 for (h = methods; h->prefix != NULL; ++h) { in hdb_list_builtin()
400 if (h->prefix[0] == '\0') in hdb_list_builtin()
402 len += strlen(h->prefix) + 2; in hdb_list_builtin()
413 for (h = methods; h->prefix != NULL; ++h) { in hdb_list_builtin()
416 strlcat(buf, h->prefix, len); in hdb_list_builtin()
425 hdb_entry_ex *entry) in _hdb_keytab2hdb_entry() argument
427 entry->entry.kvno = ktentry->vno; in _hdb_keytab2hdb_entry()
428 entry->entry.created_by.time = ktentry->timestamp; in _hdb_keytab2hdb_entry()
430 entry->entry.keys.val = calloc(1, sizeof(entry->entry.keys.val[0])); in _hdb_keytab2hdb_entry()
431 if (entry->entry.keys.val == NULL) in _hdb_keytab2hdb_entry()
433 entry->entry.keys.len = 1; in _hdb_keytab2hdb_entry()
435 entry->entry.keys.val[0].mkvno = NULL; in _hdb_keytab2hdb_entry()
436 entry->entry.keys.val[0].salt = NULL; in _hdb_keytab2hdb_entry()
439 &ktentry->keyblock, in _hdb_keytab2hdb_entry()
440 &entry->entry.keys.val[0].key); in _hdb_keytab2hdb_entry()
469 if (strncmp (filename, h->prefix, strlen(h->prefix)) == 0 in hdb_create()
470 && h->interface_version == HDB_INTERFACE_VERSION) { in hdb_create()
471 residual = filename + strlen(h->prefix); in hdb_create()
488 return (*h->create)(context, db, residual); in hdb_create()