4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
29 #pragma weak _setppriv = setppriv
30 #pragma weak _getppriv = getppriv
31 #pragma weak _setpflags = setpflags
32 #pragma weak _getpflags = getpflags
35 #include <sys/types.h>
36 #include <sys/syscall.h>
37 #include "priv_private.h"
41 setppriv(priv_op_t op
, priv_ptype_t type
, const priv_set_t
*pset
)
48 set
= priv_getsetbyname(type
);
50 return (syscall(SYS_privsys
, PRIVSYS_SETPPRIV
, op
, set
, (void *)pset
,
55 getppriv(priv_ptype_t type
, priv_set_t
*pset
)
62 set
= priv_getsetbyname(type
);
64 return (syscall(SYS_privsys
, PRIVSYS_GETPPRIV
, 0, set
, (void *)pset
,
69 getprivinfo(priv_impl_info_t
*buf
, size_t bufsize
)
71 return (syscall(SYS_privsys
, PRIVSYS_GETIMPLINFO
, 0, 0, (void *)buf
,
76 setpflags(uint_t flag
, uint_t val
)
78 return (syscall(SYS_privsys
, PRIVSYS_SETPFLAGS
, (priv_op_t
)flag
,
79 (priv_ptype_t
)(uintptr_t)val
, 0, 0));
83 getpflags(uint_t flag
)
85 return (syscall(SYS_privsys
, PRIVSYS_GETPFLAGS
, flag
, 0, 0, 0));