10Sstevel@tonic-gate /*
2*7934SMark.Phalan@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
30Sstevel@tonic-gate * Use is subject to license terms.
40Sstevel@tonic-gate */
50Sstevel@tonic-gate
60Sstevel@tonic-gate
70Sstevel@tonic-gate /*
80Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
90Sstevel@tonic-gate *
100Sstevel@tonic-gate * Openvision retains the copyright to derivative works of
110Sstevel@tonic-gate * this source code. Do *NOT* create a derivative of this
120Sstevel@tonic-gate * source code before consulting with your legal department.
130Sstevel@tonic-gate * Do *NOT* integrate *ANY* of this source code into another
140Sstevel@tonic-gate * product before consulting with your legal department.
150Sstevel@tonic-gate *
160Sstevel@tonic-gate * For further information, read the top-level Openvision
170Sstevel@tonic-gate * copyright which is contained in the top-level MIT Kerberos
180Sstevel@tonic-gate * copyright.
190Sstevel@tonic-gate *
200Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
210Sstevel@tonic-gate *
220Sstevel@tonic-gate */
230Sstevel@tonic-gate
240Sstevel@tonic-gate
250Sstevel@tonic-gate /*
260Sstevel@tonic-gate * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
270Sstevel@tonic-gate *
28*7934SMark.Phalan@Sun.COM * $Id: clnt_privs.c 18130 2006-06-14 21:42:02Z raeburn $
29*7934SMark.Phalan@Sun.COM * $Source$
300Sstevel@tonic-gate *
310Sstevel@tonic-gate */
320Sstevel@tonic-gate
330Sstevel@tonic-gate #if !defined(lint) && !defined(__CODECENTER__)
34*7934SMark.Phalan@Sun.COM static char *rcsid = "$Header$";
350Sstevel@tonic-gate #endif
360Sstevel@tonic-gate
370Sstevel@tonic-gate #include <rpc/rpc.h> /* SUNWresync121 XXX */
380Sstevel@tonic-gate #include <kadm5/admin.h>
390Sstevel@tonic-gate #include <kadm5/kadm_rpc.h>
400Sstevel@tonic-gate #include "client_internal.h"
410Sstevel@tonic-gate
kadm5_get_privs(void * server_handle,long * privs)420Sstevel@tonic-gate kadm5_ret_t kadm5_get_privs(void *server_handle, long *privs)
430Sstevel@tonic-gate {
440Sstevel@tonic-gate getprivs_ret *r;
450Sstevel@tonic-gate kadm5_server_handle_t handle = server_handle;
460Sstevel@tonic-gate
47*7934SMark.Phalan@Sun.COM r = get_privs_2(&handle->api_version, handle->clnt);
480Sstevel@tonic-gate if (r == NULL)
490Sstevel@tonic-gate return KADM5_RPC_ERROR;
500Sstevel@tonic-gate else if (r->code == KADM5_OK)
510Sstevel@tonic-gate *privs = r->privs;
52*7934SMark.Phalan@Sun.COM
530Sstevel@tonic-gate return r->code;
540Sstevel@tonic-gate }
55