~ubuntu-branches/ubuntu/raring/trousers/raring-proposed

« back to all changes in this revision

Viewing changes to src/tcs/rpc/tcstp/rpc_admin.c

  • Committer: Logan Rosen
  • Date: 2012-11-30 16:31:54 UTC
  • mfrom: (0.1.25 sid)
  • Revision ID: logatronico@gmail.com-20121130163154-jllqpry4lo24ol6p
* Merge from Debian unstable. Remaining changes:
  - debian/trousers.postinst: Reload udev rules to reload new users and
    groups.
* Dropped Ubuntu change in debian/trousers.prerm to make remove work,
  as Debian made a different one with the same goal that works as well.
* Imported Upstream version 0.3.10
* Update symbols file
* Force build of tools
* Fix regression introduced in previous patch, preventing removal
  (Closes: #680375)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
38
38
                return TCSERR(TSS_E_INTERNAL_ERROR);
39
39
 
 
40
        if ((result = ctx_verify_context(hContext)))
 
41
                goto done;
 
42
 
40
43
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
41
44
 
42
45
        if (getData(TCSD_PACKET_TYPE_BOOL, 1, &state, 0, &data->comm))
47
50
        result = TCSP_PhysicalSetDeactivated_Internal(hContext, state);
48
51
 
49
52
        MUTEX_UNLOCK(tcsp_lock);
50
 
 
 
53
done:
51
54
        initData(&data->comm, 0);
52
55
        data->comm.hdr.u.result = result;
53
56
 
64
67
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
65
68
                return TCSERR(TSS_E_INTERNAL_ERROR);
66
69
 
 
70
        if ((result = ctx_verify_context(hContext)))
 
71
                goto done;
 
72
 
67
73
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
68
74
 
69
75
        if (getData(TCSD_PACKET_TYPE_AUTH, 1, &auth, 0, &data->comm))
81
87
                        return TCSERR(TSS_E_INTERNAL_ERROR);
82
88
                }
83
89
        } else
84
 
                initData(&data->comm, 0);
 
90
done:           initData(&data->comm, 0);
85
91
 
86
92
        data->comm.hdr.u.result = result;
87
93
        return TSS_SUCCESS;
166
172
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
167
173
                return TCSERR(TSS_E_INTERNAL_ERROR);
168
174
 
 
175
        if ((result = ctx_verify_context(hContext)))
 
176
                goto done;
 
177
 
169
178
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
170
179
 
171
180
        if (getData(TCSD_PACKET_TYPE_BOOL, 1, &state, 0, &data->comm))
176
185
        result = TCSP_SetOwnerInstall_Internal(hContext, state);
177
186
 
178
187
        MUTEX_UNLOCK(tcsp_lock);
179
 
 
 
188
done:
180
189
        initData(&data->comm, 0);
181
190
        data->comm.hdr.u.result = result;
182
191
 
194
203
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
195
204
                return TCSERR(TSS_E_INTERNAL_ERROR);
196
205
 
 
206
        if ((result = ctx_verify_context(hContext)))
 
207
                goto done;
 
208
 
197
209
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
198
210
 
199
211
        if (getData(TCSD_PACKET_TYPE_BOOL, 1, &disableState, 0, &data->comm))
214
226
                        return TCSERR(TSS_E_INTERNAL_ERROR);
215
227
                }
216
228
        } else
217
 
                initData(&data->comm, 0);
 
229
done:           initData(&data->comm, 0);
218
230
        data->comm.hdr.u.result = result;
219
231
 
220
232
        return TSS_SUCCESS;
253
265
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
254
266
                return TCSERR(TSS_E_INTERNAL_ERROR);
255
267
 
 
268
        if ((result = ctx_verify_context(hContext)))
 
269
                goto done;
 
270
 
256
271
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
257
272
 
258
273
        if (getData(TCSD_PACKET_TYPE_UINT16, 1, &phyPresFlags, 0, &data->comm))
263
278
        result = TCSP_PhysicalPresence_Internal(hContext, phyPresFlags);
264
279
 
265
280
        MUTEX_UNLOCK(tcsp_lock);
266
 
 
 
281
done:
267
282
        initData(&data->comm, 0);
268
283
        data->comm.hdr.u.result = result;
269
284
 
307
322
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
308
323
                return TCSERR(TSS_E_INTERNAL_ERROR);
309
324
 
 
325
        if ((result = ctx_verify_context(hContext)))
 
326
                goto done;
 
327
 
310
328
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
311
329
 
312
330
        if (getData(TCSD_PACKET_TYPE_AUTH, 1, &operatorAuth, 0, &data->comm))
331
349
                        }
332
350
                }
333
351
        } else
334
 
                initData(&data->comm, 0);
 
352
done:           initData(&data->comm, 0);
335
353
 
336
354
        data->comm.hdr.u.result = result;
337
355
 
348
366
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
349
367
                return TCSERR(TSS_E_INTERNAL_ERROR);
350
368
 
 
369
        if ((result = ctx_verify_context(hContext)))
 
370
                goto done;
 
371
 
351
372
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
352
373
 
353
374
        if (getData(TCSD_PACKET_TYPE_AUTH, 1, &ownerAuth, 0, &data->comm))
365
386
                        return TCSERR(TSS_E_INTERNAL_ERROR);
366
387
                }
367
388
        } else
368
 
                initData(&data->comm, 0);
 
389
done:           initData(&data->comm, 0);
369
390
 
370
391
        data->comm.hdr.u.result = result;
371
392
 
383
404
        if (getData(TCSD_PACKET_TYPE_UINT32, 0, &hContext, 0, &data->comm))
384
405
                return TCSERR(TSS_E_INTERNAL_ERROR);
385
406
 
 
407
        if ((result = ctx_verify_context(hContext)))
 
408
                goto done;
 
409
 
386
410
        LogDebugFn("thread %ld context %x", THREAD_ID, hContext);
387
411
 
388
412
        if (getData(TCSD_PACKET_TYPE_UINT32, 1, &hResHandle, 0, &data->comm))
395
419
        result = TCSP_FlushSpecific_Internal(hContext, hResHandle, resourceType);
396
420
 
397
421
        MUTEX_UNLOCK(tcsp_lock);
398
 
 
 
422
done:
399
423
        initData(&data->comm, 0);
400
424
        data->comm.hdr.u.result = result;
401
425