intellimate / Izou

A home automation API for the Raspberry Pi in java. javadoc: http://intellimate.github.io/Izou/apidocs/overview-summary.html
Other
5 stars 0 forks source link

izou is failing #32

Closed LeanderK closed 9 years ago

LeanderK commented 9 years ago

I don't have any plugins installed, why is it sending an email??? output:

2015-05-14 13:03:12,225 DEBUG [main] org.intellimate.izou.main.Main (Main.java:87) - starting izou
2015-05-14 13:03:12,236 DEBUG [main] org.intellimate.izou.main.Main (Main.java:88) - initializing
2015-05-14 13:03:12,953 DEBUG [main] org.intellimate.izou.support.SystemMail (SystemMail.java:70) - Sending mail...
DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException: /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib/javamail.providers (No such file or directory)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib/javamail.address.map (No such file or directory)
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL false
220 mx.google.com ESMTP l6sm38095879wjz.4 - gsmtp
DEBUG SMTP: connected to host "smtp.gmail.com", port: 465

EHLO raspberrypi
250-mx.google.com at your service, [46.223.128.122]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
DEBUG SMTP: Found extension "SIZE", arg "35882577"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "SMTPUTF8", arg ""
DEBUG SMTP: Attempt to authenticate
AUTH LOGIN
334 VXNlcm5hbWU6
aW50ZWxsaW1hdGUuaXpvdUBnbWFpbC5jb20=
334 UGFzc3dvcmQ6
S2FybHNrcm9uZQ==
235 2.7.0 Accepted
DEBUG SMTP: use8bit false
MAIL FROM:<intellimate.izou@gmail.com>
250 2.1.0 OK l6sm38095879wjz.4 - gsmtp
RCPT TO:<intellimate.izou@gmail.com>
250 2.1.5 OK l6sm38095879wjz.4 - gsmtp
DEBUG SMTP: Verified Addresses
DEBUG SMTP:   intellimate.izou@gmail.com
DATA
354  Go ahead l6sm38095879wjz.4 - gsmtp
From: intellimate.izou@gmail.com
To: intellimate.izou@gmail.com
Message-ID: <22366982.01431608593318.JavaMail.pi@raspberrypi>
Subject: Izou Security Exception: Access denied to
 /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib/arm/libnio.so
MIME-Version: 1.0
Content-Type: multipart/mixed; 
    boundary="----=_Part_0_11834534.1431608593175"

------=_Part_0_11834534.1431608593175
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

An attempted security breach was discovered in Izou: 

EXCEPTION: 

Access denied to /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib/arm/libnio.so
org.intellimate.izou.security.SecurityManager.throwException(SecurityManager.java:363)
org.intellimate.izou.security.SecurityManager.checkRead(SecurityManager.java:449)
java.io.File.exists(File.java:814)
java.lang.ClassLoader$3.run(ClassLoader.java:1868)
java.security.AccessController.doPrivileged(Native Method)
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1865)
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1835)
java.lang.Runtime.loadLibrary0(Runtime.java:870)
java.lang.System.loadLibrary(System.java:1119)
sun.nio.fs.LinuxWatchService$1.run(LinuxWatchService.java:462)
sun.nio.fs.LinuxWatchService$1.run(LinuxWatchService.java:460)
java.security.AccessController.doPrivileged(Native Method)
sun.nio.fs.LinuxWatchService.<clinit>(LinuxWatchService.java:460)
sun.nio.fs.LinuxFileSystem.newWatchService(LinuxFileSystem.java:47)
org.intellimate.izou.system.file.FileManager.<init>(FileManager.java:42)
org.intellimate.izou.main.Main.<init>(Main.java:158)
org.intellimate.izou.main.Main.<init>(Main.java:57)
org.intellimate.izou.main.Main.main(Main.java:185)

CLASS STACK:

Class 0: 
class org.intellimate.izou.security.SecurityManager
Class Loader 0: 
sun.misc.Launcher$AppClassLoader@a57993
Class 1: 
class org.intellimate.izou.security.SecurityManager
Class Loader 1: 
sun.misc.Launcher$AppClassLoader@a57993
Class 2: 
class java.io.File
Class Loader 2: 
null
Class 3: 
class java.lang.ClassLoader$3
Class Loader 3: 
null
Class 4: 
class java.lang.ClassLoader
Class Loader 4: 
null
Class 5: 
class java.lang.ClassLoader
Class Loader 5: 
null
Class 6: 
class java.lang.Runtime
Class Loader 6: 
null
Class 7: 
class java.lang.System
Class Loader 7: 
null
Class 8: 
class sun.nio.fs.LinuxWatchService$1
Class Loader 8: 
null
Class 9: 
class sun.nio.fs.LinuxWatchService$1
Class Loader 9: 
null
Class 10: 
class sun.nio.fs.LinuxWatchService
Class Loader 10: 
null
Class 11: 
class sun.nio.fs.LinuxFileSystem
Class Loader 11: 
null
Class 12: 
class org.intellimate.izou.system.file.FileManager
Class Loader 12: 
sun.misc.Launcher$AppClassLoader@a57993
Class 13: 
class org.intellimate.izou.main.Main
Class Loader 13: 
sun.misc.Launcher$AppClassLoader@a57993
Class 14: 
class org.intellimate.izou.main.Main
Class Loader 14: 
sun.misc.Launcher$AppClassLoader@a57993
Class 15: 
class org.intellimate.izou.main.Main
Class Loader 15: 
sun.misc.Launcher$AppClassLoader@a57993

------=_Part_0_11834534.1431608593175
Content-Type: application/octet-stream; name=org.intellimate.izou.log
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=org.intellimate.izou.log

2015-05-14 13:03:12,225 DEBUG [main] org.intellimate.izou.main.Main (Main.java:87) - starting izou
2015-05-14 13:03:12,236 DEBUG [main] org.intellimate.izou.main.Main (Main.java:88) - initializing
2015-05-14 13:03:12,953 DEBUG [main] org.intellimate.izou.support.SystemMail (SystemMail.java:70) - Sending mail...

------=_Part_0_11834534.1431608593175--

.
250 2.0.0 OK 1431608598 l6sm38095879wjz.4 - gsmtp
QUIT
221 2.0.0 closing connection l6sm38095879wjz.4 - gsmtp
2015-05-14 13:03:18,251 DEBUG [main] org.intellimate.izou.support.SystemMail (SystemMail.java:121) - Mail sent successfully.
Exception in thread "main" java.lang.ExceptionInInitializerError
    at sun.nio.fs.LinuxFileSystem.newWatchService(LinuxFileSystem.java:47)
    at org.intellimate.izou.system.file.FileManager.<init>(FileManager.java:42)
    at org.intellimate.izou.main.Main.<init>(Main.java:158)
    at org.intellimate.izou.main.Main.<init>(Main.java:57)
    at org.intellimate.izou.main.Main.main(Main.java:185)
Caused by: java.lang.SecurityException: Access denied to /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib/arm/libnio.so
    at org.intellimate.izou.security.SecurityManager.throwException(SecurityManager.java:363)
    at org.intellimate.izou.security.SecurityManager.checkRead(SecurityManager.java:449)
    at java.io.File.exists(File.java:814)
    at java.lang.ClassLoader$3.run(ClassLoader.java:1868)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1865)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1835)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1119)
    at sun.nio.fs.LinuxWatchService$1.run(LinuxWatchService.java:462)
    at sun.nio.fs.LinuxWatchService$1.run(LinuxWatchService.java:460)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.nio.fs.LinuxWatchService.<clinit>(LinuxWatchService.java:460)
    ... 5 more
LeanderK commented 9 years ago

log files:

2015-05-14 13:03:12,225 DEBUG [main] org.intellimate.izou.main.Main (Main.java:87) - starting izou
2015-05-14 13:03:12,236 DEBUG [main] org.intellimate.izou.main.Main (Main.java:88) - initializing
2015-05-14 13:03:12,953 DEBUG [main] org.intellimate.izou.support.SystemMail (SystemMail.java:70) - Sending mail...
2015-05-14 13:03:18,251 DEBUG [main] org.intellimate.izou.support.SystemMail (SystemMail.java:121) - Mail sent successfully.
LeanderK commented 9 years ago

also: isSSL false i don't think we want that for privacy reasons

LeanderK commented 9 years ago

ok, there is the issue, that /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/jre/lib/arm/libnio.so is not give access to. But i would reduce the number of console-prints.

jundl77 commented 9 years ago

I did not allow .so (native) files, try making this change: https://github.com/intellimate/Izou/commit/89b51d602f1b9b0003387ad30b56b34750e87609

LeanderK commented 9 years ago

i don't understand the architecture......why just not allow ready the ire part of the idk?

LeanderK commented 9 years ago

ok, i'll try it

LeanderK commented 9 years ago

didn't work because stupid regex is confusing ;) fixed it