Break out the that we request from principal from the entry and pass

it in as a separate argument.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17310 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-27 11:09:30 +00:00
parent e4adaa6783
commit 5f22b44baa
6 changed files with 23 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2005 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997 - 2006 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -75,11 +75,10 @@ kadm5_s_get_principal(void *server_handle,
hdb_entry_ex ent;
memset(&ent, 0, sizeof(ent));
ent.entry.principal = princ;
ret = context->db->hdb_open(context->context, context->db, O_RDONLY, 0);
if(ret)
return ret;
ret = context->db->hdb_fetch(context->context, context->db,
ret = context->db->hdb_fetch(context->context, context->db, princ,
HDB_F_DECRYPT, &ent);
context->db->hdb_close(context->context, context->db);
if(ret)