Blame src/lib/kadm5/clnt/clnt_privs.c
|
Packit |
fd8b60 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
Packit |
fd8b60 |
/*
|
|
Packit |
fd8b60 |
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
* $Id$
|
|
Packit |
fd8b60 |
* $Source$
|
|
Packit |
fd8b60 |
*
|
|
Packit |
fd8b60 |
*/
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
#include <gssrpc/rpc.h>
|
|
Packit |
fd8b60 |
#include <kadm5/admin.h>
|
|
Packit |
fd8b60 |
#include <kadm5/kadm_rpc.h>
|
|
Packit |
fd8b60 |
#include "client_internal.h"
|
|
Packit |
fd8b60 |
#include <string.h>
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
kadm5_ret_t kadm5_get_privs(void *server_handle, long *privs)
|
|
Packit |
fd8b60 |
{
|
|
Packit |
fd8b60 |
getprivs_ret r;
|
|
Packit |
fd8b60 |
kadm5_server_handle_t handle = server_handle;
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
memset(&r, 0, sizeof(getprivs_ret));
|
|
Packit |
fd8b60 |
if (get_privs_2(&handle->api_version, &r, handle->clnt))
|
|
Packit |
fd8b60 |
return KADM5_RPC_ERROR;
|
|
Packit |
fd8b60 |
else if (r.code == KADM5_OK)
|
|
Packit |
fd8b60 |
*privs = r.privs;
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
return r.code;
|
|
Packit |
fd8b60 |
}
|