diff options
| author | Gordon Ross <gwr@nexenta.com> | 2019-05-22 18:11:33 -0400 |
|---|---|---|
| committer | Gordon Ross <gwr@nexenta.com> | 2019-05-29 18:15:45 -0400 |
| commit | b3b3563308068a7fafd98cf3021c73aedc1caa6c (patch) | |
| tree | e99a5a41c0505562a0a79ef1a9eea9e4b3c49eff /usr/src | |
| parent | 810e978011ea80127b0a15368276459b566a3241 (diff) | |
| download | illumos-joyent-b3b3563308068a7fafd98cf3021c73aedc1caa6c.tar.gz | |
11060 sys/zone.h exposes more than it should
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Michal Nowak <mnowak@startmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/lp/include/printers.h | 10 | ||||
| -rw-r--r-- | usr/src/cmd/smbsrv/smbstat/smbstat.c | 1 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/tsol/tndb.h | 4 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/zone.h | 26 |
4 files changed, 19 insertions, 22 deletions
diff --git a/usr/src/cmd/lp/include/printers.h b/usr/src/cmd/lp/include/printers.h index ff66ead90c..915f9a6eb3 100644 --- a/usr/src/cmd/lp/include/printers.h +++ b/usr/src/cmd/lp/include/printers.h @@ -32,16 +32,6 @@ #define _LP_PRINTERS_H /* - * The following conflicts are also defined in sys/processor.h. - */ -#if defined PS_FAULTED -#undef PS_FAULTED -#endif -#if defined PS_DISABLED -#undef PS_DISABLED -#endif - -/* * Define the following to support administrator configurable * streams modules: */ diff --git a/usr/src/cmd/smbsrv/smbstat/smbstat.c b/usr/src/cmd/smbsrv/smbstat/smbstat.c index 9982ddfad0..b881165706 100644 --- a/usr/src/cmd/smbsrv/smbstat/smbstat.c +++ b/usr/src/cmd/smbsrv/smbstat/smbstat.c @@ -102,6 +102,7 @@ #include <math.h> #include <umem.h> #include <locale.h> +#include <sys/processor.h> #include <smbsrv/smb_kstat.h> #if !defined(TEXT_DOMAIN) diff --git a/usr/src/uts/common/sys/tsol/tndb.h b/usr/src/uts/common/sys/tsol/tndb.h index c7b68b66d8..f74cd5090d 100644 --- a/usr/src/uts/common/sys/tsol/tndb.h +++ b/usr/src/uts/common/sys/tsol/tndb.h @@ -248,6 +248,7 @@ typedef struct tsol_zcent { } tsol_zcent_t; #define TSOL_MLP_END(mlp) ((mlp)->mlp_ipp == 0 && (mlp)->mlp_port == 0) +#if (defined(_KERNEL) || defined(_KMEMUSER)) typedef struct tsol_tpc { kmutex_t tpc_lock; /* lock for structure */ uint_t tpc_refcnt; /* reference count */ @@ -265,6 +266,7 @@ typedef struct tsol_tnrhc { char rhc_isbcast; /* broadcast address */ char rhc_local; /* loopback or local interace */ } tsol_tnrhc_t; +#endif /* _KERNEL || _KMEMUSER */ /* Size of remote host hash tables in kernel */ #define TNRHC_SIZE 256 @@ -361,11 +363,13 @@ typedef struct tsol_address { in_addr_t ip_address; } tsol_address_t; +#if (defined(_KERNEL) || defined(_KMEMUSER)) /* This is shared between tcache and mdb */ typedef struct tnrhc_hash_s { tsol_tnrhc_t *tnrh_list; kmutex_t tnrh_lock; } tnrhc_hash_t; +#endif /* _KERNEL || _KMEMUSER */ #ifdef _KERNEL typedef enum { diff --git a/usr/src/uts/common/sys/zone.h b/usr/src/uts/common/sys/zone.h index 56fa4b8d87..9eeb9a0db8 100644 --- a/usr/src/uts/common/sys/zone.h +++ b/usr/src/uts/common/sys/zone.h @@ -21,7 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2018 Joyent, Inc. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2019 Nexenta Systems, Inc. All rights reserved. * Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>. */ @@ -29,20 +29,29 @@ #define _SYS_ZONE_H #include <sys/types.h> -#include <sys/mutex.h> #include <sys/param.h> +#include <sys/tsol/label.h> +#include <sys/uadmin.h> +#include <netinet/in.h> + +#ifdef _KERNEL +/* + * Many includes are kernel-only to reduce namespace pollution of + * userland applications. + */ +#include <sys/mutex.h> #include <sys/rctl.h> #include <sys/ipc_rctl.h> #include <sys/pset.h> -#include <sys/tsol/label.h> #include <sys/cred.h> #include <sys/netstack.h> -#include <sys/uadmin.h> #include <sys/ksynch.h> #include <sys/socket_impl.h> #include <sys/secflags.h> -#include <netinet/in.h> #include <sys/cpu_uarray.h> +#include <sys/list.h> +#include <sys/loadavg.h> +#endif /* _KERNEL */ #ifdef __cplusplus extern "C" { @@ -322,13 +331,6 @@ typedef struct zone_net_data { #ifdef _KERNEL -/* - * We need to protect the definition of 'list_t' from userland applications and - * libraries which may be defining ther own versions. - */ -#include <sys/list.h> -#include <sys/loadavg.h> - #define GLOBAL_ZONEUNIQID 0 /* uniqid of the global zone */ /* |
