<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1015</bug_id>
          
          <creation_ts>2014-06-06 19:27:01 +0200</creation_ts>
          <short_desc>Windows IOUtil.getTempDir(..) Cannot determine executable temp directory</short_desc>
          <delta_ts>2014-12-12 01:35:30 +0100</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>865</dependson>
    
    <dependson>1108</dependson>
          <blocked>1103</blocked>
    
    <blocked>1109</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>askinner</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>9bc3d3f78bb2fb1aa0ccfb02ffb5bdda74420cac</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3943</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-06-06 19:27:01 +0200</bug_when>
    <thetext>On platform Window, we don&apos;t validate whether the temp dir 
for native libraries has executable-access.

On some systems, the TEMP dir only has write-access, 
but no executable-access.

IOUtil.getOSHasNoexecFS() for WINDOWS 
currently returns true, i.e. we don&apos;t check executable-access.
We need to return false to perform the check and offer a workaround,
maybe similar to Bug 865.

As is, non executable temp folder will result in an exception like:

+++

Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.UnsatisfiedLinkError: C:\Users\ram dhuley\AppData\Local\Temp\jogamp_0000\file_cache\jln7241190548013054463\jln8954501619229889979\gluegen-rt.dll: Access is denied

+++</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4129</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-08-28 07:01:52 +0200</bug_when>
    <thetext>Test executable permission on Windows via bat file 
(temp dir, like on unix and osx).
    
    Tested on Window 7 and Windows 8.1 using &apos;Using Software Restriction Policies&apos;,
    i.e. disabled sw-execution in TEMP dir.
    
    On Windows we need to add min. shell code, here &apos;echo off&apos;,
    allowing the bat file to be executed if policy allows it.
    
    Reminder: We test the following temp folder
    
    1) java.io.tmpdir/jogamp
    2) $XDG_CACHE_HOME/jogamp
    3) $TMPDIR/jogamp or $TEMP/jogamp
    4) $HOME/.jogamp
    
    +++
    
    Misc:
    
    Proper &apos;duplicate&apos; validation via &apos;file1.equals(file2)&apos; test
    using the abstract pathname.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4229</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-09-16 21:53:48 +0200</bug_when>
    <thetext>Software Restriction Policies
- http://technet.microsoft.com/en-us/library/hh831534.aspx

Software Restriction Policies Technical Overview
- http://technet.microsoft.com/en-us/library/hh994620.aspx

Administer Software Restriction Policies
- http://technet.microsoft.com/en-us/library/hh994606.aspx

On local machine (needs admin account, Win &gt;= 8 professional ?!)
  - http://technet.microsoft.com/en-us/library/hh994606.aspx#BKMK_1

  - Open Control Panel
  - Search and Open: Administrative Tools
  - Open: Local Security Policy
  - Open: Software Restriction Policies

Now create an additional rule, like:
  - Path Rule for C:\Temp\no-exec
  - Security level: Disallowed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4482</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-12-12 01:35:30 +0100</bug_when>
    <thetext>From &apos;noexec-option-on-ntfs-under-windows&apos; 
  &lt;http://serverfault.com/questions/90135/noexec-option-on-ntfs-under-windows&gt;

&quot;There is no analog to a &quot;noexec&quot; mount for filesystems in Windows. Microsoft&apos;s conception of the simple &quot;Read&quot; permission includes the right to execute (since execution really is just the loader reading the image into memory).

You can modify the &quot;Advanced&quot; version of the permission to remove (or deny) &quot;Traverse Folder / Execute File&quot; permission. This will prevent double-click or command-line execution of .EXE files. .BAT and .CMD files will not execute from a double-click in Explorer, but they will still execute from a command prompt or using the syntax &quot;CMD /c &quot; from Start / Run.&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>