Added kadm5_lock() and unlock.
This commit is contained in:

committed by
Nicolas Williams

parent
109607a355
commit
58d72035f1
@@ -1333,6 +1333,18 @@ kadm5_ad_chpass_principal_with_key(void *server_handle,
|
||||
return KADM5_RPC_ERROR;
|
||||
}
|
||||
|
||||
static kadm5_ret_t
|
||||
kadm5_ad_lock(void *server_handle)
|
||||
{
|
||||
return ENOTSUP;
|
||||
}
|
||||
|
||||
static kadm5_ret_t
|
||||
kadm5_ad_unlock(void *server_handle)
|
||||
{
|
||||
return ENOTSUP;
|
||||
}
|
||||
|
||||
static void
|
||||
set_funcs(kadm5_ad_context *c)
|
||||
{
|
||||
@@ -1349,6 +1361,8 @@ set_funcs(kadm5_ad_context *c)
|
||||
SET(c, modify_principal);
|
||||
SET(c, randkey_principal);
|
||||
SET(c, rename_principal);
|
||||
SET(c, lock);
|
||||
SET(c, unlock);
|
||||
}
|
||||
|
||||
kadm5_ret_t
|
||||
|
@@ -325,3 +325,16 @@ out:
|
||||
kadm5_free_principal_ent(server_handle, &princ_ent);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
kadm5_ret_t
|
||||
kadm5_lock(void *server_handle)
|
||||
{
|
||||
return __CALL(lock, (server_handle));
|
||||
}
|
||||
|
||||
kadm5_ret_t
|
||||
kadm5_unlock(void *server_handle)
|
||||
{
|
||||
return __CALL(unlock, (server_handle));
|
||||
}
|
||||
|
@@ -35,6 +35,22 @@
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static kadm5_ret_t
|
||||
kadm5_s_lock(void *server_handle)
|
||||
{
|
||||
kadm5_server_context *context = server_handle;
|
||||
|
||||
return context->db->hdb_lock(context->context, context->db, HDB_WLOCK);
|
||||
}
|
||||
|
||||
static kadm5_ret_t
|
||||
kadm5_s_unlock(void *server_handle)
|
||||
{
|
||||
kadm5_server_context *context = server_handle;
|
||||
|
||||
return context->db->hdb_unlock(context->context, context->db);
|
||||
}
|
||||
|
||||
static void
|
||||
set_funcs(kadm5_server_context *c)
|
||||
{
|
||||
@@ -51,6 +67,8 @@ set_funcs(kadm5_server_context *c)
|
||||
SET(c, modify_principal);
|
||||
SET(c, randkey_principal);
|
||||
SET(c, rename_principal);
|
||||
SET(c, lock);
|
||||
SET(c, unlock);
|
||||
}
|
||||
|
||||
#ifndef NO_UNIX_SOCKETS
|
||||
|
@@ -45,6 +45,18 @@
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static kadm5_ret_t
|
||||
kadm5_c_lock(void *server_handle)
|
||||
{
|
||||
return ENOTSUP;
|
||||
}
|
||||
|
||||
static kadm5_ret_t
|
||||
kadm5_c_unlock(void *server_handle)
|
||||
{
|
||||
return ENOTSUP;
|
||||
}
|
||||
|
||||
static void
|
||||
set_funcs(kadm5_client_context *c)
|
||||
{
|
||||
@@ -61,6 +73,8 @@ set_funcs(kadm5_client_context *c)
|
||||
SET(c, modify_principal);
|
||||
SET(c, randkey_principal);
|
||||
SET(c, rename_principal);
|
||||
SET(c, lock);
|
||||
SET(c, unlock);
|
||||
}
|
||||
|
||||
kadm5_ret_t
|
||||
|
@@ -54,6 +54,8 @@ struct kadm_func {
|
||||
kadm5_ret_t (*rename_principal) (void*, krb5_principal, krb5_principal);
|
||||
kadm5_ret_t (*chpass_principal_with_key) (void *, krb5_principal,
|
||||
int, krb5_key_data *);
|
||||
kadm5_ret_t (*lock) (void *);
|
||||
kadm5_ret_t (*unlock) (void *);
|
||||
};
|
||||
|
||||
/* XXX should be integrated */
|
||||
|
Reference in New Issue
Block a user