projects
/
iot2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0338fae
)
Minor adjustments for Tomoyo for the fourth benchmark
author
rtrimana
<rtrimana@uci.edu>
Mon, 16 Oct 2017 19:02:51 +0000
(12:02 -0700)
committer
rtrimana
<rtrimana@uci.edu>
Mon, 16 Oct 2017 19:02:51 +0000
(12:02 -0700)
benchmarks/Java/HomeSecurityController/HomeSecurityController.java
patch
|
blob
|
history
iotjava/iotruntime/master/IoTMaster.java
patch
|
blob
|
history
iotjava/iotruntime/master/ProcessJailConfig.java
patch
|
blob
|
history
localconfig/tomoyo/Java.tomoyo.pol
patch
|
blob
|
history
diff --git
a/benchmarks/Java/HomeSecurityController/HomeSecurityController.java
b/benchmarks/Java/HomeSecurityController/HomeSecurityController.java
index
6615f83
..
3b7cf53
100644
(file)
--- a/
benchmarks/Java/HomeSecurityController/HomeSecurityController.java
+++ b/
benchmarks/Java/HomeSecurityController/HomeSecurityController.java
@@
-252,8
+252,10
@@
public class HomeSecurityController implements SmartthingsSensorCallback, Smartt
System.out.println("DEBUG: Initialized smartthings sensor! ID: " + sensorId + " Room ID: " + rm.getRoomID());
senDetectStatus.put(sensorId, false);
System.out.println("DEBUG: Initialized sensor detection to false!");
System.out.println("DEBUG: Initialized smartthings sensor! ID: " + sensorId + " Room ID: " + rm.getRoomID());
senDetectStatus.put(sensorId, false);
System.out.println("DEBUG: Initialized sensor detection to false!");
+ System.out.println("DEBUG: Now sensor ID is being set!");
// Initialize IoTCloud
sen.setId(sensorId++);
// Initialize IoTCloud
sen.setId(sensorId++);
+ System.out.println("DEBUG: Set sensor ID to: " + sensorId + "!");
sen.registerCallback(this);
System.out.println("DEBUG: Registered sensor callback!");
} catch (Exception e) {
sen.registerCallback(this);
System.out.println("DEBUG: Registered sensor callback!");
} catch (Exception e) {
diff --git
a/iotjava/iotruntime/master/IoTMaster.java
b/iotjava/iotruntime/master/IoTMaster.java
index
f3bae94
..
6643eee
100644
(file)
--- a/
iotjava/iotruntime/master/IoTMaster.java
+++ b/
iotjava/iotruntime/master/IoTMaster.java
@@
-779,9
+779,9
@@
public final class IoTMaster {
// Setting up router policies for HTTP/HTTPs
if (STR_ACTIVATE_SANDBOXING.equals("Yes")) {
if (strControllerName != null) {
// Setting up router policies for HTTP/HTTPs
if (STR_ACTIVATE_SANDBOXING.equals("Yes")) {
if (strControllerName != null) {
- processJailConfig.configureProcessJailInetAddressPolicies(strControllerName, strAddress);
+ processJailConfig.configureProcessJailInetAddressPolicies(strControllerName,
STR_ROUTER_ADD,
strAddress);
} else {
} else {
- processJailConfig.configureProcessJailInetAddressPolicies(strHostAddress, strAddress);
+ processJailConfig.configureProcessJailInetAddressPolicies(strHostAddress,
STR_ROUTER_ADD,
strAddress);
}
}
routerConfig.configureRouterHTTPPolicies(STR_ROUTER_ADD, strHostAddress, strAddress);
}
}
routerConfig.configureRouterHTTPPolicies(STR_ROUTER_ADD, strHostAddress, strAddress);
diff --git
a/iotjava/iotruntime/master/ProcessJailConfig.java
b/iotjava/iotruntime/master/ProcessJailConfig.java
index
4781fbd
..
757313a
100644
(file)
--- a/
iotjava/iotruntime/master/ProcessJailConfig.java
+++ b/
iotjava/iotruntime/master/ProcessJailConfig.java
@@
-344,10
+344,14
@@
public final class ProcessJailConfig {
* @param strAddress String device IP address
* @return void
*/
* @param strAddress String device IP address
* @return void
*/
- public void configureProcessJailInetAddressPolicies(String strConfigHost, String strAddress) {
+ public void configureProcessJailInetAddressPolicies(String strConfigHost, String str
RouterAddress, String str
Address) {
PrintWriter pwConfig = getPrintWriter(strConfigHost);
//System.out.println("\n\nDEBUG: Writing the config host address setup!!!\n\n");
PrintWriter pwConfig = getPrintWriter(strConfigHost);
//System.out.println("\n\nDEBUG: Writing the config host address setup!!!\n\n");
+ pwConfig.println("file read /etc/resolv.conf");
+ pwConfig.println("file read /etc/hosts");
+ pwConfig.println("file read /etc/host.conf");
+ pwConfig.println("network inet dgram send " + strRouterAddress + " " + String.valueOf(53)); // TCP/UDP access through router
pwConfig.println("network inet stream connect ::ffff:" + strAddress + " " + String.valueOf(80)); // HTTP access for this address
}
pwConfig.println("network inet stream connect ::ffff:" + strAddress + " " + String.valueOf(80)); // HTTP access for this address
}
diff --git
a/localconfig/tomoyo/Java.tomoyo.pol
b/localconfig/tomoyo/Java.tomoyo.pol
index
b916747
..
c58214c
100644
(file)
--- a/
localconfig/tomoyo/Java.tomoyo.pol
+++ b/
localconfig/tomoyo/Java.tomoyo.pol
@@
-44,6
+44,7
@@
network inet stream connect ::ffff:<master-ip-address> <master-com-port>
file read /home/iotuser/iot2/iotjava/iotruntime/master/\*.class
file read /home/iotuser/iot2/iotjava/iotruntime/messages/\*.class
file read /home/iotuser/iot2/iotjava/iotruntime/zigbee/\*.class
file read /home/iotuser/iot2/iotjava/iotruntime/master/\*.class
file read /home/iotuser/iot2/iotjava/iotruntime/messages/\*.class
file read /home/iotuser/iot2/iotjava/iotruntime/zigbee/\*.class
+file read /home/iotuser/iot2/iotjava/iotcloud/\*.class
file read /home/iotuser/iot2/iotjava/iotruntime/resources/\*.csv
file read /home/iotuser/iot2/iotjava/iotruntime/music/\*.mp3
file read /dev/random
file read /home/iotuser/iot2/iotjava/iotruntime/resources/\*.csv
file read /home/iotuser/iot2/iotjava/iotruntime/music/\*.mp3
file read /dev/random
@@
-52,6
+53,7
@@
file create /home/iotuser/iot2/iotjava/iotruntime/<object-class-name>.jar 0666
file read/write /home/iotuser/iot2/iotjava/iotruntime/<object-class-name>.jar
file read /home/iotuser/iot2/iotjava/iotrmi/Java/\*.class
file ioctl socket:[family=10:type=1:protocol=6] 0x541B
file read/write /home/iotuser/iot2/iotjava/iotruntime/<object-class-name>.jar
file read /home/iotuser/iot2/iotjava/iotrmi/Java/\*.class
file ioctl socket:[family=10:type=1:protocol=6] 0x541B
+file ioctl socket:[family=2:type=2:protocol=17] 0x541B
file read /home/iotuser/iot2/iotjava/iotruntime/\*.class
file read /usr/share/locale/en_GB/LC_MESSAGES/libc.mo
file create /tmp/imageio\*.tmp 0600
file read /home/iotuser/iot2/iotjava/iotruntime/\*.class
file read /usr/share/locale/en_GB/LC_MESSAGES/libc.mo
file create /tmp/imageio\*.tmp 0600