Return values.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3780 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user