1 --- a/src/tcs/rpc/tcstp/rpc.c.orig Fri Jun 5 12:45:50 2009
2 +++ b/src/tcs/rpc/tcstp/rpc.c Thu Sep 10 13:05:33 2009
3 @@ -385,134 +385,134 @@
4 typedef struct tdDispatchTable {
5 TSS_RESULT (*Func) (struct tcsd_thread_data *);
10 DispatchTable tcs_func_table[TCSD_MAX_NUM_ORDS] = {
11 - {tcs_wrap_Error,"Error"}, /* 0 */
12 - {tcs_wrap_OpenContext,"OpenContext"},
13 - {tcs_wrap_CloseContext,"CloseContext"},
14 - {tcs_wrap_Error,"Error"},
15 - {tcs_wrap_TCSGetCapability,"TCSGetCapability"},
16 - {tcs_wrap_RegisterKey,"RegisterKey"}, /* 5 */
17 - {tcs_wrap_UnregisterKey,"UnregisterKey"},
18 - {tcs_wrap_EnumRegisteredKeys,"EnumRegisteredKeys"},
19 - {tcs_wrap_Error,"Error"},
20 - {tcs_wrap_GetRegisteredKeyBlob,"GetRegisteredKeyBlob"},
21 - {tcs_wrap_GetRegisteredKeyByPublicInfo,"GetRegisteredKeyByPublicInfo"}, /* 10 */
22 - {tcs_wrap_LoadKeyByBlob,"LoadKeyByBlob"},
23 - {tcs_wrap_LoadKeyByUUID,"LoadKeyByUUID"},
24 - {tcs_wrap_EvictKey,"EvictKey"},
25 - {tcs_wrap_CreateWrapKey,"CreateWrapKey"},
26 - {tcs_wrap_GetPubkey,"GetPubkey"}, /* 15 */
27 - {tcs_wrap_MakeIdentity,"MakeIdentity"},
28 - {tcs_wrap_LogPcrEvent,"LogPcrEvent"},
29 - {tcs_wrap_GetPcrEvent,"GetPcrEvent"},
30 - {tcs_wrap_GetPcrEventsByPcr,"GetPcrEventsByPcr"},
31 - {tcs_wrap_GetPcrEventLog,"GetPcrEventLog"}, /* 20 */
32 - {tcs_wrap_SetOwnerInstall,"SetOwnerInstall"},
33 - {tcs_wrap_TakeOwnership,"TakeOwnership"},
34 - {tcs_wrap_OIAP,"OIAP"},
35 - {tcs_wrap_OSAP,"OSAP"},
36 - {tcs_wrap_ChangeAuth,"ChangeAuth"}, /* 25 */
37 - {tcs_wrap_ChangeAuthOwner,"ChangeAuthOwner"},
38 - {tcs_wrap_Error,"Error"},
39 - {tcs_wrap_Error,"Error"},
40 - {tcs_wrap_TerminateHandle,"TerminateHandle"},
41 - {tcs_wrap_ActivateIdentity,"ActivateIdentity"}, /* 30 */
42 - {tcs_wrap_Extend,"Extend"},
43 - {tcs_wrap_PcrRead,"PcrRead"},
44 - {tcs_wrap_Quote,"Quote"},
45 - {tcs_wrap_DirWriteAuth,"DirWriteAuth"},
46 - {tcs_wrap_DirRead,"DirRead"}, /* 35 */
47 - {tcs_wrap_Seal,"Seal"},
48 - {tcs_wrap_UnSeal,"UnSeal"},
49 - {tcs_wrap_UnBind,"UnBind"},
50 - {tcs_wrap_CreateMigrationBlob,"CreateMigrationBlob"},
51 - {tcs_wrap_ConvertMigrationBlob,"ConvertMigrationBlob"}, /* 40 */
52 - {tcs_wrap_AuthorizeMigrationKey,"AuthorizeMigrationKey"},
53 - {tcs_wrap_CertifyKey,"CertifyKey"},
54 - {tcs_wrap_Sign,"Sign"},
55 - {tcs_wrap_GetRandom,"GetRandom"},
56 - {tcs_wrap_StirRandom,"StirRandom"}, /* 45 */
57 - {tcs_wrap_GetCapability,"GetCapability"},
58 - {tcs_wrap_Error,"Error"},
59 - {tcs_wrap_GetCapabilityOwner,"GetCapabilityOwner"},
60 - {tcs_wrap_CreateEndorsementKeyPair,"CreateEndorsementKeyPair"},
61 - {tcs_wrap_ReadPubek,"ReadPubek"}, /* 50 */
62 - {tcs_wrap_DisablePubekRead,"DisablePubekRead"},
63 - {tcs_wrap_OwnerReadPubek,"OwnerReadPubek"},
64 - {tcs_wrap_SelfTestFull,"SelfTestFull"},
65 - {tcs_wrap_CertifySelfTest,"CertifySelfTest"},
66 - {tcs_wrap_Error,"Error"}, /* 55 */
67 - {tcs_wrap_GetTestResult,"GetTestResult"},
68 - {tcs_wrap_OwnerSetDisable,"OwnerSetDisable"},
69 - {tcs_wrap_OwnerClear,"OwnerClear"},
70 - {tcs_wrap_DisableOwnerClear,"DisableOwnerClear"},
71 - {tcs_wrap_ForceClear,"ForceClear"}, /* 60 */
72 - {tcs_wrap_DisableForceClear,"DisableForceClear"},
73 - {tcs_wrap_PhysicalDisable,"PhysicalDisable"},
74 - {tcs_wrap_PhysicalEnable,"PhysicalEnable"},
75 - {tcs_wrap_PhysicalSetDeactivated,"PhysicalSetDeactivated"},
76 - {tcs_wrap_SetTempDeactivated,"SetTempDeactivated"}, /* 65 */
77 - {tcs_wrap_PhysicalPresence,"PhysicalPresence"},
78 - {tcs_wrap_Error,"Error"},
79 - {tcs_wrap_Error,"Error"},
80 - {tcs_wrap_CreateMaintenanceArchive,"CreateMaintenanceArchive"},
81 - {tcs_wrap_LoadMaintenanceArchive,"LoadMaintenanceArchive"}, /* 70 */
82 - {tcs_wrap_KillMaintenanceFeature,"KillMaintenanceFeature"},
83 - {tcs_wrap_LoadManuMaintPub,"LoadManuMaintPub"},
84 - {tcs_wrap_ReadManuMaintPub,"ReadManuMaintPub"},
85 - {tcs_wrap_DaaJoin,"DaaJoin"},
86 - {tcs_wrap_DaaSign,"DaaSign"}, /* 75 */
87 - {tcs_wrap_SetCapability,"SetCapability"},
88 - {tcs_wrap_ResetLockValue,"ResetLockValue"},
89 - {tcs_wrap_PcrReset,"PcrReset"},
90 - {tcs_wrap_ReadCounter,"ReadCounter"},
91 - {tcs_wrap_CreateCounter,"CreateCounter"}, /* 80 */
92 - {tcs_wrap_IncrementCounter,"IncrementCounter"},
93 - {tcs_wrap_ReleaseCounter,"ReleaseCounter"},
94 - {tcs_wrap_ReleaseCounterOwner,"ReleaseCounterOwner"},
95 - {tcs_wrap_ReadCurrentTicks,"ReadCurrentTicks"},
96 - {tcs_wrap_TickStampBlob,"TicksStampBlob"}, /* 85 */
97 - {tcs_wrap_GetCredential,"GetCredential"},
98 - {tcs_wrap_NV_DefineOrReleaseSpace,"NVDefineOrReleaseSpace"},
99 - {tcs_wrap_NV_WriteValue,"NVWriteValue"},
100 - {tcs_wrap_NV_WriteValueAuth,"NVWriteValueAuth"},
101 - {tcs_wrap_NV_ReadValue,"NVReadValue"}, /* 90 */
102 - {tcs_wrap_NV_ReadValueAuth,"NVReadValueAuth"},
103 - {tcs_wrap_EstablishTransport,"EstablishTransport"},
104 - {tcs_wrap_ExecuteTransport,"ExecuteTransport"},
105 - {tcs_wrap_ReleaseTransportSigned,"ReleaseTransportSigned"},
106 - {tcs_wrap_SetOrdinalAuditStatus,"SetOrdinalAuditStatus"}, /* 95 */
107 - {tcs_wrap_GetAuditDigest,"GetAuditDigest"},
108 - {tcs_wrap_GetAuditDigestSigned,"GetAuditDigestSigned"},
109 - {tcs_wrap_Sealx,"Sealx"},
110 - {tcs_wrap_SetOperatorAuth,"SetOperatorAuth"},
111 - {tcs_wrap_OwnerReadInternalPub,"OwnerReadInternalPub"}, /* 100 */
112 - {tcs_wrap_EnumRegisteredKeys2,"EnumRegisteredKeys2"},
113 - {tcs_wrap_SetTempDeactivated2,"SetTempDeactivated2"},
114 - {tcs_wrap_Delegate_Manage,"Delegate_Manage"},
115 - {tcs_wrap_Delegate_CreateKeyDelegation,"Delegate_CreateKeyDelegation"},
116 - {tcs_wrap_Delegate_CreateOwnerDelegation,"Delegate_CreateOwnerDelegation"}, /* 105 */
117 - {tcs_wrap_Delegate_LoadOwnerDelegation,"Delegate_LoadOwnerDelegation"},
118 - {tcs_wrap_Delegate_ReadTable,"Delegate_ReadTable"},
119 - {tcs_wrap_Delegate_UpdateVerificationCount,"Delegate_UpdateVerificationCount"},
120 - {tcs_wrap_Delegate_VerifyDelegation,"Delegate_VerifyDelegation"},
121 - {tcs_wrap_CreateRevocableEndorsementKeyPair,"CreateRevocableEndorsementKeyPair"}, /* 110 */
122 - {tcs_wrap_RevokeEndorsementKeyPair,"RevokeEndorsementKeyPair"},
123 - {tcs_wrap_Error,"Error - was MakeIdentity2"},
124 - {tcs_wrap_Quote2,"Quote2"},
125 - {tcs_wrap_CMK_SetRestrictions,"CMK_SetRestrictions"},
126 - {tcs_wrap_CMK_ApproveMA,"CMK_ApproveMA"}, /* 115 */
127 - {tcs_wrap_CMK_CreateKey,"CMK_CreateKey"},
128 - {tcs_wrap_CMK_CreateTicket,"CMK_CreateTicket"},
129 - {tcs_wrap_CMK_CreateBlob,"CMK_CreateBlob"},
130 - {tcs_wrap_CMK_ConvertMigration,"CMK_ConvertMigration"},
131 - {tcs_wrap_FlushSpecific,"FlushSpecific"}, /* 120 */
132 - {tcs_wrap_KeyControlOwner, "KeyControlOwner"},
133 - {tcs_wrap_DSAP, "DSAP"}
136 + {tcs_wrap_Error,"Error", 0}, /* 0 */
137 + {tcs_wrap_OpenContext,"OpenContext", 0},
138 + {tcs_wrap_CloseContext,"CloseContext", 0},
139 + {tcs_wrap_Error,"Error", 0},
140 + {tcs_wrap_TCSGetCapability,"TCSGetCapability", 0},
141 + {tcs_wrap_RegisterKey,"RegisterKey", 0}, /* 5 */
142 + {tcs_wrap_UnregisterKey,"UnregisterKey", 0},
143 + {tcs_wrap_EnumRegisteredKeys,"EnumRegisteredKeys", 0},
144 + {tcs_wrap_Error,"Error", 0},
145 + {tcs_wrap_GetRegisteredKeyBlob,"GetRegisteredKeyBlob", 0},
146 + {tcs_wrap_GetRegisteredKeyByPublicInfo,"GetRegisteredKeyByPublicInfo", 0}, /* 10 */
147 + {tcs_wrap_LoadKeyByBlob,"LoadKeyByBlob", 0},
148 + {tcs_wrap_LoadKeyByUUID,"LoadKeyByUUID", 0},
149 + {tcs_wrap_EvictKey,"EvictKey", 0},
150 + {tcs_wrap_CreateWrapKey,"CreateWrapKey", 0},
151 + {tcs_wrap_GetPubkey,"GetPubkey", 0}, /* 15 */
152 + {tcs_wrap_MakeIdentity,"MakeIdentity", 0},
153 + {tcs_wrap_LogPcrEvent,"LogPcrEvent", 0},
154 + {tcs_wrap_GetPcrEvent,"GetPcrEvent", 0},
155 + {tcs_wrap_GetPcrEventsByPcr,"GetPcrEventsByPcr", 0},
156 + {tcs_wrap_GetPcrEventLog,"GetPcrEventLog", 0}, /* 20 */
157 + {tcs_wrap_SetOwnerInstall,"SetOwnerInstall", TPM_ORD_SetOwnerInstall},
158 + {tcs_wrap_TakeOwnership,"TakeOwnership", TPM_ORD_TakeOwnership},
159 + {tcs_wrap_OIAP,"OIAP", 0},
160 + {tcs_wrap_OSAP,"OSAP", 0},
161 + {tcs_wrap_ChangeAuth,"ChangeAuth", 0}, /* 25 */
162 + {tcs_wrap_ChangeAuthOwner,"ChangeAuthOwner", 0},
163 + {tcs_wrap_Error,"Error", 0},
164 + {tcs_wrap_Error,"Error", 0},
165 + {tcs_wrap_TerminateHandle,"TerminateHandle", 0},
166 + {tcs_wrap_ActivateIdentity,"ActivateIdentity", 0}, /* 30 */
167 + {tcs_wrap_Extend,"Extend", 0},
168 + {tcs_wrap_PcrRead,"PcrRead", 0},
169 + {tcs_wrap_Quote,"Quote", 0},
170 + {tcs_wrap_DirWriteAuth,"DirWriteAuth", 0},
171 + {tcs_wrap_DirRead,"DirRead", 0}, /* 35 */
172 + {tcs_wrap_Seal,"Seal", 0},
173 + {tcs_wrap_UnSeal,"UnSeal", 0},
174 + {tcs_wrap_UnBind,"UnBind", 0},
175 + {tcs_wrap_CreateMigrationBlob,"CreateMigrationBlob", 0},
176 + {tcs_wrap_ConvertMigrationBlob,"ConvertMigrationBlob", 0}, /* 40 */
177 + {tcs_wrap_AuthorizeMigrationKey,"AuthorizeMigrationKey", 0},
178 + {tcs_wrap_CertifyKey,"CertifyKey", 0},
179 + {tcs_wrap_Sign,"Sign", 0},
180 + {tcs_wrap_GetRandom,"GetRandom", 0},
181 + {tcs_wrap_StirRandom,"StirRandom", 0}, /* 45 */
182 + {tcs_wrap_GetCapability,"GetCapability", 0},
183 + {tcs_wrap_Error,"Error", 0},
184 + {tcs_wrap_GetCapabilityOwner,"GetCapabilityOwner", 0},
185 + {tcs_wrap_CreateEndorsementKeyPair,"CreateEndorsementKeyPair", 0},
186 + {tcs_wrap_ReadPubek,"ReadPubek", 0}, /* 50 */
187 + {tcs_wrap_DisablePubekRead,"DisablePubekRead", 0},
188 + {tcs_wrap_OwnerReadPubek,"OwnerReadPubek", 0},
189 + {tcs_wrap_SelfTestFull,"SelfTestFull", TPM_ORD_SelfTestFull},
190 + {tcs_wrap_CertifySelfTest,"CertifySelfTest", TPM_ORD_CertifySelfTest},
191 + {tcs_wrap_Error,"Error", 0}, /* 55 */
192 + {tcs_wrap_GetTestResult,"GetTestResult", 0},
193 + {tcs_wrap_OwnerSetDisable,"OwnerSetDisable", TPM_ORD_OwnerSetDisable},
194 + {tcs_wrap_OwnerClear,"OwnerClear", TPM_ORD_OwnerClear},
195 + {tcs_wrap_DisableOwnerClear,"DisableOwnerClear", TPM_ORD_DisableOwnerClear},
196 + {tcs_wrap_ForceClear,"ForceClear", TPM_ORD_ForceClear}, /* 60 */
197 + {tcs_wrap_DisableForceClear,"DisableForceClear", TPM_ORD_DisableForceClear},
198 + {tcs_wrap_PhysicalDisable,"PhysicalDisable", TPM_ORD_PhysicalDisable},
199 + {tcs_wrap_PhysicalEnable,"PhysicalEnable", TPM_ORD_PhysicalEnable},
200 + {tcs_wrap_PhysicalSetDeactivated,"PhysicalSetDeactivated", TPM_ORD_PhysicalSetDeactivated},
201 + {tcs_wrap_SetTempDeactivated,"SetTempDeactivated", TPM_ORD_SetTempDeactivated}, /* 65 */
202 + {tcs_wrap_PhysicalPresence,"PhysicalPresence", TSC_ORD_PhysicalPresence},
203 + {tcs_wrap_Error,"Error", 0},
204 + {tcs_wrap_Error,"Error", 0},
205 + {tcs_wrap_CreateMaintenanceArchive,"CreateMaintenanceArchive", 0},
206 + {tcs_wrap_LoadMaintenanceArchive,"LoadMaintenanceArchive", 0}, /* 70 */
207 + {tcs_wrap_KillMaintenanceFeature,"KillMaintenanceFeature", 0},
208 + {tcs_wrap_LoadManuMaintPub,"LoadManuMaintPub", 0},
209 + {tcs_wrap_ReadManuMaintPub,"ReadManuMaintPub", 0},
210 + {tcs_wrap_DaaJoin,"DaaJoin", 0},
211 + {tcs_wrap_DaaSign,"DaaSign", 0}, /* 75 */
212 + {tcs_wrap_SetCapability,"SetCapability", 0},
213 + {tcs_wrap_ResetLockValue,"ResetLockValue", TPM_ORD_ResetLockValue},
214 + {tcs_wrap_PcrReset,"PcrReset", 0},
215 + {tcs_wrap_ReadCounter,"ReadCounter", 0},
216 + {tcs_wrap_CreateCounter,"CreateCounter", 0}, /* 80 */
217 + {tcs_wrap_IncrementCounter,"IncrementCounter", 0},
218 + {tcs_wrap_ReleaseCounter,"ReleaseCounter", 0},
219 + {tcs_wrap_ReleaseCounterOwner,"ReleaseCounterOwner", 0},
220 + {tcs_wrap_ReadCurrentTicks,"ReadCurrentTicks", 0},
221 + {tcs_wrap_TickStampBlob,"TicksStampBlob", 0}, /* 85 */
222 + {tcs_wrap_GetCredential,"GetCredential", 0},
223 + {tcs_wrap_NV_DefineOrReleaseSpace,"NVDefineOrReleaseSpace", 0},
224 + {tcs_wrap_NV_WriteValue,"NVWriteValue", 0},
225 + {tcs_wrap_NV_WriteValueAuth,"NVWriteValueAuth", 0},
226 + {tcs_wrap_NV_ReadValue,"NVReadValue", 0}, /* 90 */
227 + {tcs_wrap_NV_ReadValueAuth,"NVReadValueAuth", 0},
228 + {tcs_wrap_EstablishTransport,"EstablishTransport", 0},
229 + {tcs_wrap_ExecuteTransport,"ExecuteTransport", 0},
230 + {tcs_wrap_ReleaseTransportSigned,"ReleaseTransportSigned", 0},
231 + {tcs_wrap_SetOrdinalAuditStatus,"SetOrdinalAuditStatus", 0}, /* 95 */
232 + {tcs_wrap_GetAuditDigest,"GetAuditDigest", 0},
233 + {tcs_wrap_GetAuditDigestSigned,"GetAuditDigestSigned", 0},
234 + {tcs_wrap_Sealx,"Sealx", 0},
235 + {tcs_wrap_SetOperatorAuth,"SetOperatorAuth", TPM_ORD_SetOperatorAuth},
236 + {tcs_wrap_OwnerReadInternalPub,"OwnerReadInternalPub", 0}, /* 100 */
237 + {tcs_wrap_EnumRegisteredKeys2,"EnumRegisteredKeys2", 0},
238 + {tcs_wrap_SetTempDeactivated2,"SetTempDeactivated2", 0},
239 + {tcs_wrap_Delegate_Manage,"Delegate_Manage", 0},
240 + {tcs_wrap_Delegate_CreateKeyDelegation,"Delegate_CreateKeyDelegation", 0},
241 + {tcs_wrap_Delegate_CreateOwnerDelegation,"Delegate_CreateOwnerDelegation", 0}, /* 105 */
242 + {tcs_wrap_Delegate_LoadOwnerDelegation,"Delegate_LoadOwnerDelegation", 0},
243 + {tcs_wrap_Delegate_ReadTable,"Delegate_ReadTable", 0},
244 + {tcs_wrap_Delegate_UpdateVerificationCount,"Delegate_UpdateVerificationCount", 0},
245 + {tcs_wrap_Delegate_VerifyDelegation,"Delegate_VerifyDelegation", 0},
246 + {tcs_wrap_CreateRevocableEndorsementKeyPair,"CreateRevocableEndorsementKeyPair", 0}, /* 110 */
247 + {tcs_wrap_RevokeEndorsementKeyPair,"RevokeEndorsementKeyPair", 0},
248 + {tcs_wrap_Error,"Error - was MakeIdentity2", 0},
249 + {tcs_wrap_Quote2,"Quote2", 0},
250 + {tcs_wrap_CMK_SetRestrictions,"CMK_SetRestrictions", 0},
251 + {tcs_wrap_CMK_ApproveMA,"CMK_ApproveMA", 0}, /* 115 */
252 + {tcs_wrap_CMK_CreateKey,"CMK_CreateKey", 0},
253 + {tcs_wrap_CMK_CreateTicket,"CMK_CreateTicket", 0},
254 + {tcs_wrap_CMK_CreateBlob,"CMK_CreateBlob", 0},
255 + {tcs_wrap_CMK_ConvertMigration,"CMK_ConvertMigration", 0},
256 + {tcs_wrap_FlushSpecific,"FlushSpecific", 0}, /* 120 */
257 + {tcs_wrap_KeyControlOwner, "KeyControlOwner", 0},
258 + {tcs_wrap_DSAP, "DSAP", 0}
261 access_control(struct tcsd_thread_data *thread_data)
263 @@ -562,11 +562,190 @@
267 +#if defined (SOLARIS)
270 +#include <bsm/adt.h>
271 +#include <bsm/adt_event.h>
274 +audit_tpm(UINT32 cmd, struct tcsd_thread_data *data)
276 + adt_session_data_t *ah = NULL;
277 + adt_event_data_t *event = NULL;
278 + ucred_t *uc = NULL;
280 + int adtstatus = ADT_FAILURE;
282 + if (getpeerucred(data->sock, &uc)) {
283 + LogError("Audit Failed - getpeerucred failed (%s)",
287 + if (adt_start_session(&ah, NULL, ADT_USE_PROC_DATA) != 0) {
288 + LogError("Audit Failed - adt_start_session failed (%s)",
293 + if (adt_set_from_ucred(ah, uc, ADT_NEW) != 0) {
294 + LogError("Audit Failed - adt_set_from_ucred failed (%s)",
300 + * NOTE: It is important that the ordering of the
301 + * error message definitions in the adt.xml IDL from the
302 + * libbsm library source matches the numerical ordering of
303 + * the TPM_E_* error codes in /usr/include/tss/tpm_error.h
305 + if (data->comm.hdr.u.result == TSS_SUCCESS) {
306 + adtstatus = ADT_SUCCESS;
307 + adterr = ADT_SUCCESS;
309 + * Use literal value here until the
310 + * build system is updated with latest adt_event.h
311 + * 4102 = ADT_TPM_E_NO_MSG (build 123).
312 + * Change this later.
315 + } else if (data->comm.hdr.u.result & TPM_E_NON_FATAL) {
317 + * NON_FATAL TPM errors are masked (0x800) so they are not in numerical
318 + * sequence with the rest of the TPM errors.
320 + msgid = ADT_TPM_E_RETRY +
321 + (data->comm.hdr.u.result - TPM_E_RETRY);
322 + adterr = ADT_FAIL_VALUE_PROGRAM;
324 + msgid = ADT_TPM_E_AUTHFAIL +
325 + (data->comm.hdr.u.result - TPM_E_AUTHFAIL);
326 + adterr = ADT_FAIL_VALUE_PROGRAM;
329 + case TPM_ORD_CertifySelfTest:
330 + event = adt_alloc_event(ah, ADT_tpm_certifyselftest);
332 + event->adt_tpm_certifyselftest.message = msgid;
334 + case TPM_ORD_OwnerClear:
335 + event = adt_alloc_event(ah, ADT_tpm_ownerclear);
337 + event->adt_tpm_ownerclear.message = msgid;
339 + case TPM_ORD_ContinueSelfTest:
340 + event = adt_alloc_event(ah, ADT_tpm_continueselftest);
342 + event->adt_tpm_continueselftest.message = msgid;
344 + case TPM_ORD_DisableForceClear:
345 + event = adt_alloc_event(ah, ADT_tpm_disableforceclear);
347 + event->adt_tpm_disableforceclear.message = msgid;
349 + case TPM_ORD_DisableOwnerClear:
350 + event = adt_alloc_event(ah, ADT_tpm_disableownerclear);
352 + event->adt_tpm_disableownerclear.message = msgid;
354 + case TPM_ORD_FieldUpgrade:
355 + event = adt_alloc_event(ah, ADT_tpm_fieldupgrade);
357 + event->adt_tpm_fieldupgrade.message = msgid;
359 + case TPM_ORD_ForceClear:
360 + event = adt_alloc_event(ah, ADT_tpm_forceclear);
362 + event->adt_tpm_forceclear.message = msgid;
364 + case TPM_ORD_OwnerSetDisable:
365 + event = adt_alloc_event(ah, ADT_tpm_ownersetdisable);
367 + event->adt_tpm_ownersetdisable.message = msgid;
369 + case TPM_ORD_PhysicalEnable:
370 + event = adt_alloc_event(ah, ADT_tpm_physicalenable);
372 + event->adt_tpm_physicalenable.message = msgid;
374 + case TPM_ORD_PhysicalDisable:
375 + event = adt_alloc_event(ah, ADT_tpm_physicaldisable);
377 + event->adt_tpm_physicaldisable.message = msgid;
379 + case TPM_ORD_PhysicalSetDeactivated:
380 + event = adt_alloc_event(ah, ADT_tpm_physicaldeactivate);
382 + event->adt_tpm_physicaldeactivate.message = msgid;
384 + case TSC_ORD_PhysicalPresence:
385 + event = adt_alloc_event(ah, ADT_tpm_physicalpresence);
387 + event->adt_tpm_physicalpresence.message = msgid;
389 + case TPM_ORD_ResetLockValue:
390 + event = adt_alloc_event(ah, ADT_tpm_resetlockvalue);
392 + event->adt_tpm_resetlockvalue.message = msgid;
394 + case TPM_ORD_SelfTestFull:
395 + event = adt_alloc_event(ah, ADT_tpm_selftestfull);
397 + event->adt_tpm_selftestfull.message = msgid;
399 + case TPM_ORD_SetOperatorAuth:
400 + event = adt_alloc_event(ah, ADT_tpm_setoperatorauth);
402 + event->adt_tpm_setoperatorauth.message = msgid;
404 + case TPM_ORD_SetOwnerInstall:
405 + event = adt_alloc_event(ah, ADT_tpm_setownerinstall);
407 + event->adt_tpm_setownerinstall.message = msgid;
409 + case TPM_ORD_SetTempDeactivated:
410 + event = adt_alloc_event(ah, ADT_tpm_settempdeactivated);
412 + event->adt_tpm_settempdeactivated.message = msgid;
414 + case TPM_ORD_TakeOwnership:
415 + event = adt_alloc_event(ah, ADT_tpm_takeownership);
417 + event->adt_tpm_takeownership.message = msgid;
420 + /* command not audited */
423 + if (event == NULL) {
424 + LogError("Audit Failed - Failed to allocate event (%s)",
429 + if (adt_put_event(event, adtstatus, adterr)) {
430 + LogError("Audit Failed - Failed to put audit event (%s)",
436 + adt_free_event(event);
437 + (void) adt_end_session(ah);
441 +#endif /* SOLARIS */
444 dispatchCommand(struct tcsd_thread_data *data)
448 +#if defined (SOLARIS)
452 /* First, check the ordinal bounds */
453 if (data->comm.hdr.u.ordinal >= TCSD_MAX_NUM_ORDS) {
458 +#if defined (SOLARIS)
459 + cmd = tcs_func_table[data->comm.hdr.u.ordinal].ordinal;
461 if ((result = tcs_func_table[data->comm.hdr.u.ordinal].Func(data)) == TSS_SUCCESS) {
462 /* set the comm buffer */
465 LoadBlob_UINT32(&offset, data->comm.hdr.parm_size, data->comm.buf);
466 LoadBlob_UINT32(&offset, data->comm.hdr.parm_offset, data->comm.buf);
468 +#if defined (SOLARIS)
469 + audit_tpm(cmd, data);