Sandboxing
1
Sandboxing 1 logistics CHALLENGE assignment take-home portion of - - PowerPoint PPT Presentation
Sandboxing 1 logistics CHALLENGE assignment take-home portion of the fjnal next class fjnal exam review 2 CHALLENGE (1) expect to release before Saturday; due by written fjnal probably complete all but two fjve of seven or four of
1
2
3
4
5
6
7
8
9
9
10
tracking code has callbacks to third-party
11
12
12
13
14
14
14
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* dangerous video decoder to isolate */ int main() { /* switch to right user */ SetUserTo("user-without-privileges")); while (fread(videoData, sizeof(videoData), 1, stdin) > 0) { doDangerousVideoDecoding(videoData, imageData); fwrite(imageData, sizeof(imageData), 1, stdout); } } /* code that uses it */ FILE *fh = RunProgramAndGetFileHandle("./video-decoder"); for (;;) { fwrite(getNextVideoData(), SIZE, 1, fh); fread(image, sizeof(image), 1, fh); displayImage(image); } 29
30
31
32
33
34
35
36
(using shared memory for speed)
37
(using shared memory for speed)
37
(using shared memory for speed)
37
(using shared memory for speed)
37
(using shared memory for speed)
37
38
39
40
41
42
43
44
45
46
46
47
48
49
50
51
52
53
54
55
56