kadm5_s_get_principals() is a read only operation, so open the HDB in r/o mode.

This commit is contained in:
Roland C. Dowdeswell
2012-05-18 17:13:30 +01:00
parent fde1d8cb72
commit 21b7863935

View File

@@ -87,7 +87,7 @@ kadm5_s_get_principals(void *server_handle,
kadm5_ret_t ret; kadm5_ret_t ret;
if (!context->keep_open) { if (!context->keep_open) {
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); ret = context->db->hdb_open(context->context, context->db, O_RDONLY, 0);
if(ret) { if(ret) {
krb5_warn(context->context, ret, "opening database"); krb5_warn(context->context, ret, "opening database");
return ret; return ret;