diff options
author | dp <none@none> | 2006-03-24 18:42:51 -0800 |
---|---|---|
committer | dp <none@none> | 2006-03-24 18:42:51 -0800 |
commit | ad4023c40b055806dce2bde9ee9e87e5016b5135 (patch) | |
tree | 896ea7c87446dd355a7bbb90691519097b6bde74 /usr/src/lib | |
parent | 45916cd2fec6e79bca5dee0421bd39e3c2910d1e (diff) | |
download | illumos-joyent-ad4023c40b055806dce2bde9ee9e87e5016b5135.tar.gz |
4970596 RFE: should be able to run some DTrace programs in a zone
6231905 PRIV_DTRACE_PROC and PRIV_DTRACE_USER don't respect PRIV_PROC_ZONE
6388070 non-root non-global zone users can't get dtrace provider modules to load
6393431 dtrace_proc + proc_owner doesn't sufficiently enable destructive actions
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/libdtrace/common/dt_error.c | 10 | ||||
-rw-r--r-- | usr/src/lib/libdtrace/common/dt_impl.h | 10 | ||||
-rw-r--r-- | usr/src/lib/libdtrace/common/dt_open.c | 6 | ||||
-rw-r--r-- | usr/src/lib/libzonecfg/common/libzonecfg.c | 3 |
4 files changed, 11 insertions, 18 deletions
diff --git a/usr/src/lib/libdtrace/common/dt_error.c b/usr/src/lib/libdtrace/common/dt_error.c index 18ebd4887a..e8874c853f 100644 --- a/usr/src/lib/libdtrace/common/dt_error.c +++ b/usr/src/lib/libdtrace/common/dt_error.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -97,8 +96,7 @@ static const struct { { EDT_BADTRUNC, "Invalid truncation" }, { EDT_BUSY, "DTrace cannot be used when kernel debugger is active" }, { EDT_ACCESS, "DTrace requires additional privileges" }, - { EDT_GNOENT, "DTrace device not available on system" }, - { EDT_ZNOENT, "DTrace device not available in local zone" }, + { EDT_NOENT, "DTrace device not available on system" }, { EDT_BRICKED, "Abort due to systemic unresponsiveness" }, { EDT_HARDWIRE, "Failed to load language definitions" }, { EDT_ELFVERSION, "libelf is out-of-date with respect to libdtrace" }, diff --git a/usr/src/lib/libdtrace/common/dt_impl.h b/usr/src/lib/libdtrace/common/dt_impl.h index 9771276dde..acf30cd911 100644 --- a/usr/src/lib/libdtrace/common/dt_impl.h +++ b/usr/src/lib/libdtrace/common/dt_impl.h @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -476,8 +475,7 @@ enum { EDT_BADTRUNC, /* invalid truncation */ EDT_BUSY, /* device busy (active kernel debugger) */ EDT_ACCESS, /* insufficient privileges to use DTrace */ - EDT_GNOENT, /* dtrace device not available in global zone */ - EDT_ZNOENT, /* dtrace device not available in local zone */ + EDT_NOENT, /* dtrace device not available */ EDT_BRICKED, /* abort due to systemic unresponsiveness */ EDT_HARDWIRE, /* failed to load hard-wired definitions */ EDT_ELFVERSION, /* libelf is out-of-date w.r.t libdtrace */ diff --git a/usr/src/lib/libdtrace/common/dt_open.c b/usr/src/lib/libdtrace/common/dt_open.c index 0579ca160d..b857661728 100644 --- a/usr/src/lib/libdtrace/common/dt_open.c +++ b/usr/src/lib/libdtrace/common/dt_open.c @@ -39,7 +39,6 @@ #include <stdio.h> #include <fcntl.h> #include <errno.h> -#include <zone.h> #include <assert.h> #define _POSIX_PTHREAD_SEMANTICS @@ -820,10 +819,7 @@ dt_vopen(int version, int flags, int *errp, dt_provmod_destroy(&provmod); switch (err) { case ENOENT: - if (getzoneid() != GLOBAL_ZONEID) - err = EDT_ZNOENT; - else - err = EDT_GNOENT; + err = EDT_NOENT; break; case EBUSY: err = EDT_BUSY; diff --git a/usr/src/lib/libzonecfg/common/libzonecfg.c b/usr/src/lib/libzonecfg/common/libzonecfg.c index cede45643a..db3512727c 100644 --- a/usr/src/lib/libzonecfg/common/libzonecfg.c +++ b/usr/src/lib/libzonecfg/common/libzonecfg.c @@ -2283,7 +2283,8 @@ static const char *standard_devs[] = { "openprom", #endif "cpu/self/cpuid", - "dtrace/helper", + "dtrace/*", + "dtrace/provider/*", "zfs", NULL }; |