Return values.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3780 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-11-05 23:23:12 +00:00
parent 1e9953fa65
commit 0e9fb80fbb
6 changed files with 11 additions and 20 deletions

View File

@@ -67,7 +67,5 @@ out2:
hdb_free_entry(context->context, &ent); hdb_free_entry(context->context, &ent);
out: out:
context->db->close(context->context, context->db); context->db->close(context->context, context->db);
if(ret == HDB_ERR_NOENTRY) return _kadm5_error_code(ret);
return KADM5_UNK_PRINC;
return ret;
} }

View File

@@ -48,10 +48,11 @@ kadm5_s_delete_principal(void *server_handle, krb5_principal princ)
hdb_entry ent; hdb_entry ent;
ent.principal = princ; ent.principal = princ;
ret = context->db->open(context->context, context->db, O_RDWR, 0); ret = context->db->open(context->context, context->db, O_RDWR, 0);
if(ret) return ret; if(ret) {
krb5_warn(context->context, ret, "opening database");
return ret;
}
ret = context->db->delete(context->context, context->db, &ent); ret = context->db->delete(context->context, context->db, &ent);
context->db->close(context->context, context->db); context->db->close(context->context, context->db);
if(ret == HDB_ERR_NOENTRY) return _kadm5_error_code(ret);
return KADM5_UNK_PRINC;
return ret;
} }

View File

@@ -57,7 +57,7 @@ kadm5_s_get_principal(void *server_handle,
ret = context->db->fetch(context->context, context->db, &ent); ret = context->db->fetch(context->context, context->db, &ent);
context->db->close(context->context, context->db); context->db->close(context->context, context->db);
if(ret == HDB_ERR_NOENTRY) if(ret == HDB_ERR_NOENTRY)
return KADM5_UNK_PRINC; return _kadm5_error_code(ret);
memset(out, 0, sizeof(*out)); memset(out, 0, sizeof(*out));
@@ -170,5 +170,5 @@ kadm5_s_get_principal(void *server_handle,
out: out:
hdb_free_entry(context->context, &ent); hdb_free_entry(context->context, &ent);
return ret; return _kadm5_error_code(ret);
} }

View File

@@ -74,8 +74,6 @@ out2:
hdb_free_entry(context->context, &ent); hdb_free_entry(context->context, &ent);
out: out:
context->db->close(context->context, context->db); context->db->close(context->context, context->db);
if(ret == HDB_ERR_NOENTRY) return _kadm5_error_code(ret);
return KADM5_UNK_PRINC;
return ret;
} }

View File

@@ -101,8 +101,6 @@ out:
free(*new_keys); free(*new_keys);
*n_keys = 0; *n_keys = 0;
} }
if(ret == HDB_ERR_NOENTRY) return _kadm5_error_code(ret);
return KADM5_UNK_PRINC;
return ret;
} }

View File

@@ -96,10 +96,6 @@ out2:
context->db->close(context->context, context->db); context->db->close(context->context, context->db);
hdb_free_entry(context->context, &ent); hdb_free_entry(context->context, &ent);
out: out:
if(ret == HDB_ERR_NOENTRY) return _kadm5_error_code(ret);
return KADM5_UNK_PRINC;
if(ret == HDB_ERR_INUSE)
return KADM5_DUP;
return ret;
} }