Minor adjustments for Tomoyo for the fourth benchmark
authorrtrimana <rtrimana@uci.edu>
Mon, 16 Oct 2017 19:02:51 +0000 (12:02 -0700)
committerrtrimana <rtrimana@uci.edu>
Mon, 16 Oct 2017 19:02:51 +0000 (12:02 -0700)
benchmarks/Java/HomeSecurityController/HomeSecurityController.java
iotjava/iotruntime/master/IoTMaster.java
iotjava/iotruntime/master/ProcessJailConfig.java
localconfig/tomoyo/Java.tomoyo.pol

index 6615f8313e2208816f11a4a26c58d078818aeb06..3b7cf539640af43d5b9264b2c513edadc29602e2 100644 (file)
@@ -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) {
index f3bae940be1f79c0e3f50174d26ddae787d6383d..6643eee2e7976cf784e4999e550457acc9eeeab2 100644 (file)
@@ -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);
index 4781fbd38753c2462e7807bbf251fd386210c3b4..757313a486ca70eb7891ae26de5a35bbdc1ff161 100644 (file)
@@ -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 strRouterAddress, String strAddress) {
 
                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
        }
 
index b91674794dab043524a65a5611223f693472338f..c58214c365eae20a692205b3a79a88d204a3c6d9 100644 (file)
@@ -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