|
1 // |
|
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 |
|
17 PRINT Running EMsvDeleteAttachment |
|
18 |
|
19 /////////////////////////////////// |
|
20 // **** Service entry tests **** |
|
21 /////////////////////////////////// |
|
22 |
|
23 //****************************************** |
|
24 // Entry is a service entry. |
|
25 // Need WriteDeviceData to access the entry. |
|
26 //****************************************** |
|
27 |
|
28 PRINT Running EMsvDeleteAttachment : Read Caps = WriteDeviceData. Same SID. Should Pass. |
|
29 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
30 |
|
31 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
32 |
|
33 // First we need to set proxy to same SID as test server, so we can create an entry we own with this SID. |
|
34 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000020 -SID 101F7776 SendProxyServer.exe |
|
35 |
|
36 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateServiceEntry.script |
|
37 |
|
38 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
39 |
|
40 // Need delay to allow SendProxyServer shutting down |
|
41 DELAY 3000 |
|
42 |
|
43 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Pass.script |
|
44 |
|
45 // Need delay to allow SendProxyServer shutting down |
|
46 DELAY 3000 |
|
47 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
48 |
|
49 //****************************************** |
|
50 // Entry is a service entry. |
|
51 // Need WriteDeviceData to access the entry. |
|
52 //****************************************** |
|
53 |
|
54 PRINT Running EMsvDeleteAttachment : Read Caps = WriteUserData. Same SID. Should Fail. |
|
55 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
56 |
|
57 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
58 |
|
59 // First we need to set proxy to WriteDeviceData so we can create the attachment. |
|
60 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000020 -SID 101F7776 SendProxyServer.exe |
|
61 |
|
62 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateServiceEntry.script |
|
63 |
|
64 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
65 |
|
66 // Need delay to allow SendProxyServer shutting down |
|
67 DELAY 3000 |
|
68 |
|
69 // Next we need to set proxy to lesser capability so we can test deleting the attachment. |
|
70 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00010000 -SID 101F7776 SendProxyServer.exe |
|
71 |
|
72 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
73 |
|
74 // Need delay to allow SendProxyServer shutting down |
|
75 DELAY 3000 |
|
76 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
77 |
|
78 //****************************************** |
|
79 // Entry is a service entry. |
|
80 // Need WriteDeviceData to access the entry. |
|
81 //****************************************** |
|
82 |
|
83 PRINT Running EMsvDeleteAttachment : Read Caps = 0. Same SID. Should Fail. |
|
84 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
85 |
|
86 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
87 |
|
88 // First we need to set proxy to WriteDeviceData so we can create the attachment. |
|
89 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000020 -SID 101F7776 SendProxyServer.exe |
|
90 |
|
91 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateServiceEntry.script |
|
92 |
|
93 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
94 |
|
95 // Need delay to allow SendProxyServer shutting down |
|
96 DELAY 3000 |
|
97 |
|
98 // Next we need to set proxy to lesser capability so we can test deleting the attachment. |
|
99 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
100 |
|
101 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
102 |
|
103 // Need delay to allow SendProxyServer shutting down |
|
104 DELAY 3000 |
|
105 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
106 |
|
107 |
|
108 |
|
109 ////////////////////////////////////////// |
|
110 // **** Outbox tests (Protected folder) **** |
|
111 ////////////////////////////////////////// |
|
112 |
|
113 //****************************************** |
|
114 // Entry is in Outbox (protected folder). |
|
115 // Need ReadUserData + WriteUserData + NetworkServices to access the entry. |
|
116 //****************************************** |
|
117 |
|
118 PRINT Running EMsvDeleteAttachment : Read Caps = ReadUserData + WriteUserData + NetworkServices. Different SID. Should Pass. |
|
119 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
120 |
|
121 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
122 |
|
123 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0001a000 -SID 101F7776 SendProxyServer.exe |
|
124 |
|
125 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryOutbox.script |
|
126 |
|
127 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
128 |
|
129 // Need delay to allow SendProxyServer shutting down |
|
130 DELAY 3000 |
|
131 |
|
132 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Pass.script |
|
133 |
|
134 // Need delay to allow SendProxyServer shutting down |
|
135 DELAY 3000 |
|
136 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
137 |
|
138 //****************************************** |
|
139 // Entry is in Outbox (protected folder). |
|
140 // Need ReadUserData + WriteUserData + NetworkServices to access the entry. |
|
141 //****************************************** |
|
142 |
|
143 PRINT Running EMsvDeleteAttachment : Read Caps = ReadUserData + WriteUserData. Different SID. Should Fail. |
|
144 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
145 |
|
146 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
147 |
|
148 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0001e000 -SID 101F7776 SendProxyServer.exe |
|
149 |
|
150 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryOutbox.script |
|
151 |
|
152 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
153 |
|
154 // Need delay to allow SendProxyServer shutting down |
|
155 DELAY 3000 |
|
156 |
|
157 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00018000 -SID 101F7776 SendProxyServer.exe |
|
158 |
|
159 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
160 |
|
161 // Need delay to allow SendProxyServer shutting down |
|
162 DELAY 3000 |
|
163 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
164 |
|
165 //****************************************** |
|
166 // Entry is in Outbox (protected folder). |
|
167 // Need ReadUserData + WriteUserData + NetworkServices to access the entry. |
|
168 //****************************************** |
|
169 |
|
170 PRINT Running EMsvDeleteAttachment : Read Caps = ReadUserData + NetworkServices. Different SID. Should Fail. |
|
171 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
172 |
|
173 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
174 |
|
175 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0001e000 -SID 101F7776 SendProxyServer.exe |
|
176 |
|
177 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryOutbox.script |
|
178 |
|
179 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
180 |
|
181 // Need delay to allow SendProxyServer shutting down |
|
182 DELAY 3000 |
|
183 |
|
184 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0000a000 -SID 101F7776 SendProxyServer.exe |
|
185 |
|
186 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
187 |
|
188 // Need delay to allow SendProxyServer shutting down |
|
189 DELAY 3000 |
|
190 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
191 |
|
192 //****************************************** |
|
193 // Entry is in Outbox (protected folder). |
|
194 // Need ReadUserData + WriteUserData + NetworkServices to access the entry. |
|
195 //****************************************** |
|
196 |
|
197 PRINT Running EMsvDeleteAttachment : Read Caps = WriteUserData + NetworkServices. Different SID. Should Fail. |
|
198 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
199 |
|
200 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
201 |
|
202 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0001e000 -SID 101F7776 SendProxyServer.exe |
|
203 |
|
204 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryOutbox.script |
|
205 |
|
206 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
207 |
|
208 // Need delay to allow SendProxyServer shutting down |
|
209 DELAY 3000 |
|
210 |
|
211 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00012000 -SID 101F7776 SendProxyServer.exe |
|
212 |
|
213 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
214 |
|
215 // Need delay to allow SendProxyServer shutting down |
|
216 DELAY 3000 |
|
217 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
218 |
|
219 |
|
220 //****************************************** |
|
221 // Entry is in Outbox (protected folder). |
|
222 // Need ReadUserData + WriteUserData + NetworkServices to access the entry. |
|
223 //****************************************** |
|
224 |
|
225 PRINT Running EMsvDeleteAttachment : Read Caps = 0. Different SID. Should Fail. |
|
226 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
227 |
|
228 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
229 |
|
230 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0001e000 -SID 101F7776 SendProxyServer.exe |
|
231 |
|
232 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryOutbox.script |
|
233 |
|
234 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
235 |
|
236 // Need delay to allow SendProxyServer shutting down |
|
237 DELAY 3000 |
|
238 |
|
239 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
240 |
|
241 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
242 |
|
243 // Need delay to allow SendProxyServer shutting down |
|
244 DELAY 3000 |
|
245 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
246 |
|
247 |
|
248 |
|
249 ////////////////////////////////////////// |
|
250 // **** Unprotected folder tests **** |
|
251 ////////////////////////////////////////// |
|
252 |
|
253 //****************************************** |
|
254 // Entry is in unprotected folder and is not owned by us. |
|
255 // Need ReadUserData + WriteUserData to access the entry. |
|
256 //****************************************** |
|
257 |
|
258 PRINT Running EMsvDeleteAttachment : Read Caps = ReadUserData + WriteUserData. Different SID. Should Pass. |
|
259 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
260 |
|
261 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
262 |
|
263 // First we need to set proxy to same SID as test server, so we can create an entry we own with this SID. |
|
264 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
265 |
|
266 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInDrafts.script |
|
267 |
|
268 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
269 |
|
270 // Need delay to allow SendProxyServer shutting down |
|
271 DELAY 3000 |
|
272 |
|
273 // Now we try to delete the entry using a different SID and Read/WriteUserData |
|
274 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00018000 -SID 101F7777 SendProxyServer.exe |
|
275 |
|
276 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Pass.script |
|
277 |
|
278 // Need delay to allow SendProxyServer shutting down |
|
279 DELAY 3000 |
|
280 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
281 |
|
282 //****************************************** |
|
283 // Entry is in unprotected folder and is not owned by us. |
|
284 // Need ReadUserData + WriteUserData to access the entry. |
|
285 //****************************************** |
|
286 |
|
287 PRINT Running EMsvDeleteAttachment : Read Caps = ReadUserData. Different SID. Should Fail. |
|
288 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
289 |
|
290 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
291 |
|
292 // First we need to set proxy to same SID as test server, so we can create an entry we own with this SID. |
|
293 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
294 |
|
295 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInDrafts.script |
|
296 |
|
297 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
298 |
|
299 // Need delay to allow SendProxyServer shutting down |
|
300 DELAY 3000 |
|
301 |
|
302 // Now we try to delete the entry using a different SID and ReadUserData |
|
303 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00008000 -SID 101F7777 SendProxyServer.exe |
|
304 |
|
305 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
306 |
|
307 // Need delay to allow SendProxyServer shutting down |
|
308 DELAY 3000 |
|
309 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
310 |
|
311 //****************************************** |
|
312 // Entry is in unprotected folder and is not owned by us. |
|
313 // Need ReadUserData + WriteUserData to access the entry. |
|
314 //****************************************** |
|
315 |
|
316 PRINT Running EMsvDeleteAttachment : Read Caps = WriteUserData. Different SID. Should Fail. |
|
317 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
318 |
|
319 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
320 |
|
321 // First we need to set proxy to same SID as test server, so we can create an entry we own with this SID. |
|
322 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
323 |
|
324 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInDrafts.script |
|
325 |
|
326 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
327 |
|
328 // Need delay to allow SendProxyServer shutting down |
|
329 DELAY 3000 |
|
330 |
|
331 // Now we try to delete the entry using a different SID and WriteUserData |
|
332 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00010000 -SID 101F7777 SendProxyServer.exe |
|
333 |
|
334 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
335 |
|
336 // Need delay to allow SendProxyServer shutting down |
|
337 DELAY 3000 |
|
338 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
339 |
|
340 //****************************************** |
|
341 // Entry is in unprotected folder and is not owned by us. |
|
342 // Need ReadUserData + WriteUserData to access the entry. |
|
343 //****************************************** |
|
344 |
|
345 PRINT Running EMsvDeleteAttachment : Read Caps = 0. Different SID. Should Fail. |
|
346 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
347 |
|
348 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
349 |
|
350 // First we need to set proxy to same SID as test server, so we can create an entry we own with this SID. |
|
351 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
352 |
|
353 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInDrafts.script |
|
354 |
|
355 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
356 |
|
357 // Need delay to allow SendProxyServer shutting down |
|
358 DELAY 3000 |
|
359 |
|
360 // Now we try to delete the entry using a different SID and no capabilities |
|
361 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7777 SendProxyServer.exe |
|
362 |
|
363 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
364 |
|
365 // Need delay to allow SendProxyServer shutting down |
|
366 DELAY 3000 |
|
367 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
368 |
|
369 //****************************************** |
|
370 // Entry is in unprotected folder and is owned by us. |
|
371 // Need no capabilities to access the entry. |
|
372 //****************************************** |
|
373 |
|
374 PRINT Running EMsvDeleteAttachment : Read Caps = 0. Same SID. Should Pass. |
|
375 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
376 |
|
377 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
378 |
|
379 // First we need to set proxy to same SID as test server, so we can create an entry we own with this SID. |
|
380 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
381 |
|
382 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInDrafts.script |
|
383 |
|
384 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
385 |
|
386 // Need delay to allow SendProxyServer shutting down |
|
387 DELAY 3000 |
|
388 |
|
389 // Now we try to delete the entry using same SID and no capabilities |
|
390 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Pass.script |
|
391 |
|
392 // Need delay to allow SendProxyServer shutting down |
|
393 DELAY 3000 |
|
394 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
395 |
|
396 |
|
397 |
|
398 ////////////////////////////////////////// |
|
399 // **** Remote Service tests **** |
|
400 ////////////////////////////////////////// |
|
401 |
|
402 //****************************************** |
|
403 // Entry is in remote service. |
|
404 // Need ReadUserData + WriteUserData + MTM specific caps to access the entry. |
|
405 // We're using pigeon in this case which does not require any additional caps. |
|
406 //****************************************** |
|
407 |
|
408 PRINT Running EMsvDeleteAttachment : Read Caps = ReadUserData + WriteUserData. Same SID. Should Pass. |
|
409 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
410 |
|
411 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
412 |
|
413 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0001e000 -SID 101F7776 SendProxyServer.exe |
|
414 |
|
415 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateRemoteEntry.script |
|
416 |
|
417 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
418 |
|
419 // Need delay to allow SendProxyServer shutting down |
|
420 DELAY 3000 |
|
421 |
|
422 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Pass.script |
|
423 |
|
424 // Need delay to allow SendProxyServer shutting down |
|
425 DELAY 3000 |
|
426 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
427 |
|
428 //****************************************** |
|
429 // Entry is in remote service. |
|
430 // Need ReadUserData + WriteUserData + MTM specific caps to access the entry. |
|
431 // We're using pigeon in this case which does not require any additional caps. |
|
432 //****************************************** |
|
433 |
|
434 PRINT Running EMsvDeleteAttachment : Read Caps = ReadUserData. Same SID. Should Fail. |
|
435 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
436 |
|
437 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
438 |
|
439 // First we need to set proxy to enough caps to create the entry and attachment. |
|
440 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0003fffe -SID 101F7776 SendProxyServer.exe |
|
441 |
|
442 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateRemoteEntry.script |
|
443 |
|
444 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
445 |
|
446 // Need delay to allow SendProxyServer shutting down |
|
447 DELAY 3000 |
|
448 |
|
449 // Now we try to delete the entry using ReadUserData |
|
450 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00008000 -SID 101F7776 SendProxyServer.exe |
|
451 |
|
452 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
453 |
|
454 // Need delay to allow SendProxyServer shutting down |
|
455 DELAY 3000 |
|
456 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
457 |
|
458 //****************************************** |
|
459 // Entry is in remote service. |
|
460 // Need ReadUserData + WriteUserData + MTM specific caps to access the entry. |
|
461 // We're using pigeon in this case which does not require any additional caps. |
|
462 //****************************************** |
|
463 |
|
464 PRINT Running EMsvDeleteAttachment : Read Caps = WriteUserData. Same SID. Should Fail. |
|
465 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
466 |
|
467 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
468 |
|
469 // First we need to set proxy to enough caps to create the entry and attachment. |
|
470 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0003fffe -SID 101F7776 SendProxyServer.exe |
|
471 |
|
472 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateRemoteEntry.script |
|
473 |
|
474 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
475 |
|
476 // Need delay to allow SendProxyServer shutting down |
|
477 DELAY 3000 |
|
478 |
|
479 // Now we try to delete the entry using ReadUserData |
|
480 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00010000 -SID 101F7776 SendProxyServer.exe |
|
481 |
|
482 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
483 |
|
484 // Need delay to allow SendProxyServer shutting down |
|
485 DELAY 3000 |
|
486 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
487 |
|
488 //****************************************** |
|
489 // Entry is in remote service. |
|
490 // Need ReadUserData + WriteUserData + MTM specific caps to access the entry. |
|
491 // We're using pigeon in this case which does not require any additional caps. |
|
492 //****************************************** |
|
493 |
|
494 PRINT Running EMsvDeleteAttachment : Read Caps = 0. Same SID. Should Fail. |
|
495 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
496 |
|
497 RUN_PROGRAM -1 setcap MessagingTestServer_caps.exe 0003fffe -SID 101F7776 MessagingTestServer.exe |
|
498 |
|
499 // First we need to set proxy to enough caps to create the entry and attachment. |
|
500 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 0003fffe -SID 101F7776 SendProxyServer.exe |
|
501 |
|
502 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateRemoteEntry.script |
|
503 |
|
504 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCreateAttachmentForWrite_Pass.script |
|
505 |
|
506 // Need delay to allow SendProxyServer shutting down |
|
507 DELAY 3000 |
|
508 |
|
509 // Now we try to delete the entry using ReadUserData |
|
510 RUN_PROGRAM -1 setcap SendProxyServer_caps.exe 00000000 -SID 101F7776 SendProxyServer.exe |
|
511 |
|
512 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvDeleteAttachment_Fail.script |
|
513 |
|
514 DELAY 3000 |
|
515 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |