summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall/uucopy.c
diff options
context:
space:
mode:
authornn35248 <none@none>2006-09-11 22:51:59 -0700
committernn35248 <none@none>2006-09-11 22:51:59 -0700
commit9acbbeaf2a1ffe5c14b244867d427714fab43c5c (patch)
treed1ecd54896325c19a463220e9cbc50864874fc82 /usr/src/uts/common/syscall/uucopy.c
parentda51466dc253d7c98dda4956059042bd0c476328 (diff)
downloadillumos-joyent-9acbbeaf2a1ffe5c14b244867d427714fab43c5c.tar.gz
PSARC/2005/471 BrandZ: Support for non-native zones
6374606 ::nm -D without an object may not work on processes in zones 6409350 BrandZ project integration into Solaris 6455289 pthread_setschedparam() should return EPERM rather than panic libc 6455591 setpriority(3C) gets errno wrong for deficient privileges failure 6458178 fifofs doesn't support lofs mounts of fifos 6460380 Attempted open() of a symlink with the O_NOFOLLOW flag set returns EINVAL, not ELOOP 6463857 renice(1) errors erroneously --HG-- rename : usr/src/lib/libzonecfg/zones/SUNWblank.xml => usr/src/lib/brand/native/zone/SUNWblank.xml rename : usr/src/lib/libzonecfg/zones/SUNWdefault.xml => usr/src/lib/brand/native/zone/SUNWdefault.xml
Diffstat (limited to 'usr/src/uts/common/syscall/uucopy.c')
-rw-r--r--usr/src/uts/common/syscall/uucopy.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/usr/src/uts/common/syscall/uucopy.c b/usr/src/uts/common/syscall/uucopy.c
new file mode 100644
index 0000000000..c301599e2f
--- /dev/null
+++ b/usr/src/uts/common/syscall/uucopy.c
@@ -0,0 +1,59 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include <sys/systm.h>
+
+int
+uucopy(const void *from, void *to, size_t size)
+{
+ label_t ljb;
+
+ if (on_fault(&ljb))
+ return (set_errno(EFAULT));
+
+ ucopy(from, to, size);
+
+ no_fault();
+
+ return (0);
+}
+
+ssize_t
+uucopystr(const char *from, char *to, size_t size)
+{
+ label_t ljb;
+ size_t len;
+
+ if (on_fault(&ljb))
+ return (set_errno(EFAULT));
+
+ ucopystr(from, to, size, &len);
+
+ no_fault();
+
+ return ((ssize_t)len);
+}