check result of hdb_open
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2432 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -49,9 +49,12 @@ db_fetch(krb5_context context, krb5_principal principal)
|
|||||||
hdb_entry *ent;
|
hdb_entry *ent;
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
|
|
||||||
|
ret = hdb_open(context, &db, NULL, O_RDONLY, 0);
|
||||||
|
if (ret) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
ent = malloc(sizeof(*ent));
|
ent = malloc(sizeof(*ent));
|
||||||
krb5_copy_principal(context, principal, &ent->principal);
|
krb5_copy_principal(context, principal, &ent->principal);
|
||||||
hdb_open(context, &db, NULL, O_RDONLY, 0);
|
|
||||||
ret = db->fetch(context, db, ent);
|
ret = db->fetch(context, db, ent);
|
||||||
db->close(context, db);
|
db->close(context, db);
|
||||||
if(ret){
|
if(ret){
|
||||||
|
Reference in New Issue
Block a user