Skip to content

Commit e2e79b7

Browse files
committed
vtpm: Add function for transferring IMA namespace
Signed-off-by: Stefan Berger <[email protected]>
1 parent ea857d9 commit e2e79b7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libcontainer/vtpm/vtpm.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ const (
6060

6161
VTPM_PROXY_IOC_NEW_DEV = 0xc014a100
6262

63+
VTPM_PROXY_IOC_TRANSFER_IMA = 0x0000a110
64+
6365
VTPM_VERSION_1_2 = "1.2"
6466
VTPM_VERSION_2 = "2"
6567

@@ -91,6 +93,14 @@ func vtpmx_ioctl(cmd, msg uintptr) error {
9193
return nil
9294
}
9395

96+
func TransferIMA(anonfd int) error {
97+
return ioctl(uintptr(anonfd), VTPM_PROXY_IOC_TRANSFER_IMA, 0);
98+
}
99+
100+
func (vtpm *VTPM) GetAnonFD() int32 {
101+
return vtpm.fd
102+
}
103+
94104
// Create a new VTPM object
95105
//
96106
// @statepath: directory where the vTPM's state will be written into

0 commit comments

Comments
 (0)