]> cvs.zerfleddert.de Git - rsbs2/blobdiff - rsbs2.pl
use policy-file for applet to allow remote-storage
[rsbs2] / rsbs2.pl
index cb0534a5605c4ea6f7e888a6f4e488c69929339e..c835c0dd109f2d1635cf08657687854b57885c0a 100755 (executable)
--- a/rsbs2.pl
+++ b/rsbs2.pl
@@ -385,7 +385,7 @@ sub get_sensors {
                return;
        }
 
-       my $req = '<REQ CMD="sensorpropget"><HANDLE>0x1</HANDLE><SENSORLIST>';
+       my $req = '<REQ CMD="sensorpropget"><HANDLE>'.$slist->{HANDLE}.'</HANDLE><SENSORLIST>';
        foreach my $s (@{$slist->{SENSORLIST}->{SENSOR}}) {
                $req .= '<SENSOR KEY="'.$s->{KEY}.'"/>';
        }
@@ -477,7 +477,7 @@ sub status {
 
 sub spawn_gui {
        my $base = shift;
-       open(APPLET,"|appletviewer /dev/stdin");
+       open(APPLET,"|appletviewer -J-Djava.security.policy=applet.policy /dev/stdin");
        print APPLET '<HTML><HEAD><TITLE>RSB S2 User Interface</TITLE></HEAD>';
        print APPLET '<BODY>';
        print APPLET '<object width="640" height="480">';
@@ -689,7 +689,18 @@ my $host = ${$Config{$hostalias}}{"host"};
 $poweronms = ${$Config{$hostalias}}{"poweronms"} if (defined(${$Config{$hostalias}}{"poweronms"}));
 $poweroffms = ${$Config{$hostalias}}{"poweroffms"} if (defined(${$Config{$hostalias}}{"poweroffms"}));
 
-$url = "http://${host}";
+my $ssl = ${$Config{$hostalias}}{"ssl"};
+my $port = ${$Config{$hostalias}}{"port"};
+
+if (defined($ssl) && (lc($ssl) eq 'yes')) {
+       $ENV{HTTPS_DEBUG} = 1;
+       $ENV{HTTPS_VERSION} = 3;
+       $port = 443 if (!defined($port));
+       $url = "https://${host}:${port}";
+} else {
+       $port = 80 if (!defined($port));
+       $url = "http://${host}:${port}";
+}
 
 if ($gui) {
        spawn_gui($url);
Impressum, Datenschutz