<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Parallel Interface &#187; Other technical</title>
	<atom:link href="http://www.paralint.com/blog/category/other-technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paralint.com/blog</link>
	<description>Programming security in Java and C++, one line at a time</description>
	<lastBuildDate>Thu, 26 Aug 2010 17:24:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Porting a custom Gina to a Credential provider</title>
		<link>http://www.paralint.com/blog/2009/02/24/porting-a-custom-gina-to-a-credential-provider/</link>
		<comments>http://www.paralint.com/blog/2009/02/24/porting-a-custom-gina-to-a-credential-provider/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 02:27:36 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Other technical]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=108</guid>
		<description><![CDATA[Making a replacement Gina behave like a Credential Provider (not the other way around) looks like the ticket to have a single source solution to a Gina and Credential Provider.]]></description>
			<content:encoded><![CDATA[<p>I am still amazed by the popularity of <a title="Any user can unlock now with this replacement Gina" href="/projects/aucun/">my replacement Gina</a> (it allows any user to unlock). Most users are quite happy using it with Windows XP and Server 2003, but I do get the occasionnal request for a Vista port. I am looking forward to doing it, but there are important desing changes that I must work with. I think I found a way to have a single source solution Gina and Credential Provider, with a clean architecture on any Windows version.</p>
<p><span id="more-108"></span>Credential Providers cannot make an authentication decision. They only collect credentials. The approach I took in &#8220;Aucun&#8221; is that the Gina actually makes the authentication decision. That will not work under the new Credential provider architecture.</p>
<p>When I started looking to port my Gina to a Credential Provider, I first though of saving the initial credentials (when the first user logs on), then check any other user&#8217;s credential in my own Credential Provider, and if all is good, replay the initial credentials.</p>
<p>That bothered on many grounds :</p>
<ul>
<li>There will be a unlock event logged to the initial user, although that user never unlocked the workstation</li>
<li>I don&#8217;t like saving passwords, even to encrypted memory</li>
<li>That architecture didn&#8217;t look like something that would last</li>
</ul>
<p>Looking deeper into the Credential Provider interface, I saw that there is one decision a Credential Provider <span style="text-decoration: underline;">can</span> make. It can select what Authentication Package will honor the logon request (or unlock request, in my case). That takes place in my (your) <a href="http://msdn.microsoft.com/en-us/library/bb776026(VS.85).aspx">ICredentialProviderCredential::GetSerialisation</a>, by setting the ulAuthenticationPackage field of the <a href="http://msdn.microsoft.com/en-us/library/bb773242(VS.85).aspx">CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION</a> structure.</p>
<p>So I believe the right way of doing this is to have two components :</p>
<ol>
<li>An authentication package that implements the unlock policy (any user can unlock, depending on group membership).</li>
<li>A credential provider that collects credentials (and while you&#8217;re at it, the session you want to unlock) and instruct winlogon to forward them the &#8220;unlock&#8221; authentication package.</li>
</ol>
<p>That architecture fixes all three points above. And as a bonus, I can greatly simplify my existing Gina by merely collecting the credentials and forward them to the same authentication package. No need to hook dialog procedures and sending magic, reversed engineered constants to winlogon. In short, instead of making the Credential Provider look like a Gina, I make the Gina behave like a Credential Provider.</p>
<p>Authentication packages are the same under Vista and XP, that&#8217;s a good thing. But to <a href="http://blogs.msdn.com/alejacma/archive/2007/11/13/how-to-debug-lsass-exe-process.aspx">debug them</a>, you need the scary kernel remote debugging tools. You also need to reboot every time you mess up. But I have a working authentication package from CVS NT code source, and another called <a href="http://www.cse.unsw.edu.au/~matthewc/">YPAuth</a> (YP means yellow pages, the <a href="http://en.wikipedia.org/wiki/Network_Information_Service">old name of NIS</a>). None of them support the unlock scenario, though&#8230;</p>
<p>Stay tuned !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/02/24/porting-a-custom-gina-to-a-credential-provider/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Segmentation example in a CAPTCHA</title>
		<link>http://www.paralint.com/blog/2009/02/09/segmentation-example-in-a-captcha/</link>
		<comments>http://www.paralint.com/blog/2009/02/09/segmentation-example-in-a-captcha/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:34:36 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Other technical]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=99</guid>
		<description><![CDATA[From time to time, I come across an application whose designers need &#8211; or think they need &#8211; a CAPTCHA. I stay convinced that CAPTCHA are to be avoided. This post just goes to show the effect of segmentation on optical character recognition (OCR). If you read about artificial intelligence and character recognition, you will [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time, I come across an application whose designers need &#8211; or think they need &#8211; a CAPTCHA. I stay convinced that CAPTCHA are to be avoided. This post just goes to show the effect of segmentation on optical character recognition (OCR).<br id="dqwm" /> <br id="dqwm0" /> If you read about artificial intelligence and character recognition, you will hear that there are references to segmentation. In short, segmentation is separating the letters from each other, before trying to guess what letters are there.<br id="sw8i" /> <br id="sw8i0" /> Segmentation is the &#8220;hard&#8221; part in solving a text based CAPTCHA, background noise and colors are the easy part. As a rule of thumb, if the letters of your CAPTCHA do not touch each other, your CAPTCHA is weak.<br id="h.ck" /></p>
<p>Here is an example. With a stock build of <a id="wsc:" title="GNU Ocrad homepage" href="http://www.gnu.org/software/ocrad/ocrad.html">ocrad</a>, I have tried to get the text from the same image, with one or two lines over the text.<br id="wlf85" /></p>
<div id="wlf86">
<table id="j3z3" class="zeroBorder" border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#ffffff">
<tbody id="wlf87">
<tr id="wlf88">
<td id="wlf89" width="33%"><img class="aligncenter size-full wp-image-100" title="banane" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/banane.gif" alt="banane" width="175" height="66" /></td>
<td id="wlf811" width="33%"><img class="aligncenter size-full wp-image-102" title="banane-11" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/banane-11.gif" alt="banane-11" width="175" height="66" /><br id="wlf813" /></td>
<td id="wlf814" width="33%"><img class="aligncenter size-full wp-image-104" title="banane-21" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/banane-21.gif" alt="banane-21" width="175" height="66" /><br id="wlf816" /></td>
</tr>
<tr id="wlf817">
<td id="wlf818" width="33%">$ ocrad -v banane.pbm<br id="zjxe" /> processing file &#8216;banane.pbm&#8217;<br id="wq54" /> file type is P4<br id="wlf819" /> file size is 175w x 66h<br id="wlf820" /> number of text blocks = 1<br id="wlf821" /> <strong>BANANE</strong><br id="wlf824" /></td>
<td id="wlf825" width="33%">$ ocrad -v banane-1.pbm<br id="zjxe0" /> processing file &#8216;banane-1.pbm&#8217;<br id="wq540" /> file type is P4<br id="wlf826" /> file size is 175w x 66h<br id="wlf827" /> number of text blocks = 1<br id="wlf828" /> <strong>_ANE</strong><br id="wlf831" /></td>
<td id="wlf832" width="33%">$ ocrad -v banane-2.pbm<br id="zjxe1" /> processing file `banane-2.pbm&#8217;<br id="wq541" /> file type is P4<br id="wlf833" /> file size is 175w x 66h<br id="wlf834" /> number of text blocks = 1<br id="wlf835" /> <br id="wlf838" /></td>
</tr>
</tbody>
</table>
</div>
<p>The text goes from 100% to 0% percent recognition just by adding two lines ! The word BANANE, then _ANE and after that &#8230; nothing !</p>
<p>This CAPTCHA is by no means robust, and I stay convinced that all forms of CAPTCHA are to be avoided. This example just goes to show the effect of segmentation on optical character recognition (OCR).<br id="cen70" /> <br id="colh" /> After all, artificial intelligence is a field of expertise you can spend your life learning. Just like cryptography, it should not be done by amateurs. But unlike cryptography, an AI challenge has no key. <a id="x3.7" title="Analysis of the breaking of Microsoft Live's CAPTCHA" href="http://www.websense.com/securitylabs/blog/blog.php?BlogID=171">Microsoft</a> and <a id="wfix" title="An analysis of the breaking of Google's CAPTCHA" href="http://www.websense.com/securitylabs/blog/blog.php?BlogID=174" target="_blank">Google</a>&#8216;s CAPTCHA have been broken. Your CAPTCHA will be broken too, it someones takes a shot at it. It is a matter of time, and there is a shorter way than brute force.<br id="accc" /> <br id="accc0" /> If you think you must put a CAPTCHA, start thinking about plan B right away&#8230; Using an image based CAPTCHA is not good either (post in French).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/02/09/segmentation-example-in-a-captcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ne jouez pas avec un CAPTCHA sans la surveillance d&#8217;un expert</title>
		<link>http://www.paralint.com/blog/2009/02/06/ne-jouez-pas-avec-un-captcha-sans-la-surveillance-dun-expert/</link>
		<comments>http://www.paralint.com/blog/2009/02/06/ne-jouez-pas-avec-un-captcha-sans-la-surveillance-dun-expert/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 20:22:52 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[En français]]></category>
		<category><![CDATA[Other technical]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=91</guid>
		<description><![CDATA[Je suis tombé sur cette implémentation d&#8217;un CAPTCHA. Je déteste les CAPTCHA. C&#8217;est comme de la mauvaise crypto. Fondamentalement, le CAPTCHA ne fonctionne pas. La tâche d&#8217;analyse (le test de Turing) est complexe juste parce que personne ne s&#8217;est encore donné la peine d&#8217;écrire le code pour réussir. C&#8217;est aussi vrai pour la crypto classique, [...]]]></description>
			<content:encoded><![CDATA[<p>Je suis tombé sur cette implémentation d&#8217;un CAPTCHA.</p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_92" class="wp-caption aligncenter" style="width: 403px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-92" title="Lousy captcha" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/captcha.jpg" alt="Must select 3 hamburgers in this lousy captcha " width="393" height="265" /></dt>
</dl>
</div>
<p>Je déteste les CAPTCHA. C&#8217;est comme de la mauvaise crypto.</p>
<p>Fondamentalement, le CAPTCHA ne fonctionne pas. La tâche d&#8217;analyse (le test de Turing) est complexe juste parce que personne ne s&#8217;est encore donné la peine d&#8217;écrire le code pour réussir. C&#8217;est aussi vrai pour la crypto classique, mais ces mathématiques sont soumises à des études formelles et continues. On sait à quoi s&#8217;en tenir : avec de la bonne crypto, on déplace le problème ailleurs (la gestion de clé, souvent). En intelligence artificielle, la segmentation est difficile, mais l&#8217;ordre de grandeur d&#8217;effort est à la portée des botnets actuels.</p>
<p><span id="more-91"></span>Trouver un éléphant ou un burger est faisable. Google ne trouve-t-il pas déjà les visages sur les photos ?  La faiblesse de ce CAPTCHA, en particulier, c&#8217;est l&#8217;apprentissage (en supposant que l&#8217;implémentation est bonne). La mémoire d&#8217;un ordinateur est infinie. Il est possible d&#8217;avoir la base de données complète des images en relativement peu de temps. D&#8217;identifier ce qui s&#8217;y trouve et automatiser le tout. Bien sûr, il ne faut pas que l&#8217;image soit déjà dans l&#8217;index Google&#8230; Autre faiblesse, on sait toujours d&#8217;avance combien il y a de (chat-chien-burger-bébé-éléphant). Ça aide à prendre une décision automatisée.</p>
<p>Les attaques sur les CAPTCHA de Microsoft et Google a montré que l&#8217;analyse de CAPTCHA n&#8217;a pas un taux de succès de 100 %. Un petit pourcentage, multiplié par un bon botnet, ça fait beaucoup de captcha résolus!</p>
<p>On n&#8217;a qu&#8217;à ajouter de nouvelles images, non? Oui, mais combien coûtera toute cette mécanique, en développement mais surtout en entretien? Quel est le coût réel d&#8217;une utilisation abusive du service? Combien coutera l&#8217;analyse préalable des images, le classement en mots clés, etc.? On m&#8217;a demandé de compter 3 bébés, mais une image en contenait deux, faut-il filtrer ces images-là aussi?</p>
<p>Mais surtout, l&#8217;aspect économique de la sécurité est complètement évacué. Ce CAPTCHA est sur une page qui demande un numéro de carte de crédit, mais pas sur la page qui permet d&#8217;utiliser le service une seule fois, gratuitement.  Et c&#8217;est sans compter qu&#8217;une <a href="http://decapcher.com">ferme de Turing</a> coute 8 $ pour 4000 CAPTCHA résolus. Combien coûte un client légitime dégoûté par toutes ces précautions?</p>
<p>Ce CAPTCHA est l&#8217;œuvre d&#8217;amateurs. Et j&#8217;ai même pas regardé l&#8217;implémentation des cookies, session, etc.  En bref, implémenter correctement ce CAPTCHA par image coûte beaucoup trop cher.</p>
<p>Si j&#8217;étais forcé d&#8217;utiliser un CAPTCHA, j&#8217;utiliserais un simple encodage javascript des champs du formulaire, variable dans le temps, peut-être avec un <a href="http://hashcash.org">hashcash</a> en javascript aussi, et vraiment accolé au pied du mur, j&#8217;essaierais <a href="http://recaptcha.net">recaptcha</a>. L&#8217;idée est de transformer tes utilisateurs en ta propre ferme de Turing. Pas fou!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/02/06/ne-jouez-pas-avec-un-captcha-sans-la-surveillance-dun-expert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop internal drive from showing up in &quot;Safely remove hardware&quot;</title>
		<link>http://www.paralint.com/blog/2008/11/13/stop-internal-drive-showing-up-in-safely-remove-hardware/</link>
		<comments>http://www.paralint.com/blog/2008/11/13/stop-internal-drive-showing-up-in-safely-remove-hardware/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 04:27:19 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Other technical]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=82</guid>
		<description><![CDATA[Like many of you, I had a drive that showed up in the &#8220;Safely remove hardware&#8221; tray icon, and was unable to remove it. The trick is to subtract 4 from the Capabilities in the registry. Not easy, but it can be done. The only thing is that it keeps coming back after every boot [...]]]></description>
			<content:encoded><![CDATA[<p>Like many of you, I had a drive that showed up in the &#8220;Safely remove hardware&#8221; tray icon, and was unable to remove it.</p>
<p>The trick is to subtract 4 from the Capabilities in the registry. Not easy, but it can be done. The only thing is that it keeps coming back after every boot ! And it looks like the value cannot be edited under Vista. Here is how to fix it for good.</p>
<p><span id="more-82"></span></p>
<h3>What has to be done (but doesn&#8217;t work)</h3>
<p>Find the drive that shows up in the safely remove hardware icon in your registry. It will be somewhere under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\. My DVD drive was here :</p>
<pre class="generic:nogutter:nocontrols">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\CdRomHL-DT-ST_DVDRAM_GMA4082Nj_______________PM01____</pre>
<p>There is a numerical an alphanumerical key under that with a DWORD Capabilities value.</p>
<p><img src="http://www.paralint.com/blog/wp-content/uploads/2008/11/image.png" alt="image" width="788" height="318" /></p>
<p>It is a bit field. The bit 0010 (4 in decimal) is the REMOVABLE bit. Clear it by subtracting 4 from the value you have. The value I had was 6, so now I am down to 2.</p>
<p>If you try to do that, you will get an access denied. That&#8217;s ok, we will get around that. For now, right click on the key name and copy it (the key named 5&amp;3392c8c4&amp;0&amp;0.0.0 in my example).</p>
<h3>Same idea, that works manually under Vista</h3>
<p>You need to have the TCB privileged enabled to modify that registry key. Running regedit as an administrator (or elevated, if you have UAC) will not work. You can fix the value with this command line :</p>
<pre class="generic:nogutter:nocontrols">psexec -s reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\CdRomHL-DT-ST_DVDRAM_GMA4082Nj_______________PM01____\5&amp;3392c8c4&amp;0&amp;0.0.0" /v Capabilities /t REG_DWORD /d 2 /f</pre>
<p>You will have to replace the key name with what you found in <span style="text-decoration: underline;">your</span> registry. Running psexec -r regedit might work, but who wants to do that every time the computer boots ?</p>
<h3>Permanent fix</h3>
<p>I hardly ever run as an administrator, so putting the above command in a script was out of the question. The solution was to create a Task using Windows Task Scheduler. I set it to run at startup, under the SYSTEM account. Don&#8217;t forget the /f (force) flag, or else the job will appear to hang, waiting a confirmation from you.</p>
<p>Create a new task. In the &#8220;General&#8221; tab, click Change User or Group and enter &#8220;SYSTEM&#8221; . Trigger on startup and enter the same command as above, but without psexec -s. Your task is running reg.exe, with everything right of that (in the command line, earlier) as optional arguments.</p>
<p><img src="http://www.paralint.com/blog/wp-content/uploads/2008/11/image1.png" alt="image" width="419" height="480" /></p>
<p>Good luck and HTH !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2008/11/13/stop-internal-drive-showing-up-in-safely-remove-hardware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy test coverage with constant Hamming distance of 1</title>
		<link>http://www.paralint.com/blog/2008/08/21/easy-test-coverage-with-constant-hamming-distance-of-1/</link>
		<comments>http://www.paralint.com/blog/2008/08/21/easy-test-coverage-with-constant-hamming-distance-of-1/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 03:47:19 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Other technical]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2008/08/21/easy-test-coverage-with-constant-hamming-distance-of-1/</guid>
		<description><![CDATA[I left a terrible bug in version 1.3 of my replacement Gina. I didn&#8217;t want to miss any test case this time, so I wrote a batch file that tests every one of them. That batch file adds a user to a group and a group to the registry. There are two possible groups in [...]]]></description>
			<content:encoded><![CDATA[<p>I left a terrible bug in version 1.3 of my <a href="http://www.paralint.com/projects/aucun/" target="_blank">replacement Gina</a>. I didn&#8217;t want to miss any test case this time, so I wrote a batch file that tests every one of them. That batch file adds a user to a group and a group to the registry. There are two possible groups in the registry, and the user can be a member of either two groups, making 2^(2+2) possibilities, 16 use cases.</p>
<p>After a few lines in, I realized that I would be less work to order the tests in a way that would minimize the change to the configuration between any two tests. In other words, when a n+1 test case required a change to the registry, then the user group membership should not change, and vice-versa. That would also make it easy to investigate a failed test, because only one thing would change between any two tests.</p>
<p>Then it hit me.</p>
<p>Well actually, I had to stop and think for a while. Kind of like my mind restoring a dusty old tape archive&#8230; I remembered that mathematician Richard Hamming had a <a href="http://en.wikipedia.org/wiki/Hamming_distance" target="_blank">code for that</a>. It&#8217;s a numbering scheme where only 1 bit changes between any two numbers. The number of bits that change is the Hamming distance between two numbers. Using four information bits to represent each possible use case, I came up with the following table. The first two rows (MSB, in blue) are user membership to a group, and the two last rows (LSB, in green) is the presence of that group in the registry. Ordering my tests that way gave me a constant Hamming distance of 1.</p>
<table border="1" cellspacing="0" cellpadding="2" width="100%">
<tbody>
<tr>
<td width="23" align="middle" valign="top"><strong>Decimal value</strong></td>
<td width="23" align="middle" valign="top"><strong>0</strong></td>
<td width="23" align="middle" valign="top"><strong>1</strong></td>
<td width="23" align="middle" valign="top"><strong>3</strong></td>
<td width="23" align="middle" valign="top"><strong>2</strong></td>
<td width="23" align="middle" valign="top"><strong>6</strong></td>
<td width="23" align="middle" valign="top"><strong>7</strong></td>
<td width="23" align="middle" valign="top"><strong>5</strong></td>
<td width="23" align="middle" valign="top"><strong>4</strong></td>
<td width="23" align="middle" valign="top"><strong>12</strong></td>
<td width="23" align="middle" valign="top"><strong>13</strong></td>
<td width="23" align="middle" valign="top"><strong>15</strong></td>
<td width="23" align="middle" valign="top"><strong>14</strong></td>
<td width="23" align="middle" valign="top"><strong>10</strong></td>
<td width="23" align="middle" valign="top"><strong>11</strong></td>
<td width="23" align="middle" valign="top"><strong>9</strong></td>
<td width="23" align="middle" valign="top"><strong>8</strong></td>
</tr>
<tr style="background-color: #B7C9E3;">
<td width="23" align="middle" valign="top"><span style="color: #000000;">Unlock</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
</tr>
<tr style="background-color: #B7C9E3;">
<td width="23" align="middle" valign="top"><span style="color: #000000;">Logoff</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
</tr>
<tr style="background-color: #c6e88c;">
<td width="23" align="middle" valign="top"><span style="color: #000000;">Unlock</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
</tr>
<tr style="background-color: #c6e88c;">
<td width="23" align="middle" valign="top"><span style="color: #000000;">Logoff</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><strong><span style="color: #000000;">1</span></strong></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">1</span></td>
<td width="23" align="middle" valign="top"><span style="color: #000000;">0</span></td>
</tr>
<tr>
<td width="23" valign="top">Expected test result</td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top"><strong>Force logoff</strong></td>
<td width="23" valign="top"><strong>Force logoff</strong></td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top"><strong>Force logoff</strong></td>
<td width="23" valign="top"><strong>Unlock</strong></td>
<td width="23" valign="top"><strong>Unlock</strong></td>
<td width="23" valign="top"><strong>Unlock</strong></td>
<td width="23" valign="top"><strong>Unlock</strong></td>
<td width="23" valign="top">Gina</td>
<td width="23" valign="top">Gina</td>
</tr>
</tbody>
</table>
<p>The only drawback to this is that all the typing I saved writing my <a href="http://src.paralint.com/aucun/branches/force-logoff-bug/tests.cmd" target="_blank">test batch file</a>, I wasted on this blog post !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2008/08/21/easy-test-coverage-with-constant-hamming-distance-of-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A convenient way to run Apache Forrest on Windows</title>
		<link>http://www.paralint.com/blog/2007/06/01/a-convenient-way-to-run-apache-forrest-on-windows/</link>
		<comments>http://www.paralint.com/blog/2007/06/01/a-convenient-way-to-run-apache-forrest-on-windows/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 21:14:03 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Other technical]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2007/06/01/a-convenient-way-to-run-apache-forrest-on-windows/</guid>
		<description><![CDATA[I use Apache Forrest to generate what will someday be the homepage of paralint.com. I use &#8220;forrest run&#8221; most of the time, and &#8220;forrest site&#8221;, &#8220;forrest clean&#8221; every now and then. I wrote a little batch file that will launch forrest in a new window when the &#8220;run&#8221; option is used, and in the same [...]]]></description>
			<content:encoded><![CDATA[<p>I use Apache Forrest to generate what will someday be the homepage of paralint.com. I use &#8220;forrest run&#8221; most of the time, and &#8220;forrest site&#8221;, &#8220;forrest clean&#8221; every now and then.</p>
<p>I wrote a little batch file that will launch forrest in a new window when the &#8220;run&#8221; option is used, and in the same window when any other option is used. Here it is :</p>
<pre class="xml:nocontrols:nogutter">@echo off
if "%1"=="run" goto NEWWINDOW

call "%FORREST_HOME%\\bin\\forrest.bat" %*

goto END

:NEWWINDOW
start "Forrest" cmd /C "%FORREST_HOME%\\bin\\forrest.bat" %*

:END</pre>
<p>You can also add a /T:2F switch to make the window white on green. I often have quite a few console windows running, separating them by color reminds me which one is which !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2007/06/01/a-convenient-way-to-run-apache-forrest-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Jetty listen to the local interface only</title>
		<link>http://www.paralint.com/blog/2007/05/18/making-jetty-listen-to-the-local-interface-only/</link>
		<comments>http://www.paralint.com/blog/2007/05/18/making-jetty-listen-to-the-local-interface-only/#comments</comments>
		<pubDate>Sat, 19 May 2007 03:29:15 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Other technical]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2007/05/18/making-jetty-listen-to-the-local-interface-only/</guid>
		<description><![CDATA[I use Apache&#8217;s Forrest tool, which uses internally the Jetty engine. I wanted to make Jetty listen to 127.0.0.1 instead of 0.0.0.0, so my computer wouldn&#8217;t show up in a enterprise port scan. I had trouble finding the information. I went looking for the link again without any success. So I am posting it here, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/cms.html" title="My content management setup">I use</a> Apache&#8217;s Forrest tool, which uses internally the Jetty engine. I wanted to make Jetty listen to 127.0.0.1 instead of 0.0.0.0, so my computer wouldn&#8217;t show up in a enterprise port scan.</p>
<p>I had trouble finding the information. I went looking for the link again without any success. So I am posting it here, where I will always be able to find it !</p>
<p>Update 2008-01-25 : You must add this XML to the file $FORREST_HOME/main/webapp/jettyconf.xml</p>
<pre name="code" class="xml:nocontrols">&lt;Call name="addListener"&gt;
  &lt;Arg&gt;
    &lt;New class="org.mortbay.http.SocketListener"&gt;      &lt;!-- Add this next line --&gt;
      &lt;Set name="Host"&gt;&lt;SystemProperty name="jetty.host" default="localhost"/&gt;&lt;/Set&gt;
      &lt;Set name="Port"&gt;&lt;SystemProperty name="jetty.port" default="8888"/&gt;&lt;/Set&gt;
      &lt;Set name="MinThreads"&gt;5&lt;/Set&gt;
      &lt;Set name="MaxThreads"&gt;100&lt;/Set&gt;
      &lt;Set name="MaxIdleTimeMs"&gt;30000&lt;/Set&gt;
      &lt;Set name="LowResourcePersistTimeMs"&gt;5000&lt;/Set&gt;
    &lt;/New&gt;
  &lt;/Arg&gt;
&lt;/Call&gt;</pre>
<p>You know its working when you see this in the Forrest window:</p>
<pre name="code" class="cpp:nogutter:nocontrols">21:05:11.864 EVENT  Apache Cocoon 2.2.0-dev is up and ready.
21:05:11.864 EVENT  Started SocketListener on 127.0.0.1:8888
21:05:11.864 EVENT  Started org.mortbay.jetty.Server@df8f5e</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2007/05/18/making-jetty-listen-to-the-local-interface-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
