libzonecfg.h (0dc2366f7b9f9f36e10909b1e95edbf2a261c2ac) | libzonecfg.h (cb8a054b1ab30d5caa746e6c44f29d4c9d3071c1) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* |
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. | 23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
25 */ 26 27#ifndef _LIBZONECFG_H 28#define _LIBZONECFG_H 29 30/* 31 * Zone configuration header file. 32 */ --- 12 unchanged lines hidden (view full) --- 45#include <net/if.h> 46#include <stdio.h> 47#include <rctl.h> 48#include <zone.h> 49#include <libbrand.h> 50#include <sys/uuid.h> 51#include <libuutil.h> 52#include <sys/mnttab.h> | 24 */ 25 26#ifndef _LIBZONECFG_H 27#define _LIBZONECFG_H 28 29/* 30 * Zone configuration header file. 31 */ --- 12 unchanged lines hidden (view full) --- 44#include <net/if.h> 45#include <stdio.h> 46#include <rctl.h> 47#include <zone.h> 48#include <libbrand.h> 49#include <sys/uuid.h> 50#include <libuutil.h> 51#include <sys/mnttab.h> |
52#include <limits.h> 53#include <utmpx.h> |
|
53 54#define ZONE_ID_UNDEFINED -1 55 56#define Z_OK 0 57#define Z_EMPTY_DOCUMENT 1 /* XML doc root element is null */ 58#define Z_WRONG_DOC_TYPE 2 /* top-level XML doc element != zone */ 59#define Z_BAD_PROPERTY 3 /* libxml-level property problem */ 60#define Z_TEMP_FILE 4 /* problem creating temporary file */ --- 56 unchanged lines hidden (view full) --- 117 118#define ZONE_STATE_MAXSTRLEN 14 119 120#define LIBZONECFG_PATH "libzonecfg.so.1" 121 122#define ZONE_CONFIG_ROOT "/etc/zones" 123#define ZONE_INDEX_FILE ZONE_CONFIG_ROOT "/index" 124 | 54 55#define ZONE_ID_UNDEFINED -1 56 57#define Z_OK 0 58#define Z_EMPTY_DOCUMENT 1 /* XML doc root element is null */ 59#define Z_WRONG_DOC_TYPE 2 /* top-level XML doc element != zone */ 60#define Z_BAD_PROPERTY 3 /* libxml-level property problem */ 61#define Z_TEMP_FILE 4 /* problem creating temporary file */ --- 56 unchanged lines hidden (view full) --- 118 119#define ZONE_STATE_MAXSTRLEN 14 120 121#define LIBZONECFG_PATH "libzonecfg.so.1" 122 123#define ZONE_CONFIG_ROOT "/etc/zones" 124#define ZONE_INDEX_FILE ZONE_CONFIG_ROOT "/index" 125 |
126#define MAXUSERNAME (sizeof (((struct utmpx *)0)->ut_name)) 127#define MAXAUTHS 4096 128#define ZONE_MGMT_PROF "Zone Management" 129 |
|
125/* Owner, group, and mode (defined by packaging) for the config directory */ 126#define ZONE_CONFIG_UID 0 /* root */ 127#define ZONE_CONFIG_GID 3 /* sys */ 128#define ZONE_CONFIG_MODE 0755 129 130/* Owner, group, and mode (defined by packaging) for the index file */ 131#define ZONE_INDEX_UID 0 /* root */ 132#define ZONE_INDEX_GID 3 /* sys */ --- 106 unchanged lines hidden (view full) --- 239struct zone_devpermtab { 240 char zone_devperm_name[MAXPATHLEN]; 241 uid_t zone_devperm_uid; 242 gid_t zone_devperm_gid; 243 mode_t zone_devperm_mode; 244 char *zone_devperm_acl; 245}; 246 | 130/* Owner, group, and mode (defined by packaging) for the config directory */ 131#define ZONE_CONFIG_UID 0 /* root */ 132#define ZONE_CONFIG_GID 3 /* sys */ 133#define ZONE_CONFIG_MODE 0755 134 135/* Owner, group, and mode (defined by packaging) for the index file */ 136#define ZONE_INDEX_UID 0 /* root */ 137#define ZONE_INDEX_GID 3 /* sys */ --- 106 unchanged lines hidden (view full) --- 244struct zone_devpermtab { 245 char zone_devperm_name[MAXPATHLEN]; 246 uid_t zone_devperm_uid; 247 gid_t zone_devperm_gid; 248 mode_t zone_devperm_mode; 249 char *zone_devperm_acl; 250}; 251 |
252struct zone_admintab { 253 char zone_admin_user[MAXUSERNAME]; 254 char zone_admin_auths[MAXAUTHS]; 255}; 256 257typedef struct zone_userauths { 258 char user[MAXUSERNAME]; 259 char zonename[ZONENAME_MAX]; 260 struct zone_userauths *next; 261} zone_userauths_t; 262 |
|
247typedef struct { 248 uu_avl_node_t zpe_entry; 249 char *zpe_name; 250 char *zpe_vers; 251 uu_avl_t *zpe_patches_avl; 252} zone_pkg_entry_t; 253 254typedef enum zone_iptype { --- 224 unchanged lines hidden (view full) --- 479extern int zonecfg_getpsetent(zone_dochandle_t, struct zone_psettab *); 480extern int zonecfg_getmcapent(zone_dochandle_t, struct zone_mcaptab *); 481extern int zonecfg_getpkgdata(zone_dochandle_t, uu_avl_pool_t *, 482 uu_avl_t *); 483extern int zonecfg_setdevperment(zone_dochandle_t); 484extern int zonecfg_getdevperment(zone_dochandle_t, 485 struct zone_devpermtab *); 486extern int zonecfg_enddevperment(zone_dochandle_t); | 263typedef struct { 264 uu_avl_node_t zpe_entry; 265 char *zpe_name; 266 char *zpe_vers; 267 uu_avl_t *zpe_patches_avl; 268} zone_pkg_entry_t; 269 270typedef enum zone_iptype { --- 224 unchanged lines hidden (view full) --- 495extern int zonecfg_getpsetent(zone_dochandle_t, struct zone_psettab *); 496extern int zonecfg_getmcapent(zone_dochandle_t, struct zone_mcaptab *); 497extern int zonecfg_getpkgdata(zone_dochandle_t, uu_avl_pool_t *, 498 uu_avl_t *); 499extern int zonecfg_setdevperment(zone_dochandle_t); 500extern int zonecfg_getdevperment(zone_dochandle_t, 501 struct zone_devpermtab *); 502extern int zonecfg_enddevperment(zone_dochandle_t); |
503extern int zonecfg_setadminent(zone_dochandle_t); 504extern int zonecfg_getadminent(zone_dochandle_t, struct zone_admintab *); 505extern int zonecfg_endadminent(zone_dochandle_t); |
|
487 488/* 489 * Privilege-related functions. 490 */ 491extern int zonecfg_default_privset(priv_set_t *, const char *); 492extern int zonecfg_get_privset(zone_dochandle_t, priv_set_t *, 493 char **); 494extern int zonecfg_get_limitpriv(zone_dochandle_t, char **); --- 65 unchanged lines hidden (view full) --- 560 */ 561extern void zonecfg_init_lock_file(const char *, char **); 562extern void zonecfg_release_lock_file(const char *, int); 563extern int zonecfg_grab_lock_file(const char *, int *); 564extern boolean_t zonecfg_lock_file_held(int *); 565extern int zonecfg_ping_zoneadmd(const char *); 566extern int zonecfg_call_zoneadmd(const char *, zone_cmd_arg_t *, char *, 567 boolean_t); | 506 507/* 508 * Privilege-related functions. 509 */ 510extern int zonecfg_default_privset(priv_set_t *, const char *); 511extern int zonecfg_get_privset(zone_dochandle_t, priv_set_t *, 512 char **); 513extern int zonecfg_get_limitpriv(zone_dochandle_t, char **); --- 65 unchanged lines hidden (view full) --- 579 */ 580extern void zonecfg_init_lock_file(const char *, char **); 581extern void zonecfg_release_lock_file(const char *, int); 582extern int zonecfg_grab_lock_file(const char *, int *); 583extern boolean_t zonecfg_lock_file_held(int *); 584extern int zonecfg_ping_zoneadmd(const char *); 585extern int zonecfg_call_zoneadmd(const char *, zone_cmd_arg_t *, char *, 586 boolean_t); |
587extern int zonecfg_insert_userauths(zone_dochandle_t, char *, char *); 588extern int zonecfg_remove_userauths(zone_dochandle_t, char *, char *, 589 boolean_t); 590extern int zonecfg_add_admin(zone_dochandle_t, struct zone_admintab *, 591 char *); 592extern int zonecfg_delete_admin(zone_dochandle_t, 593 struct zone_admintab *, char *); 594extern int zonecfg_modify_admin(zone_dochandle_t, struct zone_admintab *, 595 struct zone_admintab *, char *); 596extern int zonecfg_delete_admins(zone_dochandle_t, char *); 597extern int zonecfg_lookup_admin(zone_dochandle_t, struct zone_admintab *); 598extern int zonecfg_authorize_users(zone_dochandle_t, char *); 599extern int zonecfg_update_userauths(zone_dochandle_t, char *); 600extern int zonecfg_deauthorize_user(zone_dochandle_t, char *, char *); 601extern int zonecfg_deauthorize_users(zone_dochandle_t, char *); 602extern boolean_t zonecfg_valid_auths(const char *, const char *); |
|
568 569#ifdef __cplusplus 570} 571#endif 572 573#endif /* _LIBZONECFG_H */ | 603 604#ifdef __cplusplus 605} 606#endif 607 608#endif /* _LIBZONECFG_H */ |