Lines Matching refs:code

108     int code;  in _hdb_fetch_kvno()  local
128 code = db->hdb__get(context, db, key, &value); in _hdb_fetch_kvno()
130 if(code) in _hdb_fetch_kvno()
131 return code; in _hdb_fetch_kvno()
132 code = hdb_value2entry(context, &value, &entry->entry); in _hdb_fetch_kvno()
133 if (code == ASN1_BAD_ID && (flags & HDB_F_CANON) == 0) { in _hdb_fetch_kvno()
136 } else if (code == ASN1_BAD_ID) { in _hdb_fetch_kvno()
139 code = hdb_value2entry_alias(context, &value, &alias); in _hdb_fetch_kvno()
140 if (code) { in _hdb_fetch_kvno()
142 return code; in _hdb_fetch_kvno()
148 code = db->hdb__get(context, db, key, &value); in _hdb_fetch_kvno()
150 if (code) in _hdb_fetch_kvno()
151 return code; in _hdb_fetch_kvno()
152 code = hdb_value2entry(context, &value, &entry->entry); in _hdb_fetch_kvno()
153 if (code) { in _hdb_fetch_kvno()
155 return code; in _hdb_fetch_kvno()
160 code = hdb_unseal_keys (context, db, &entry->entry); in _hdb_fetch_kvno()
161 if (code) in _hdb_fetch_kvno()
164 return code; in _hdb_fetch_kvno()
171 krb5_error_code code; in hdb_remove_aliases() local
176 code = db->hdb__get(context, db, *key, &value); in hdb_remove_aliases()
177 if (code == HDB_ERR_NOENTRY) in hdb_remove_aliases()
179 else if (code) in hdb_remove_aliases()
180 return code; in hdb_remove_aliases()
182 code = hdb_value2entry(context, &value, &oldentry); in hdb_remove_aliases()
184 if (code) in hdb_remove_aliases()
185 return code; in hdb_remove_aliases()
187 code = hdb_entry_get_aliases(&oldentry, &aliases); in hdb_remove_aliases()
188 if (code || aliases == NULL) { in hdb_remove_aliases()
190 return code; in hdb_remove_aliases()
196 code = db->hdb__del(context, db, akey); in hdb_remove_aliases()
198 if (code) { in hdb_remove_aliases()
200 return code; in hdb_remove_aliases()
212 krb5_error_code code; in hdb_add_aliases() local
216 code = hdb_entry_get_aliases(&entry->entry, &aliases); in hdb_add_aliases()
217 if (code || aliases == NULL) in hdb_add_aliases()
218 return code; in hdb_add_aliases()
225 code = hdb_entry_alias2value(context, &entryalias, &value); in hdb_add_aliases()
226 if (code) { in hdb_add_aliases()
228 return code; in hdb_add_aliases()
230 code = db->hdb__put(context, db, flags, key, value); in hdb_add_aliases()
233 if (code) in hdb_add_aliases()
234 return code; in hdb_add_aliases()
243 int code; in hdb_check_aliases() local
248 code = hdb_entry_get_aliases(&entry->entry, &aliases); in hdb_check_aliases()
249 if (code) in hdb_check_aliases()
250 return code; in hdb_check_aliases()
257 code = db->hdb__get(context, db, akey, &value); in hdb_check_aliases()
259 if (code == HDB_ERR_NOENTRY) in hdb_check_aliases()
261 else if (code) in hdb_check_aliases()
262 return code; in hdb_check_aliases()
264 code = hdb_value2entry_alias(context, &value, &alias); in hdb_check_aliases()
267 if (code == ASN1_BAD_ID) in hdb_check_aliases()
269 else if (code) in hdb_check_aliases()
270 return code; in hdb_check_aliases()
272 code = krb5_principal_compare(context, alias.principal, in hdb_check_aliases()
275 if (code == 0) in hdb_check_aliases()
285 int code; in _hdb_store() local
288 code = hdb_check_aliases(context, db, entry); in _hdb_store()
289 if (code) in _hdb_store()
290 return code; in _hdb_store()
306 code = hdb_seal_keys(context, db, &entry->entry); in _hdb_store()
307 if (code) in _hdb_store()
308 return code; in _hdb_store()
313 code = hdb_remove_aliases(context, db, &key); in _hdb_store()
314 if (code) { in _hdb_store()
316 return code; in _hdb_store()
319 code = db->hdb__put(context, db, flags & HDB_F_REPLACE, key, value); in _hdb_store()
322 if (code) in _hdb_store()
323 return code; in _hdb_store()
325 code = hdb_add_aliases(context, db, flags, entry); in _hdb_store()
327 return code; in _hdb_store()
334 int code; in _hdb_remove() local
338 code = hdb_remove_aliases(context, db, &key); in _hdb_remove()
339 if (code) { in _hdb_remove()
341 return code; in _hdb_remove()
343 code = db->hdb__del(context, db, key); in _hdb_remove()
345 return code; in _hdb_remove()