9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * CDDL HEADER START
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * The contents of this file are subject to the terms of the
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * Common Development and Distribution License (the "License").
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * You may not use this file except in compliance with the License.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * See the License for the specific language governing permissions
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * and limitations under the License.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * When distributing Covered Code, include this CDDL HEADER in each
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * If applicable, add the following below this CDDL HEADER, with the
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * fields enclosed by brackets "[]" replaced with your own identifying
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * information: Portions Copyright [yyyy] [name of copyright owner]
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * CDDL HEADER END
80e2ca8596e3435bc3b76f3c597833ea0a87f85e * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnint sn1_brandsys(int, int64_t *, uintptr_t, uintptr_t, uintptr_t,
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnint sn1_elfexec(vnode_t *, execa_t *, uarg_t *, intpdata_t *, int,
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn/* sn1 brand */
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#else /* sparc */
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#else /* ! __amd64 */
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#endif /* __amd64 */
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn#endif /* _sparc */
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn/* ARGSUSED */
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnsn1_getattr(zone_t *zone, int attr, void *buf, size_t *bufsize)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn/* ARGSUSED */
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnsn1_setattr(zone_t *zone, int attr, void *buf, size_t bufsize)
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn/*ARGSUSED*/
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnsn1_brandsys(int cmd, int64_t *rval, uintptr_t arg1, uintptr_t arg2,
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6)
80e2ca8596e3435bc3b76f3c597833ea0a87f85e res = brand_solaris_cmd(cmd, arg1, arg2, arg3, &sn1_brand, SN1_VERSION);
80e2ca8596e3435bc3b76f3c597833ea0a87f85e if (res >= 0)
80e2ca8596e3435bc3b76f3c597833ea0a87f85e return (res);
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn/*ARGSUSED*/
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn/*ARGSUSED*/
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnnsn1_elfexec(vnode_t *vp, execa_t *uap, uarg_t *args, intpdata_t *idatap,
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn int level, long *execsz, int setid, caddr_t exec_file, cred_t *cred,
80e2ca8596e3435bc3b76f3c597833ea0a87f85e return (brand_solaris_elfexec(vp, uap, args, idatap, level, execsz,
80e2ca8596e3435bc3b76f3c597833ea0a87f85e setid, exec_file, cred, brand_action, &sn1_brand, SN1_BRANDNAME,
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * Set up the table indicating which system calls we want to
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * interpose on. We should probably build this automatically from
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * a list of system calls that is shared with the user-space
9acbbeaf2a1ffe5c14b244867d427714fab43c5cnn * library.
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_read] = 1; /* 3 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_write] = 1; /* 4 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_time] = 1; /* 13 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_getpid] = 1; /* 20 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_mount] = 1; /* 21 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_getuid] = 1; /* 24 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_times] = 1; /* 43 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_getgid] = 1; /* 47 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_utssys] = 1; /* 57 */
8fd04b8338ed5093ec2d1e668fa620b7de44c177Roger A. Faulkner sn1_emulation_table[SYS_waitid] = 1; /* 107 */
628e3cbed6489fa1db545d8524a06cd6535af456Edward Pilatowicz sn1_emulation_table[SYS_uname] = 1; /* 135 */