diff options
Diffstat (limited to 'usr/src/head')
-rw-r--r-- | usr/src/head/libzonecfg.h | 14 | ||||
-rw-r--r-- | usr/src/head/link.h | 12 | ||||
-rw-r--r-- | usr/src/head/proc_service.h | 8 | ||||
-rw-r--r-- | usr/src/head/regexp.h | 18 | ||||
-rw-r--r-- | usr/src/head/rtld_db.h | 39 | ||||
-rw-r--r-- | usr/src/head/string.h | 11 |
6 files changed, 79 insertions, 23 deletions
diff --git a/usr/src/head/libzonecfg.h b/usr/src/head/libzonecfg.h index 51b8dc7005..3af98c1a6b 100644 --- a/usr/src/head/libzonecfg.h +++ b/usr/src/head/libzonecfg.h @@ -48,6 +48,7 @@ extern "C" { #include <stdio.h> #include <rctl.h> #include <zone.h> +#include <libbrand.h> #include <sys/uuid.h> #define ZONE_ID_UNDEFINED -1 @@ -88,6 +89,7 @@ extern "C" { #define Z_PRIV_PROHIBITED 37 /* specified privilege is prohibited */ #define Z_PRIV_REQUIRED 38 /* required privilege is missing */ #define Z_PRIV_UNKNOWN 39 /* specified privilege is unknown */ +#define Z_BRAND_ERROR 40 /* brand-specific error */ /* * Warning: these are shared with the admin/install consolidation. @@ -213,6 +215,7 @@ extern int zonecfg_get_handle(const char *, zone_dochandle_t); extern int zonecfg_get_snapshot_handle(const char *, zone_dochandle_t); extern int zonecfg_get_template_handle(const char *, const char *, zone_dochandle_t); +extern int zonecfg_get_xml_handle(const char *, zone_dochandle_t); extern int zonecfg_check_handle(zone_dochandle_t); extern void zonecfg_fini_handle(zone_dochandle_t); extern int zonecfg_destroy(const char *, boolean_t); @@ -242,6 +245,12 @@ extern int zonecfg_get_bootargs(zone_dochandle_t, char *, size_t); extern int zonecfg_set_bootargs(zone_dochandle_t, char *); /* + * Set/retrieve the brand for the zone + */ +extern int zonecfg_get_brand(zone_dochandle_t, char *, size_t); +extern int zonecfg_set_brand(zone_dochandle_t, char *); + +/* * Filesystem configuration. */ extern int zonecfg_add_filesystem(zone_dochandle_t, struct zone_fstab *); @@ -335,6 +344,10 @@ extern int zonecfg_devwalk(zone_dochandle_t handle, extern int zonecfg_devperms_apply(zone_dochandle_t, const char *, uid_t, gid_t, mode_t, const char *); +/* + * External zone verification support. + */ +extern int zonecfg_verify_save(zone_dochandle_t, char *); /* * '*ent' iterator routines. @@ -383,6 +396,7 @@ extern int zonecfg_set_limitpriv(zone_dochandle_t, char *); /* * Higher-level routines. */ +extern int zone_get_brand(char *, char *, size_t); extern int zone_get_rootpath(char *, char *, size_t); extern int zone_get_devroot(char *, char *, size_t); extern int zone_get_zonepath(char *, char *, size_t); diff --git a/usr/src/head/link.h b/usr/src/head/link.h index 8fd331466c..59b33e6ae2 100644 --- a/usr/src/head/link.h +++ b/usr/src/head/link.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 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -103,7 +102,10 @@ extern void ld_section64(); #define LM_ID_BASE 0x00 #define LM_ID_LDSO 0x01 -#define LM_ID_NUM 2 +#define LM_ID_BRAND 0x02 /* marks branded objs in rd_loadobj_t */ + +#define LM_ID_NUM 3 + #define LM_ID_NEWLM 0xff /* create a new link-map */ diff --git a/usr/src/head/proc_service.h b/usr/src/head/proc_service.h index 85cbd1c0f1..1f726da0f2 100644 --- a/usr/src/head/proc_service.h +++ b/usr/src/head/proc_service.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 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -132,6 +131,7 @@ extern ps_err_e ps_lgetLDT(struct ps_prochandle *, lwpid_t, struct ssd *); #endif extern ps_err_e ps_pauxv(struct ps_prochandle *, const auxv_t **); +extern ps_err_e ps_pbrandname(struct ps_prochandle *, char *, size_t); extern ps_err_e ps_kill(struct ps_prochandle *, int sig); extern ps_err_e ps_lrolltoaddr(struct ps_prochandle *, diff --git a/usr/src/head/regexp.h b/usr/src/head/regexp.h index 05f6012f59..c8a58a1981 100644 --- a/usr/src/head/regexp.h +++ b/usr/src/head/regexp.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. @@ -24,7 +23,7 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -101,6 +100,11 @@ int seof; int i, cflg; int iflag; /* used for non-ascii characters in brackets */ +#ifdef __lint + /* make lint happy */ + c = nodelim; +#endif + lastep = NULL; if ((c = GETC()) == eof || c == '\n') { if (c == '\n') { @@ -117,7 +121,7 @@ int seof; circf++; else UNGETC(c); - while (1) { + for (;;) { if (ep >= endbuf) ERROR(50); c = GETC(); @@ -308,6 +312,7 @@ int seof; *ep++ = (char)c; } } + /*NOTREACHED*/ } #ifdef __STDC__ @@ -367,7 +372,7 @@ register char *lp, *ep; register char neg; size_t ct; - while (1) { + for (;;) { neg = 0; switch (*ep++) { @@ -571,6 +576,7 @@ register char *lp, *ep; } } + /*NOTREACHED*/ } static void diff --git a/usr/src/head/rtld_db.h b/usr/src/head/rtld_db.h index 2d726730dc..52575a3bd3 100644 --- a/usr/src/head/rtld_db.h +++ b/usr/src/head/rtld_db.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. */ @@ -36,6 +35,7 @@ extern "C" { #include <sys/types.h> #include <sys/lwp.h> +#include <sys/elf.h> #include <link.h> #include <proc_service.h> @@ -129,6 +129,10 @@ typedef struct rd_loadobj { /* module which was dynamically */ /* loaded */ +/* + * Commands for rd_ctl() + */ +#define RD_CTL_SET_HELPPATH 0x01 /* Set the path used to find helpers */ typedef struct rd_agent rd_agent_t; #ifdef __STDC__ @@ -158,6 +162,28 @@ typedef struct rd_plt_info { } rd_plt_info_t; /* + * State kept for brand helper libraries + */ +typedef struct rd_helper_ops { + void *(*rho_init)(struct ps_prochandle *); + int (*rho_loadobj_iter)(struct ps_prochandle *, rl_iter_f *cb, + void *client_data, void *helper_data); + void (*rho_fix_phdrs)(struct rd_agent *, Elf32_Dyn *, size_t, + psaddr_t addr); +} rd_helper_ops_t; + +typedef struct rd_helper { + rd_helper_ops_t *rh_ops; + void *rh_data; + void *rh_dlhandle; +} rd_helper_t; + +/* + * Brand helper libraries must name their ops vector using this macro. + */ +#define RTLD_DB_BRAND_OPS rtld_db_brand_ops + +/* * Values for pi_flags */ #define RD_FLG_PI_PLTBOUND 0x0001 /* Indicates that the PLT */ @@ -177,6 +203,7 @@ extern rd_err_e rd_event_addr(rd_agent_t *, rd_event_e, rd_notify_t *); extern rd_err_e rd_event_enable(rd_agent_t *, int); extern rd_err_e rd_event_getmsg(rd_agent_t *, rd_event_msg_t *); extern rd_err_e rd_init(int); +extern rd_err_e rd_ctl(int, void *); extern rd_err_e rd_loadobj_iter(rd_agent_t *, rl_iter_f *, void *); extern void rd_log(const int); @@ -184,6 +211,8 @@ extern rd_agent_t *rd_new(struct ps_prochandle *); extern rd_err_e rd_objpad_enable(struct rd_agent *, size_t); extern rd_err_e rd_plt_resolution(rd_agent_t *, psaddr_t, lwpid_t, psaddr_t, rd_plt_info_t *); +extern void rd_fix_phdrs(struct rd_agent *, Elf32_Dyn *, + size_t, uintptr_t); extern rd_err_e rd_reset(struct rd_agent *); #else extern void rd_delete(); @@ -192,11 +221,13 @@ extern rd_err_e rd_event_addr(); extern rd_err_e rd_event_enable(); extern rd_err_e rd_event_getmsg(); extern rd_err_e rd_init(); +extern rd_err_e rd_ctl(); extern rd_err_e rd_loadobj_iter(); extern void rd_log(); extern rd_agent_t *rd_new(); extern rd_err_e rd_objpad_enable(); extern rd_err_e rd_plt_resolution(); +extern void rd_fix_phdrs(); extern rd_err_e rd_reset(); #endif diff --git a/usr/src/head/string.h b/usr/src/head/string.h index 7111355608..da057817bf 100644 --- a/usr/src/head/string.h +++ b/usr/src/head/string.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. @@ -24,7 +23,7 @@ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -88,6 +87,8 @@ extern char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, defined(__XOPEN_OR_POSIX) extern void *memccpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, int, size_t); +extern int uucopy(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t); +extern int uucopystr(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t); #endif #if defined(__EXTENSIONS__) || \ @@ -121,6 +122,8 @@ extern char *strtok_r(); #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \ defined(__XOPEN_OR_POSIX) extern void *memccpy(); +extern int uucopy(); +extern int uucopystr(); #endif #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) |