0
|
1 |
#!/bin/sh
|
|
2 |
#
|
|
3 |
# CDDL HEADER START
|
|
4 |
#
|
|
5 |
# The contents of this file are subject to the terms of the
|
|
6 |
# Common Development and Distribution License (the "License").
|
|
7 |
# You may not use this file except in compliance with the License.
|
|
8 |
#
|
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
10 |
# or http://www.opensolaris.org/os/licensing.
|
|
11 |
# See the License for the specific language governing permissions
|
|
12 |
# and limitations under the License.
|
|
13 |
#
|
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
16 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
19 |
#
|
|
20 |
# CDDL HEADER END
|
|
21 |
#
|
|
22 |
#
|
9
|
23 |
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
|
0
|
24 |
# Use is subject to license terms.
|
|
25 |
#
|
10
|
26 |
#ident "@(#)install-sfw 1.7 10/03/10 SMI"
|
0
|
27 |
|
10
|
28 |
VERS=trousers-0.3.4
|
0
|
29 |
|
|
30 |
PREFIX=${ROOT}/usr
|
|
31 |
LIBDIR=${PREFIX}/lib
|
|
32 |
ROOTLIBDIR=${ROOT}/lib
|
|
33 |
INCDIR=${PREFIX}/include
|
|
34 |
BINDIR=${PREFIX}/bin
|
|
35 |
SBINDIR=${PREFIX}/sbin
|
|
36 |
SHAREDIR=${PREFIX}/share
|
|
37 |
MAN1MDIR=${SHAREDIR}/man/man1m
|
|
38 |
MAN3DIR=${SHAREDIR}/man/man3
|
|
39 |
MAN4DIR=${SHAREDIR}/man/man4
|
|
40 |
ROOTMAN3DIR=${MAN3DIR}
|
|
41 |
METHODDIR=${ROOT}/lib/svc/method
|
|
42 |
MANIFESTDIR=${ROOT}/var/svc/manifest/application/security
|
|
43 |
TPMSYSDIR=${ROOT}/var/tpm/system
|
|
44 |
|
|
45 |
MKDIR=/usr/bin/mkdir
|
|
46 |
CHMOD=/usr/bin/chmod
|
|
47 |
|
|
48 |
. ${SRC}/tools/install.subr
|
|
49 |
|
|
50 |
${MKDIR} -p ${MANIFESTDIR}
|
|
51 |
${MKDIR} -p ${METHODDIR}
|
|
52 |
${MKDIR} -p ${TPMSYSDIR}
|
|
53 |
${CHMOD} 0700 ${TPMSYSDIR}
|
|
54 |
${MKDIR} -p ${ROOT}/var/tpm/pkcs11
|
|
55 |
${CHMOD} 1777 ${ROOT}/var/tpm/pkcs11
|
|
56 |
${MKDIR} -p ${ROOT}/var/tpm/userps
|
|
57 |
${CHMOD} 1777 ${ROOT}/var/tpm/userps
|
10
|
58 |
${MKDIR} -p ${ROOT}/etc/security/auth_attr.d
|
|
59 |
${MKDIR} -p ${ROOT}/etc/security/prof_attr.d
|
0
|
60 |
|
|
61 |
_install N tcsd.xml ${MANIFESTDIR}/tcsd.xml 444
|
|
62 |
_install N tcsd.sh ${METHODDIR}/tcsd.sh 555
|
|
63 |
|
9
|
64 |
_install N auth_attr ${ROOT}/etc/security/auth_attr.d/trousers 444
|
|
65 |
_install N prof_attr ${ROOT}/etc/security/prof_attr.d/trousers 444
|
|
66 |
|
0
|
67 |
cd ${VERS}
|
|
68 |
|
|
69 |
mkdir -p ${ROOT}/etc
|
|
70 |
_install N dist/tcsd.conf ${ROOT}/etc/security/tcsd.conf 0644
|
|
71 |
_install N dist/system.data.auth ${TPMSYSDIR}/system.data.auth 0600
|
|
72 |
_install N dist/system.data.noauth ${TPMSYSDIR}/system.data.noauth 0600
|
|
73 |
_install L system.data.auth ${TPMSYSDIR}/system.data
|
|
74 |
|
|
75 |
_install E src/tcsd/tcsd ${LIBDIR}/tcsd 555
|
|
76 |
_install D src/tspi/.libs/libtspi.so.1.1.3 ${LIBDIR}/libtspi.so.1.1.3 555
|
|
77 |
_install L libtspi.so.1.1.3 ${LIBDIR}/libtspi.so
|
|
78 |
_install L libtspi.so.1.1.3 ${LIBDIR}/libtspi.so.1
|
|
79 |
_install N ../llib-ltspi ${LIBDIR}/llib-ltspi 644
|
|
80 |
_install N llib-ltspi.ln ${LIBDIR}/llib-ltspi.ln 644
|
|
81 |
|
|
82 |
mkdir -p ${INCDIR}/tss
|
|
83 |
mkdir -p ${INCDIR}/trousers
|
|
84 |
|
|
85 |
for i in \
|
|
86 |
tss/tcpa_error.h \
|
|
87 |
tss/tcs_error.h \
|
|
88 |
tss/tcs_defines.h \
|
|
89 |
tss/tcs.h \
|
|
90 |
tss/tddlapi_error.h \
|
|
91 |
tss/tspi.h \
|
|
92 |
tss/tss_error.h \
|
|
93 |
tss/platform.h \
|
|
94 |
tss/tcpa_struct.h \
|
|
95 |
tss/tcs_structs.h \
|
|
96 |
tss/tddl_error.h \
|
|
97 |
tss/tss_defines.h \
|
|
98 |
tss/tss_structs.h \
|
|
99 |
tss/tcpa_defines.h \
|
|
100 |
tss/tcpa_typedef.h \
|
|
101 |
tss/tcs_typedef.h \
|
|
102 |
tss/tddli.h \
|
|
103 |
tss/tss_error_basics.h \
|
|
104 |
tss/tss_typedef.h \
|
|
105 |
tss/compat11b.h \
|
|
106 |
tss/tpm.h \
|
|
107 |
tss/tpm_error.h \
|
|
108 |
tss/tpm_ordinal.h \
|
|
109 |
trousers/tss.h \
|
|
110 |
trousers/trousers.h
|
|
111 |
do
|
|
112 |
BASE=`basename ${i}`
|
|
113 |
TMPFILE=`mktemp /tmp/${BASE}.XXXXX`
|
|
114 |
/usr/bin/dos2unix src/include/${i} ${TMPFILE}
|
|
115 |
_install N ${TMPFILE} ${INCDIR}/${i} 444
|
|
116 |
rm -f ${TMPFILE}
|
|
117 |
done
|
|
118 |
|
|
119 |
MANSCRIPT=../sunman-stability
|
|
120 |
|
|
121 |
MAN3FILES=`ls man/man3/*.3`
|
|
122 |
for i in ${MAN3FILES}
|
|
123 |
do
|
|
124 |
f=`basename ${i}`
|
|
125 |
_install M ${i} ${MAN3DIR}/${f} 444
|
|
126 |
done
|
|
127 |
|
|
128 |
MAN5FILES=`ls man/man5/*.5`
|
|
129 |
for i in ${MAN5FILES}
|
|
130 |
do
|
|
131 |
f=`basename ${i} | sed -e s/\.5$/\.4/`
|
|
132 |
_install M ${i} ${MAN4DIR}/${f} 444
|
|
133 |
done
|
|
134 |
|
|
135 |
MAN8FILES=`ls man/man8/*.8`
|
|
136 |
for i in ${MAN8FILES}
|
|
137 |
do
|
|
138 |
f=`basename ${i} | sed -e s/\.8$/\.1m/`
|
|
139 |
_install M ${i} ${MAN1MDIR}/${f} 444
|
|
140 |
done
|
|
141 |
|
|
142 |
exit 0
|