<?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>arfore dot com &#187; geeky</title>
	<atom:link href="http://arfore.com/category/geeky/feed/" rel="self" type="application/rss+xml" />
	<link>http://arfore.com</link>
	<description>welcome to the foremind</description>
	<lastBuildDate>Wed, 09 Nov 2011 01:52:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Network port troubleshooting with Perl</title>
		<link>http://arfore.com/2011/07/01/network-port-troubleshooting-with-perl/</link>
		<comments>http://arfore.com/2011/07/01/network-port-troubleshooting-with-perl/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 12:00:41 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=878</guid>
		<description><![CDATA[Recently I had a need to test network communication between two different services over a specific port for a clustered application.  Since I didn&#8217;t want to have to initiate an application failover just to test the network communication, I decided &#8230; <a href="http://arfore.com/2011/07/01/network-port-troubleshooting-with-perl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I had a need to test network communication between two different services over a specific port for a clustered application.  Since I didn&#8217;t want to have to initiate an application failover just to test the network communication, I decided to use a simple Perl script to listen for inbound communication on the cluster node being tested from the development environment.</p>
<p>What the code does is to open a specific port for listening.  I used the basic telnet client to send traffic from the source machine (client) to the destination machine (server).</p>
<p>Here are the code listings for the script for both Solaris 10 and AIX 6.1.</p>
<p><strong>Solaris 10</strong></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> IO<span style="color: #339933;">::</span><span style="color: #006600;">Socket</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Local host bind address (hostname/ipaddr)</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$LOCALADDR</span> <span style="color: #339933;">=</span> 10<span style="color: #339933;">.</span>0<span style="color: #339933;">.</span>0<span style="color: #339933;">.</span>1
<span style="color: #666666; font-style: italic;"># Local host bind port</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$PORT</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10240</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sock</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> IO<span style="color: #339933;">::</span><span style="color: #006600;">Socket</span><span style="color: #339933;">::</span><span style="color: #006600;">INET</span> <span style="color: #009900;">&#40;</span>
    LocalHost <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$LOCALADDR</span><span style="color: #339933;">,</span>
    LocalPort <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$PORT</span><span style="color: #339933;">,</span>
    Proto <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'tcp'</span><span style="color: #339933;">,</span>
    Listen <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
    Reuse <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;Could not create socket: $!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #b1b100;">unless</span> <span style="color: #0000ff;">$sock</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$new_sock</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sock</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">accept</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&lt;</span><span style="color: #0000ff;">$new_sock</span><span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">print</span> <span style="color: #0000ff;">$_</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$sock</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>AIX 6.1</strong></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> IO<span style="color: #339933;">::</span><span style="color: #006600;">Socket</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Net<span style="color: #339933;">::</span><span style="color: #006600;">hostent</span><span style="color: #339933;">;</span>              <span style="color: #666666; font-style: italic;"># for OO version of gethostbyaddr</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Local host bind address (hostname/ipaddr)</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$LOCALADDR</span> <span style="color: #339933;">=</span> 10<span style="color: #339933;">.</span>0<span style="color: #339933;">.</span>0<span style="color: #339933;">.</span>1
<span style="color: #666666; font-style: italic;"># Local host bind port</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$PORT</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10240</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$server</span> <span style="color: #339933;">=</span> IO<span style="color: #339933;">::</span><span style="color: #006600;">Socket</span><span style="color: #339933;">::</span><span style="color: #006600;">INET</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>
    Proto <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'tcp'</span><span style="color: #339933;">,</span>
    LocalHost <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$LOCALADDR</span><span style="color: #339933;">,</span>
    LocalPort <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$PORT</span><span style="color: #339933;">,</span>
    Listen <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
    Reuse <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span>
<span style="color: #b1b100;">or</span> <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;can't setup server&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;SERVER Waiting for client connection on port $PORT<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$new_sock</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$server</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">accept</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">&lt;</span><span style="color: #0000ff;">$new_sock</span><span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">print</span> <span style="color: #0000ff;">$_</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$server</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2011/07/01/network-port-troubleshooting-with-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patch Solaris 10 over NFS</title>
		<link>http://arfore.com/2011/06/22/patch-solaris-10-over-nfs/</link>
		<comments>http://arfore.com/2011/06/22/patch-solaris-10-over-nfs/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 10:00:01 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[smf]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=868</guid>
		<description><![CDATA[One of the things that many system administrators encounter in the quest for maintaining up-to-date servers is the need to apply regular maintenance releases.  With some operating systems, Mac OS X for instance, the patches are released in two forms: &#8230; <a href="http://arfore.com/2011/06/22/patch-solaris-10-over-nfs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the things that many system administrators encounter in the quest for maintaining up-to-date servers is the need to apply regular maintenance releases.  With some operating systems, Mac OS X for instance, the patches are released in two forms:</p>
<ul>
<li>a delta update, which contains only the changes necessary to bring the system up-to-date from the current running release level</li>
<li>a combo (cumulative, full, etc.) update, which contains all changes for the current release branch</li>
</ul>
<p>If you are lucky enough to be using an OS that gives you delta updates then you may not ever run into an issue where you don&#8217;t have enough internal drive space to update the OS.  However, if you are running an OS, like Solaris, that uses cumulative clusters then this becomes more interesting.</p>
<p>One situation I recently encountered was a need to patch a Solaris 10 Sparc system that did not have sufficient internal drive space to store the unzipped patch cluster for patching the system in single-user mode.  (You are patching in single-user mode right?)</p>
<p>The most obvious question would be: why not add another drive?  Another obvious question might be: why not patch from cd/dvd?  Well, adding a new drive to this system was not a viable solution since there were no available drives to install.  Installing from DVD would have been a possible solution, if the patches had been unzipped and burned to disc prior to the maintenance window.</p>
<p>The next available option was to install the patches over the network.  When patching a machine in single-user mode this becomes a little more problematic, since network resources and services are not generally available unless the server has been brought up in a multi-user mode.</p>
<p>After bringing the server up in single-user mode the next step was to start SSH and NFS so that the patch cluster could be installed over the NFS share.  Generally with Solaris 10 all you would need to do is execute the following command for both SSH and NFS client:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">svcadm <span style="color: #7a0874; font-weight: bold;">enable</span> <span style="color: #000000; font-weight: bold;">&amp;</span>lt;service name<span style="color: #000000; font-weight: bold;">&amp;</span>gt;</pre></div></div>

<p>Unfortunately with single-user mode this will fail to work, since the dependent services are not auto-started.  To accomplish this in single-user mode you need to add the -r flag which instructs svcadm to start the service and recursively start the dependent services.  If you want a little more checking, also add the -s flag which tells svcadm to wait for each service to enter an online or degraded state before returning.  Below are the commands for starting SSH and NFS along with the output of a service check to show the state after the command was executed.</p>
<p><strong>SSH</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># svcadm enable -rs svc:/network/ssh:default</span>
Reading ZFS config: done.
<span style="color: #666666; font-style: italic;"># svcs -a | grep ssh</span>
online         <span style="color: #000000;">15</span>:<span style="color: #000000;">49</span>:<span style="color: #000000;">26</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ssh</span>:default</pre></div></div>

<p><strong>NFS</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># svcadm enable -rs svc:/network/nfs/client:default</span>
<span style="color: #666666; font-style: italic;"># svcs -a | grep nfs</span>
disabled       <span style="color: #000000;">15</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">34</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>cbd:default
disabled       <span style="color: #000000;">15</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">34</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>mapid:default
disabled       <span style="color: #000000;">15</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">35</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>server:default
online         <span style="color: #000000;">15</span>:<span style="color: #000000;">50</span>:<span style="color: #000000;">35</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>status:default
online         <span style="color: #000000;">15</span>:<span style="color: #000000;">50</span>:<span style="color: #000000;">35</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>nlockmgr:default
online         <span style="color: #000000;">15</span>:<span style="color: #000000;">50</span>:<span style="color: #000000;">35</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>client:default
uninitialized  <span style="color: #000000;">15</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">37</span> svc:<span style="color: #000000; font-weight: bold;">/</span>network<span style="color: #000000; font-weight: bold;">/</span>nfs<span style="color: #000000; font-weight: bold;">/</span>rquota:default</pre></div></div>

<p>After this was done all that was left was to mount the exported file system and run the patch cluster installation script.  Since the cluster was not local to the system it took a little longer to install the cluster, but other than that everything went smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2011/06/22/patch-solaris-10-over-nfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Ringtones on HTC Thunderbolt</title>
		<link>http://arfore.com/2011/06/20/iphone-ringtones-on-htc-thunderbolt/</link>
		<comments>http://arfore.com/2011/06/20/iphone-ringtones-on-htc-thunderbolt/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 01:43:34 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=854</guid>
		<description><![CDATA[As a recent switcher from the Apple iPhone to an HTC Thunderbolt, there have been a few things that I have been sorting out with the usage of my new phone. I will be detailing some more of my adventures &#8230; <a href="http://arfore.com/2011/06/20/iphone-ringtones-on-htc-thunderbolt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As a recent switcher from the Apple iPhone to an HTC Thunderbolt, there have been a few things that I have been sorting out with the usage of my new phone.  I will be detailing some more of my adventures later, however one of the important things to me was how to retain the custom ringtones that I had created using GarageBand.</p>
<p>On the Mac custom ringtones are stored by default in the Ringtones directory within your iTunes Music directory.</p>
<p><a href="http://arfore.com/wp-content/uploads/2011/06/ringtone_filelist.png"><img class="alignnone size-medium wp-image-856" title="iTunes ringtone file location" src="http://arfore.com/wp-content/uploads/2011/06/ringtone_filelist-300x283.png" alt="iTunes ringtone file location" width="300" height="283" /></a></p>
<p>The <strong>m4r</strong> files are really just AAC files with a custom extension that tells iTunes and iOS that it is a ringtone.  They are not DRM formatted files or special Apple files, just ordinary AAC files.  All you need to do to make them playable on Android is to change the file extension to either <strong>m4a</strong> or <strong>aac</strong>.</p>
<p>This is a real bonus since Android 2.2.1 will play AAC files with no problem (see <a title="Android Supported Media Formats" href="http://developer.android.com/guide/appendix/media-formats.html">http://developer.android.com/guide/appendix/media-formats.html</a>)</p>
<p>Once I found this piece of information out, the only hurdle was to get the ringtones into a location that was used on my phone.  Ideally I would be able to save them to the SD Card to save on the internal storage space and to eliminate the chance of a new software update (or a custom ROM installation) to wipe them out.</p>
<p>It turns out that in Android there is a whole host of pre-defined locations for various data types.  As defined on the <a title="Android: Using External Storage" href="http://developer.android.com/guide/topics/data/data-storage.html#filesExternal">Android Developer Network</a>:</p>
<p style="padding-left: 30px;"><strong>Music/</strong> &#8211; Media scanner classifies all media found here as user music.</p>
<p style="padding-left: 30px;"><strong>Podcasts/</strong> &#8211; Media scanner classifies all media found here as a podcast.</p>
<p style="padding-left: 30px;"><strong>Ringtones/</strong> &#8211; Media scanner classifies all media found here as a ringtone.</p>
<p style="padding-left: 30px;"><strong>Alarms/</strong> &#8211; Media scanner classifies all media found here as an alarm sound.</p>
<p style="padding-left: 30px;"><strong>Notifications/</strong> &#8211; Media scanner classifies all media found here as a notification sound.</p>
<p style="padding-left: 30px;"><strong>Pictures/</strong> &#8211; All photos (excluding those taken with the camera).</p>
<p style="padding-left: 30px;"><strong>Movies/</strong> &#8211; All movies (excluding those taken with the camcorder).</p>
<p style="padding-left: 30px;"><strong>Download/</strong> &#8211; Miscellaneous downloads.</p>
<p>With regards to the storage internal to the system, then, this would make the location for the ringtones be as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>system<span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>audio<span style="color: #000000; font-weight: bold;">/</span>ringtones<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>The external storage location for ringtones would be:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>sdcard<span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>audio<span style="color: #000000; font-weight: bold;">/</span>ringtones<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Once I had the filetype and location it was simple enough to mount the SD Card of my Thunderbolt and create the appropriate directory structure then copy the re-named file over.</p>
<p>Then open the ringtones settings pane on the Thunderbolt and voila the new ringtones are available.</p>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2011/06/20/iphone-ringtones-on-htc-thunderbolt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable P3P support in Firefox</title>
		<link>http://arfore.com/2010/10/25/enable-p3p-support-in-firefox/</link>
		<comments>http://arfore.com/2010/10/25/enable-p3p-support-in-firefox/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 00:00:12 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[outlook live]]></category>
		<category><![CDATA[p3p]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=809</guid>
		<description><![CDATA[In Outlook Live browser cookie issues, I discussed the issues surrounding cookie usage and the Outlook Live service.  As you may remember, one of the problems surrounding turning off the blind support of third-party cookies is the check that is &#8230; <a href="http://arfore.com/2010/10/25/enable-p3p-support-in-firefox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In <a title="Outlook Live browser cookie issues - arfore.com" href="http://arfore.com/2010/10/25/outlook-live-browser-cookie-issues/">Outlook Live browser cookie issues</a>, I discussed the issues surrounding cookie usage and the Outlook Live service.  As you may remember, one of the problems surrounding turning off the blind support of third-party cookies is the check that is performed at logout.  If the check doesn&#8217;t pass then you will get a warning message.</p>
<p>The fix for this from the MS perspective is to enable third-party cookies.  One of the main reasons to not follow this is for better privacy while browsing the Internet.  As with most computer security, web browser security is often a trade-off between usability and security.  You have to know what to set things to to achieve a balance between good security and acceptable annoyance.  Many users install ad-blockers, flash blockers, disable Javascript, etc.  These are good tactics, but they also introduce browsing annoyances since the very technologies these plug-ins disable are what makes the web experience interesting and fun.  For more on browser security check out <a title="Secure Your Web Browser - cert.org" href="http://www.cert.org/tech_tips/securing_browser/">Securing Your Web Browser</a> at <a title="CERT homepage" href="http://www.cert.org/">CERT</a>.</p>
<p>Fortunately, in this particular case the solution is relatively easy.  Since Mozilla gives us the ability to configure the browser directly, we can change how Firefox handles cookies.</p>
<p>First you will need to open Firefox and go to the site about:config to edit the settings.  This is not really a website, but a method provided to directly configure some browser settings.  You will be presented with a warning box, just click the button.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/about_config.png"><img class="alignnone size-medium wp-image-815" style="border: 1px solid black;" title="about_config" src="http://arfore.com/wp-content/uploads/2010/10/about_config-300x97.png" alt="Navigate to the configuration editor" width="300" height="97" /></a></p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/about_config.png"></a><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/ffedit_warning_box.png"><img class="alignnone size-medium wp-image-818" style="border: 1px solid black;" title="ffedit_warning_box" src="http://arfore.com/wp-content/uploads/2010/10/ffedit_warning_box-300x84.png" alt="Configuration editing warning message" width="300" height="84" /></a></p>
<p>Next, in the filter box type network.cookie, this will narrow the list displayed down to only the ones dealing with cookies.  One of the settings to be changed already exists, the other will have to be added.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/original_prefs_list.png"><img class="alignnone size-full wp-image-820" style="border: 1px solid black;" title="original_prefs_list" src="http://arfore.com/wp-content/uploads/2010/10/original_prefs_list.png" alt="Filtering the preferences list" width="268" height="84" /></a></p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/net_cookie_only.png"><img class="alignnone size-medium wp-image-819" style="border: 1px solid black;" title="net_cookie_only" src="http://arfore.com/wp-content/uploads/2010/10/net_cookie_only-300x64.png" alt="Narrowed down preference list" width="300" height="64" /></a></p>
<p>The setting that you want to change is:</p>
<ul>
<li>network.cookie.cookieBehavior</li>
</ul>
<p>Change network.cookie.cookieBehavior to have a setting of 3, enabling the change, by double clicking on the number in the Value column and entering the new value in the dialog box.</p>
<p>To add the new preference, right click in the window and select Integer from the New submenu.</p>
<p><a href="http://arfore.com/wp-content/uploads/2010/10/create_new.png"><img class="alignnone size-full wp-image-816" style="border: 1px solid black;" title="create_new" src="http://arfore.com/wp-content/uploads/2010/10/create_new.png" alt="Adding a new preference entry" width="230" height="179" /></a></p>
<p>Enter <strong>network.cookie.p3plevel</strong> in the dialog box that appears. Set the value to be <strong>3</strong> in the second dialog box.  There is no save function, the changes take effect immediately, just close you browser tab/window.</p>
<p>After making these changes you will now be able to successfully navigate the Outlook Live site and logout without getting the warning message.  You will also be better protected from nefarious third-party cookies.</p>
<p>If you want to change the preferences back to the defaults, simply open the preferences for Firefox and click the checkbox next to <strong>Accept third-party cookies</strong>.</p>
<p>Apparently this functionality was part of Firefox 2 but was subsequently removed after someone complained about the size of the code required to implement it (a total of 60k in what is now a 56.9MB, at least that&#8217;s the size of the application on Mac OS X).  In reading through the comments in the Bugzilla post, I fail to see where anyone makes a decent argument for reducing end-user security.  For more on all of this, check out the references section of this post.</p>
<p>These changes were implemented on Mac OS X 10.6.4 using Firefox 3.6.11, but it should be pertinent to Windows and Linux as well.</p>
<p>References</p>
<ol>
<li><a title="Posts Tagged ‘P3P’ - from psych0tik" href="http://blog.psych0tik.net/?tag=p3p">http://blog.psych0tik.net/?tag=p3p</a></li>
<li><a title="Bug 225287 - Remove p3p from the default build" href="https://bugzilla.mozilla.org/show_bug.cgi?id=225287">https://bugzilla.mozilla.org/show_bug.cgi?id=225287</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2010/10/25/enable-p3p-support-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook Live browser cookie issues</title>
		<link>http://arfore.com/2010/10/25/outlook-live-browser-cookie-issues/</link>
		<comments>http://arfore.com/2010/10/25/outlook-live-browser-cookie-issues/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 12:00:40 +0000</pubDate>
		<dc:creator>arfore</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[outlook live]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://arfore.com/?p=785</guid>
		<description><![CDATA[In June of 2010, Valdosta State University transitioned to using Microsoft&#8217;s Live@EDU service for our e-mail.  This is Microsoft&#8217;s competing product line with Google&#8217;s Apps for Education service.  There were many reasons why we chose the Microsoft service which I &#8230; <a href="http://arfore.com/2010/10/25/outlook-live-browser-cookie-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/outlooklive_sigout_error.png"><img class="size-medium wp-image-789 alignleft" title="outlooklive_sigout_error" src="http://arfore.com/wp-content/uploads/2010/10/outlooklive_sigout_error-300x131.png" alt="Windows Live logout error message" width="300" height="131" /></a>In June of 2010, Valdosta State University transitioned to using Microsoft&#8217;s Live@EDU service for our e-mail.  This is Microsoft&#8217;s competing product line with Google&#8217;s Apps for Education service.  There were many reasons why we chose the Microsoft service which I won&#8217;t get into here, suffice it to say, that was the decision that was made.</p>
<p>While I don&#8217;t use the web interface all that much, when I do use it on Safari 5 for the Mac, I have noticed an oddity.  After you login to the system and do whatever you plan to do that session, to logout you should click the &#8220;Sign Out&#8221; link.  Seems standard enough, right?  Well, not exactly.  On Safari on the Mac I have noticed that I get an error when the signout process is attempted.  When testing Firefox 3.6.11, I found I wasn&#8217;t receiving the error screen and the signout process completed successfully.</p>
<p>After delving more into this it turns out that the problem is third-party cookies.  The default settings in Safari are very restrictive.  They are also all or none.  There is no exception list to the privacy settings for browser cookies in Safari, unlike Firefox. Also, it turns out that if you change the settings in Firefox to match the restrictive settings in Safari you get the same error screen.</p>
<p>In order to find out what site was causing the problem I cleared all the cookies for Safari, then enable the setting to always allow cookies.  After comparing the list of cookies that were set, I found one listed for the domain <strong>passport.com</strong> that did not show up in the cookie list when Safari is set to accept cookies only from sites that I visited.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/safari_3rdptycookiechk_block.png"><img class="alignnone size-medium wp-image-800" title="safari_3rdptycookiechk_block" src="http://arfore.com/wp-content/uploads/2010/10/safari_3rdptycookiechk_block-300x93.png" alt="Cookie listing for Safari on the Mac with 3rd party allowed" width="300" height="93" /></a></p>
<p>Further investigation using the Live HTTP Headers add-on in Firefox revealed the following for that domain:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">http://loginnet.passport.com/ThirdPartyCookieCheck.srf?ct=<span style="color: #ff0000;">1287943985</span>
&nbsp;
GET /ThirdPartyCookieCheck.srf?ct=<span style="color: #ff0000;">1287943985</span> HTTP/<span style="color: #ff0000;">1.1</span>
Host: loginnet.passport.com
User-Agent: Mozilla/<span style="color: #ff0000;">5.0</span> (Macintosh; U; Intel Mac OS X <span style="color: #ff0000;">10.6</span>; en-US; rv:1.9.2.11) Gecko/<span style="color: #ff0000;">20101012</span> Firefox/3.6.11
Accept: image/png,image/*;q=<span style="color: #ff0000;">0.8</span>,*/*;q=<span style="color: #ff0000;">0.5</span>
Accept-Language: en-us,en;q=<span style="color: #ff0000;">0.5</span>
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-<span style="color: #ff0000;">8859</span>-<span style="color: #ff0000;">1</span>,utf-<span style="color: #ff0000;">8</span>;q=<span style="color: #ff0000;">0.7</span>,*;q=<span style="color: #ff0000;">0.7</span>
Keep-Alive: <span style="color: #ff0000;">115</span>
Connection: keep-alive
Referer: http://login.live.com/logout.srf?lc=<span style="color: #ff0000;">1033</span>&amp;amp;nossl=<span style="color: #ff0000;">1</span>&amp;amp;lc=<span style="color: #ff0000;">1033</span>&amp;amp;ru=https://login.microsoftonline.com/login.srf%3Flc%3D1033%26ct%3D1287943985%26rver%3D6.1.6206.0%26id%3D260563%26wa%3Dwsignoutcleanup1.0%26nossl%3D1%26wreply%3Dhttps:%252F%252Foutlook.com%252Fowa%252F%253Frealm%253Dvaldosta.edu&amp;amp;id=<span style="color: #ff0000;">12</span>&amp;amp;wa=wsignout1.0
&nbsp;
HTTP/<span style="color: #ff0000;">1.1</span> <span style="color: #ff0000;">302</span> Found
Connection: close
Date: Sun, <span style="color: #ff0000;">24</span> Oct <span style="color: #ff0000;">2010</span> <span style="color: #ff0000;">18</span>:<span style="color: #ff0000;">13</span>:05 GMT
Server: Microsoft-IIS/<span style="color: #ff0000;">6.0</span>
PPServer: PPV: <span style="color: #ff0000;">30</span> H: BAYIDSLGN1F57 V: <span style="color: #ff0000;">0</span>
Content-Type: text/html; charset=utf-<span style="color: #ff0000;">8</span>
Expires: Sun, <span style="color: #ff0000;">24</span> Oct <span style="color: #ff0000;">2010</span> <span style="color: #ff0000;">18</span>:<span style="color: #ff0000;">12</span>:05 GMT
Cache-Control: no-cache
Pragma: no-cache
P3P: CP=<span style="color: #7f007f;">&quot;DSP CUR OTPi IND OTRi ONL FIN&quot;</span>
Set-Cookie: MSPP3RD=<span style="color: #ff0000;">2832116359</span>; domain=.passport.com;path=/;HTTPOnly= ;version=<span style="color: #ff0000;">1</span>
Content-Length: <span style="color: #ff0000;">0</span>
Location: http://loginnet.passport.com/ThirdPartyCookieCheck.srf?tpc=<span style="color: #ff0000;">2832116359</span>&amp;amp;lc=<span style="color: #ff0000;">1033</span>
----------------------------------------------------------
http://loginnet.passport.com/ThirdPartyCookieCheck.srf?tpc=<span style="color: #ff0000;">2832116359</span>&amp;amp;lc=<span style="color: #ff0000;">1033</span>
&nbsp;
GET /ThirdPartyCookieCheck.srf?tpc=<span style="color: #ff0000;">2832116359</span>&amp;amp;lc=<span style="color: #ff0000;">1033</span> HTTP/<span style="color: #ff0000;">1.1</span>
Host: loginnet.passport.com
User-Agent: Mozilla/<span style="color: #ff0000;">5.0</span> (Macintosh; U; Intel Mac OS X <span style="color: #ff0000;">10.6</span>; en-US; rv:1.9.2.11) Gecko/<span style="color: #ff0000;">20101012</span> Firefox/3.6.11
Accept: text/html,application/xhtml+xml,application/xml;q=<span style="color: #ff0000;">0.9</span>,*/*;q=<span style="color: #ff0000;">0.8</span>
Accept-Language: en-us,en;q=<span style="color: #ff0000;">0.5</span>
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-<span style="color: #ff0000;">8859</span>-<span style="color: #ff0000;">1</span>,utf-<span style="color: #ff0000;">8</span>;q=<span style="color: #ff0000;">0.7</span>,*;q=<span style="color: #ff0000;">0.7</span>
Keep-Alive: <span style="color: #ff0000;">115</span>
Connection: keep-alive
Referer: http://login.live.com/logout.srf?lc=<span style="color: #ff0000;">1033</span>&amp;amp;nossl=<span style="color: #ff0000;">1</span>&amp;amp;lc=<span style="color: #ff0000;">1033</span>&amp;amp;ru=https://login.microsoftonline.com/login.srf%3Flc%3D1033%26ct%3D1287943985%26rver%3D6.1.6206.0%26id%3D260563%26wa%3Dwsignoutcleanup1.0%26nossl%3D1%26wreply%3Dhttps:%252F%252Foutlook.com%252Fowa%252F%253Frealm%253Dvaldosta.edu&amp;amp;id=<span style="color: #ff0000;">12</span>&amp;amp;wa=wsignout1.0
Cookie: MSPP3RD=<span style="color: #ff0000;">2832116359</span>
&nbsp;
HTTP/<span style="color: #ff0000;">1.1</span> <span style="color: #ff0000;">200</span> OK
Cache-Control: no-cache
Connection: close
Date: Sun, <span style="color: #ff0000;">24</span> Oct <span style="color: #ff0000;">2010</span> <span style="color: #ff0000;">18</span>:<span style="color: #ff0000;">13</span>:06 GMT
Pragma: no-cache
Content-Type: image/gif
Expires: Sun, <span style="color: #ff0000;">24</span> Oct <span style="color: #ff0000;">2010</span> <span style="color: #ff0000;">18</span>:<span style="color: #ff0000;">12</span>:06 GMT
Server: Microsoft-IIS/<span style="color: #ff0000;">6.0</span>
PPServer: PPV: <span style="color: #ff0000;">30</span> H: BAYIDSLGN1F50 V: <span style="color: #ff0000;">0</span>
P3P: CP=<span style="color: #7f007f;">&quot;DSP CUR OTPi IND OTRi ONL FIN&quot;</span>
Content-Encoding: gzip
Vary: Accept-Encoding
Transfer-Encoding: chunked</pre></div></div>

<p>Continuing the investigation, I decided to force Firefox to ask me about each cookie that was going to be set.  This makes a dialog show up for each cookie attempt giving me the option to deny it, allow it only for the current session, or always allow.  After walking through the tortorous process of a complete login/logout session, it turns out that two cookies are being set for the domain passport.com with each of them set to expire at the end of the session.  More detail on the cookie can be seen in the screen shot of the cookie detail (provided by the plugin Add N Edit Cookies) shown below:</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/passport_cookie_detail.png"><img class="alignnone size-medium wp-image-798" title="passport_cookie_detail" src="http://arfore.com/wp-content/uploads/2010/10/passport_cookie_detail-300x134.png" alt="Detail on the contents of the passport domain cookie" width="300" height="134" /></a></p>
<p>So, the next step was to fire up my VM and see how all this worked on the Windows side of things.  I figured that since we had not been deluged with user requests concerning this that the browsers on the Windows side of the equation were handling it all differently. Firefox on Windows is configured out of the box just like Firefox on Mac OS X.  So, as I expected the operation was the same as well. If you allow for third-party cookies, then it works fine, if you don&#8217;t then you get the error screen.</p>
<p>The interesting development is the settings for Internet Explorer.  Bear in mind that I am using Windows 7 and Internet Explorer 8, but the settings should be fairly similar on Windows XP and between versions 7 and 8.  The default setting in IE8 is to all third-party cookies, but (and this is the key) only if they have a <a title="P3P - Wikipedia" href="http://en.wikipedia.org/wiki/P3P">compact privacy policy (P3P)</a>.  This is the setting that makes the big difference.</p>
<p><a rel="lightbox" href="http://arfore.com/wp-content/uploads/2010/10/ie8_cookie_settings.png"><img class="alignnone size-medium wp-image-804" title="ie8_cookie_settings" src="http://arfore.com/wp-content/uploads/2010/10/ie8_cookie_settings-300x148.png" alt="Default privacy settings for Internet Explorer 8" width="300" height="148" /></a></p>
<p>It turns out that neither Firefox nor Safari support P3P headers by default.  In fact there doesn&#8217;t appear to be any support for them in Safari at all.  Configuring Firefox to support them requires some advanced editing of the main configuration file.</p>
<p>I haven&#8217;t found any adverse effects to the workings of Outlook Live when using Safari, but it is rather annoying that this occurs.</p>
<h4>References</h4>
<ol>
<li><a title="HTTP Cookie - Wikipedia" href="http://en.wikipedia.org/wiki/HTTP_cookie#Third-party_cookies">http://en.wikipedia.org/wiki/HTTP_cookie#Third-party_cookies</a></li>
<li><a title="Third-party Cookies in Safari, Internet Explorer - Squeeville" href="http://squeeville.com/2010/02/03/third-party-cookies-in-safari-internet-explorer/">http://squeeville.com/2010/02/03/third-party-cookies-in-safari-internet-explorer/</a></li>
<li><a title="Cross-domain cookies/sessions in Safari and all other browsers" href="http://anantgarg.com/2010/02/18/cross-domain-cookies-in-safari/">http://anantgarg.com/2010/02/18/cross-domain-cookies-in-safari/</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://arfore.com/2010/10/25/outlook-live-browser-cookie-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

