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 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 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 2006 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _CFEXT_H 28 #define _CFEXT_H 29 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 #include <pkgstrct.h> 36 37 struct mergstat { 38 unsigned setuid:1; /* pkgmap entry has setuid */ 39 unsigned setgid:1; /* ... and/or setgid bit set */ 40 unsigned contchg:1; /* contents of the files different */ 41 unsigned attrchg:1; /* attributes are different */ 42 unsigned shared:1; /* > 1 pkg associated with this */ 43 unsigned osetuid:1; /* installed set[ug]id process ... */ 44 unsigned osetgid:1; /* ... being overwritten by pkg. */ 45 unsigned rogue:1; /* conflicting file not owned by a package */ 46 unsigned dir2nondir:1; /* was a directory & now a non-directory */ 47 unsigned replace:1; /* merge makes no sense for this object pair */ 48 unsigned denied:1; /* for some reason this was not allowed in */ 49 unsigned preloaded:1; /* already checked in a prior pkg op */ 50 unsigned processed:1; /* already installed or removed */ 51 unsigned parentsyml2dir:1; 52 /* parent directory changed from symlink to a directory */ 53 }; 54 55 /* 56 * This is information required by pkgadd for fast operation. A 57 * cfextra struct is tagged to each cfent structure requiring 58 * processing. This is how we avoid some unneeded repetition. The 59 * entries incorporating the word 'local' refer to the path that 60 * gets us to the delivered package file. In other words, to install 61 * a file we usually copy from 'local' to 'path' below. In the case 62 * of a link, where no actual copying takes place, local is the source 63 * of the link. Note that environment variables are not evaluated in 64 * the locals unless they are links since the literal path is how 65 * pkgadd finds the entry under the reloc directory. 66 */ 67 struct cfextra { 68 struct cfent cf_ent; /* basic contents file entry */ 69 struct mergstat mstat; /* merge status for installs */ 70 short fsys_value; /* fstab[] entry index */ 71 short fsys_base; /* actual base filesystem in fs_tab[] */ 72 char *client_path; /* the client-relative path */ 73 char *server_path; /* the server-relative path */ 74 char *map_path; /* as read from the pkgmap */ 75 char *client_local; /* client_relative local */ 76 char *server_local; /* server relative local */ 77 }; 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif /* _CFEXT_H */ 84