summaryrefslogtreecommitdiffstats
path: root/source4/librpc/idl/efs.idl
blob: 62fefda606146cf44434d475bbd4e87fe220a523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
	IDL definitions from original packet-dcerpc-efs.c
        by Jean-Baptiste Marchand
*/

import "security.idl";

[ 
  uuid("c681d488-d850-11d0-8c52-00c04fd90f7e"),
  version(1.0),
  pointer_default(unique)
] interface efs
{

WERROR EfsRpcOpenFileRaw(
	[out,ref] policy_handle *pvContext,
	[in] [charset(UTF16),string] uint16 FileName[],
	[in] uint32 Flags
	);

WERROR EfsRpcReadFileRaw(
	[in,ref] policy_handle *pvContext
/* incomplete */
);


WERROR EfsRpcWriteFileRaw(
	[in,ref] policy_handle *pvContext
/* incomplete */
);

void EfsRpcCloseRaw(
	[in,out,ref] policy_handle *pvContext
);

WERROR EfsRpcEncryptFileSrv(
	[in] [charset(UTF16),string] uint16 Filename[]
);

WERROR EfsRpcDecryptFileSrv(
	[in] [charset(UTF16),string] uint16 FileName[], 
	[in] uint32 Reserved
);

typedef struct {
	uint32 cbData;
	[size_is(cbData), unique]  uint8  *pbData;
} EFS_HASH_BLOB;

typedef struct {
	uint32 cbTotalLength;
	[unique] dom_sid *pUserSid;
	[unique] EFS_HASH_BLOB  *pHash;
	[unique] [charset(UTF16),string] uint16 *lpDisplayInformation;
} ENCRYPTION_CERTIFICATE_HASH;

typedef struct {
	uint32 nCert_Hash;
	/* this is a pointer to an array of pointers */
	[size_is(nCert_Hash)] ENCRYPTION_CERTIFICATE_HASH *pUsers[*];
} ENCRYPTION_CERTIFICATE_HASH_LIST;

WERROR EfsRpcQueryUsersOnFile(
	[in] [charset(UTF16),string] uint16 FileName[],
	[out,ref,unique] ENCRYPTION_CERTIFICATE_HASH_LIST **pUsers
);

WERROR EfsRpcQueryRecoveryAgents(
	[in] [charset(UTF16),string] uint16 FileName[],
	[out,ref,unique] ENCRYPTION_CERTIFICATE_HASH_LIST **pRecoveryAgents
);

WERROR EfsRpcRemoveUsersFromFile(
	[in] [charset(UTF16),string] uint16 FileName[]
	/*	[in] ENCRYPTION_CERTIFICATE_LIST Hashes*/
);

WERROR EfsRpcAddUsersToFile(
	[in] [charset(UTF16),string] uint16 FileName[]
	/*	[in] ENCRYPTION_CERTIFICATE_LIST Hashes*/
);

typedef struct {
	uint32 dwCertEncodingType;
	uint32 cbData;
  [size_is(cbData)] [unique] uint8 *pbData;
} EFS_CERTIFICATE_BLOB;

typedef struct {
	uint32 TotalLength;
	[unique] dom_sid *pUserSid;
	[unique] EFS_CERTIFICATE_BLOB *pCertBlob;
} ENCRYPTION_CERTIFICATE;

WERROR EfsRpcSetFileEncryptionKey(
	[in] [unique] ENCRYPTION_CERTIFICATE *pEncryptionCertificate
);

WERROR EfsRpcNotSupported(
);

WERROR EfsRpcFileKeyInfo(
);

WERROR EfsRpcDuplicateEncryptionInfoFile(
);

}