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