Hi wine community,<br><br>I took some time for reflexion following the thread &quot;A step in the wrong direction, in an ocean of steps in the right direction&quot; and to the <br>explanations some of you kindly exposed to me.<br>
<br>As a follow-up I am making a proposal.<br><br>A - The proposal<br><br>&nbsp; A1 - The core proposal<br><br>&nbsp;&nbsp;&nbsp;&nbsp; All function callable from outside wine should implement, as the first task they perform(1), a sanity parameter check. This check <br>
&nbsp;&nbsp;&nbsp;&nbsp; hasn&#39;t to be systematic, only really used parameters should be checked and only checks assuring those parameters can be safely used <br>&nbsp;&nbsp;&nbsp;&nbsp; the way they are in the function implementation (or in a function called by it). Other check are superfluous and must be discarded.<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp; So to decline the proposal operationally, I will take an example(2) :<br><br>&nbsp;&nbsp;&nbsp;&nbsp; BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped, [...])<br><br>&nbsp;&nbsp;&nbsp;&nbsp; if ( lpOverlapped == NULL )<br>&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #Call the function ExitWineCleanlyAndAdvertiseUser<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; This call being justified by the statement, following some lines later : status = lpOverlapped-&gt;Internal;<br><br><br>&nbsp;&nbsp;&nbsp; The function ExitWineCleanlyAndAdvertiseUser being something like that :<br>
<br>&nbsp;&nbsp;&nbsp; &lt;Result to be determined&gt; ExitWineCleanlyAndAdvertiseUser &lt;Parameters to be determined&gt;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #1 - Advertise user outputting a message, for example : &quot;The application you used present a defect. Using it directly expose you to some <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; security issue and indirectly expose others users to some other security issue.&quot;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #2 - Cleanly release all still allocated resources<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #3 - Cleanly exit wine<br><br><br>&nbsp; A2 - offering flexibility<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp; As I have understood that wine community is willing to be able to run all applications written for a Windows platform,<br>&nbsp;&nbsp;&nbsp;&nbsp; even those relying on the worse behaviours of windows, I will propose too to add a registry key for the purpose of enabling / disabling <br>
&nbsp;&nbsp;&nbsp;&nbsp; wine &quot;safe&quot; mode.<br>&nbsp;&nbsp;&nbsp;&nbsp; In this case it would make sense that &quot;safe&quot; mode is the default, with possibility to fall-back to &quot;unsafe&quot; mode when needed. <br><br>B - Advantages / Drawbacks to the proposal<br>
&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Drawback of this solution I can think of are :<br>&nbsp;&nbsp;&nbsp; 1 - It is contrary to the current consensus<br>&nbsp;&nbsp;&nbsp; 2 - It implies a lot of work (even if this can be done bit by bit over a long period time, direction is what matters here)<br>
&nbsp;&nbsp;&nbsp; 3 - Detailed implementation of what I presented may very well not be as simple as I imagine, or even impossible<br>&nbsp;&nbsp;&nbsp; 4 - Maybe all the reasons have not been expressed in the previous thread, thus not considered here<br>
&nbsp;&nbsp;&nbsp; 5 - It can go against the interest of the author of those apps relying on Windows&#39;s bad behaviors (large firms for example)<br>&nbsp;&nbsp;&nbsp; 6 - It doesn&#39;t cover all security issue in wine and it doesn&#39;t cover at all security issue in the calling app<br>
&nbsp;&nbsp;&nbsp; 7 - Performance drop-down may be expected (0,01%, 0,1%, 1%, more ? I don&#39;t know how to evaluate)<br><br>&nbsp;&nbsp;&nbsp; Advantage of this solution I can think of are :<br>&nbsp;&nbsp;&nbsp; 1 - Top-notch level of service to user : I can be informed when I use an unsafe software !<br>
&nbsp;&nbsp;&nbsp; 2 - Encouragement to software industry : I must provide some clean and safe software or wine can judge me &quot;unsafe&quot; (=promoting &quot;best-practices&quot;)<br>&nbsp;&nbsp;&nbsp; 3 - Wine is better from it, so people will have a better opinion of wine<br>
&nbsp;&nbsp;&nbsp; 4 - Goal reached by wine are far beyond &quot;Windows behaviours on free-OS platform&quot;<br>&nbsp;&nbsp;&nbsp; 5 - Wine is safer so more people will want to use it and to promote its usage<br><br><br>I think I will go no further than this proposal, so I leave the rest to you, from simply ignoring it to demonstrate me than I&#39;m wrong or applying a variation,<br>
Guillaume<br><br>(1) TRACE, variable declaration or other task may come before though<br>(2) Please don&#39;t argue about the coding style, I am not a technical expert (unlike you) and it would be off-topic<br>