WatchService use for jnlp on OS X
Michael Hall
mik3hall at gmail.com
Sun Feb 16 18:17:48 PST 2014
Not sure if I am correctly set up for this list but...
I recently was made aware that the Safari browser on OS X is handling jnlp files by dumping them into the temp directory and doing nothing else with them.
I was thinking you might set up a WatchService on the temp directory from a background running java task.
Then move the file somewhere else and launch it with javaws.
Obviously, this is still not an ideal solution since the code would have to be installed and ensured running when the jnlp file is downloaded.
This is also obviously counter to Apple's current preference for handling these files, would there be anyone who would agree with them that these files should be treated as quite so toxic?
I have just verified that the temporary directory Safari uses appears to be one and the same as the java.io.tmpdir
exec ls -l $java.io.tmpdir
total 65120
...
-rw-rw-rw-@ 1 mjh staff 550 Nov 15 2012 blackjack.jnlp
…
So it seems to me this would be writeable.
Am I missing some major security hole?
Michael Hall
trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz
HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe
AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20140216/5cc62408/attachment.html
More information about the nio-discuss
mailing list