<?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>Alex Rodriguez &#187; IT</title>
	<atom:link href="http://www.alexbr.com/wblog/?feed=rss2&#038;cat=11" rel="self" type="application/rss+xml" />
	<link>http://www.alexbr.com/wblog</link>
	<description>I don&#039;t play baseball.</description>
	<lastBuildDate>Mon, 07 Jun 2010 14:10:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Subversion Backup and Recovery</title>
		<link>http://www.alexbr.com/wblog/?p=103</link>
		<comments>http://www.alexbr.com/wblog/?p=103#comments</comments>
		<pubDate>Thu, 29 Oct 2009 20:22:30 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[subversion svn backup recovery]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=103</guid>
		<description><![CDATA[I wanted to convert one of our production machines from Fedora to Ubuntu server. One of the services this machine was running was subversion.
I both tarred up the repository directory and used &#8217;svnadmin dump&#8217; to backup the repository. I scp&#8217;ed both files to another server.
Upon recovery I wanted to use the dump but the dump [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to convert one of our production machines from Fedora to Ubuntu server. One of the services this machine was running was subversion.</p>
<p>I both tarred up the repository directory and used &#8217;svnadmin dump&#8217; to backup the repository. I scp&#8217;ed both files to another server.</p>
<p>Upon recovery I wanted to use the dump but the dump file became corrupted.</p>
<p>Luckily, there&#8217;s an easy way to recover from a repository file backup. I just untarred the repository and used</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">svnadmin</span> recover <span style="color: #000000; font-weight: bold;">&lt;</span>repo path<span style="color: #000000; font-weight: bold;">&gt;</span></div></td></tr></tbody></table></div>
<p>It worked great!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&amp;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn Off Wordpress PHP Error Display</title>
		<link>http://www.alexbr.com/wblog/?p=94</link>
		<comments>http://www.alexbr.com/wblog/?p=94#comments</comments>
		<pubDate>Thu, 22 Oct 2009 21:23:52 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[devformatter]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[geshi]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=94</guid>
		<description><![CDATA[After updating Wordpress and my devformatter plugin, I noticed some errors popping up from the geshi libraries:
12[22-Oct-2009 14:00:12] PHP Warning: &#160;array_keys() [&#60;a href='function.array-keys'&#62;function.array-keys&#60;/a&#62;]: The first argument should be an array in ***/geshi.php on line 3502
[22-Oct-2009 14:00:12] PHP Warning: &#160;Invalid argument supplied for foreach() in ***/geshi.php on line 3502
This was actually displaying in the blog posts, [...]]]></description>
			<content:encoded><![CDATA[<p>After updating Wordpress and my devformatter plugin, I noticed some errors popping up from the geshi libraries:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[22-Oct-2009 14:00:12] PHP Warning: &nbsp;array_keys() [&lt;a href='function.array-keys'&gt;function.array-keys&lt;/a&gt;]: The first argument should be an array in ***/geshi.php on line 3502<br />
[22-Oct-2009 14:00:12] PHP Warning: &nbsp;Invalid argument supplied for foreach() in ***/geshi.php on line 3502</div></td></tr></tbody></table></div>
<p>This was actually displaying in the blog posts, which is bad for a number of reasons, including security.</p>
<p>You can turn off php error logging by finding your wp-config.php file, usually in your Wordpress document root, and adding the following lines:</p>
<div class="codecolorer-container php vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'log_errors'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'On'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display_errors'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Off'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&amp;p=94</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows XP Remote Desktop Broken</title>
		<link>http://www.alexbr.com/wblog/?p=71</link>
		<comments>http://www.alexbr.com/wblog/?p=71#comments</comments>
		<pubDate>Thu, 08 Oct 2009 00:06:13 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[nvidia]]></category>
		<category><![CDATA[rdp]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[windows update]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=71</guid>
		<description><![CDATA[After a recent windows update I found my remote desktop was broken. I did some troubleshooting and packet sniffing and still couldn&#8217;t track the problem down. 
Finally I stumbled upon this post, which fixed my problem. 
It turned out that an nvidia driver update broke RDP. Updating the driver to the latest WHQL fixed the [...]]]></description>
			<content:encoded><![CDATA[<p>After a recent windows update I found my remote desktop was broken. I did some troubleshooting and packet sniffing and still couldn&#8217;t track the problem down. </p>
<p>Finally I stumbled upon <a href="http://13levels.com/james/windows-xp-sp3-remote-desktop-broken-fixed">this post</a>, which fixed my problem. </p>
<p>It turned out that an nvidia driver update broke RDP. Updating the driver to the latest WHQL fixed the problem.</p>
<p>I love windows updates, they usually break more than they fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing Sendmail</title>
		<link>http://www.alexbr.com/wblog/?p=54</link>
		<comments>http://www.alexbr.com/wblog/?p=54#comments</comments>
		<pubDate>Wed, 13 May 2009 22:01:41 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[sendmail pop smtp tls ssl]]></category>

		<guid isPermaLink="false">http://www.alexbr.com/wblog/?p=54</guid>
		<description><![CDATA[I recently needed to setup TLS for my company&#8217;s email server. My primary goal was to reconfigure our sendmail server to negotiate TLS with other email servers that supported it. This would allow us to send secure information via email to company&#8217;s that also supported email over TLS.
The first step was to generate certificates. This [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to setup TLS for my company&#8217;s email server. My primary goal was to reconfigure our sendmail server to negotiate TLS with other email servers that supported it. This would allow us to send secure information via email to company&#8217;s that also supported email over TLS.</p>
<p>The first step was to generate certificates. This is easily done with openssl. I already have a key and scripts setup to generate cert requests with all necessary info filled in. The script looks something like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-p</span> <span style="color: #ff0000;">&quot;Hostname: &quot;</span> <span style="color: #c20cb9; font-weight: bold;">hostname</span><br />
openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">365</span> <span style="color: #660033;">-key</span> company.key <span style="color: #660033;">-config</span> csr_config <span style="color: #660033;">-out</span> <span style="color: #007800;">$hostname</span>.csr</div></td></tr></tbody></table></div>
<p>Take the output from that certificate request and provide it to your favorite signer to get a signed certificate. Take the key you used to generate the request and the signed certificate and put it somewhere on your server, say /etc/ssl/crt. Also make sure to put the cacerts bundle, or signing certificate chain, in that directory (or any other for that matter).</p>
<p>Next step is to configure sendmail. The following are the changes I needed to make to my sendmail.mc file under /etc/mail:</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">define(`confTLS_SRV_OPTIONS', `V')dnl<br />
define(`confAUTH_OPTIONS', `A p y')dnl<br />
define(`CERT_DIR', `/etc/ssl/crt')dnl<br />
define(`confCACERT',`CERT_DIR/cacerts.crt')dnl<br />
define(`confCACERT_PATH', `CERT_DIR/cacerts')dnl<br />
define(`confSERVER_CERT',`CERT_DIR/your_signed_cert.crt')dnl<br />
define(`confSERVER_KEY',`CERT_DIR/your_key.key')dnl<br />
define(`confCLIENT_CERT',`CERT_DIR/your_signed_cert.crt')dnl<br />
define(`confCLIENT_KEY',`CERT_DIR/your_key.key')dnl<br />
define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl</div></td></tr></tbody></table></div>
<p>Most of that config points sendmail to your keys and certificates to be used for server and client mode. The line</p>
<p>define(`confAUTH_OPTIONS&#8217;, `A p y&#8217;)dnl</p>
<p>tells sendmail to perform smtp authentication after TLS negotiation has completed. The line</p>
<p>define(`confTLS_SRV_OPTIONS&#8217;, `V&#8217;)dnl</p>
<p>tells sendmail to skip requests for clients&#8217; certificates.</p>
<p>I would like to thank <a href="http://www.technoids.org/wwstarttls.html#MyPurposes">this site</a> and <a href="http://sial.org/howto/sendmail/tls-relay/">this site</a> for that helpful information.</p>
<p>Next, recompile the config file and restart sendmail with</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mail<br />
service <span style="color: #c20cb9; font-weight: bold;">sendmail</span> restart</div></td></tr></tbody></table></div>
<p>You can test your server using openssl:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">openssl s_client <span style="color: #660033;">-connect</span> localhost:<span style="color: #000000;">25</span> <span style="color: #660033;">-CAfile</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssl<span style="color: #000000; font-weight: bold;">/</span>crt<span style="color: #000000; font-weight: bold;">/</span>cacerts.crt <span style="color: #660033;">-starttls</span> smtp</div></td></tr></tbody></table></div>
<p>You should see &#8220;Verify return code: 0 (ok)&#8221; near the end of the output. Type &#8220;quit&#8221; to end the communication.</p>
<p>To test that sendmail will communicate properly as a client with another server, you can use the great site <a href="http://test.smtp.org">test.smtp.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&amp;p=54</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bugzilla 3.5 Advanced Search Breaks When Bugzilla Reverse Proxied</title>
		<link>http://www.alexbr.com/wblog/?p=3</link>
		<comments>http://www.alexbr.com/wblog/?p=3#comments</comments>
		<pubDate>Tue, 21 Apr 2009 21:04:21 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[bugzilla 3.5]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[mylyn]]></category>

		<guid isPermaLink="false">http://www.alexbrodriguez.com/wblog/?p=3</guid>
		<description><![CDATA[I recently upgraded my bugzilla installation to 3.5 to find my Eclipse-mylyn integration had broken.
After some traffic inspection and a look at buglist.cgi, I found that new code was added to &#8220;clean&#8221; advanced bug queries. This code cleans the query, then performs a redirect to the new clean query using the correct bugzilla hostname but [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded my bugzilla installation to 3.5 to find my Eclipse-mylyn integration had broken.</p>
<p>After some traffic inspection and a look at buglist.cgi, I found that new code was added to &#8220;clean&#8221; advanced bug queries. This code cleans the query, then performs a redirect to the new clean query using the correct bugzilla hostname but <em>using the local webserver port</em>. Because I was proxying traffic to my actual bugzilla server through another server on a different port, this redirect was invalid.</p>
<p>I fixed this by commenting out the following code in buglist.cgi:</p>
<div class="codecolorer-container perl vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:430px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># If query was POSTed, clean the URL from empty parameters and redirect back to</span><br />
<span style="color: #666666; font-style: italic;"># itself. This will make advanced search URLs more tolerable.</span><br />
<span style="color: #666666; font-style: italic;">#if ($cgi-&amp;gt;request_method() eq 'POST') {</span><br />
<span style="color: #666666; font-style: italic;">#    $cgi-&amp;gt;clean_search_url();</span><br />
<span style="color: #666666; font-style: italic;">#    print $cgi-&amp;gt;redirect(-url =&amp;gt; $cgi-&amp;gt;self_url());</span><br />
<span style="color: #666666; font-style: italic;">#    exit;</span><br />
<span style="color: #666666; font-style: italic;">#}</span></div></td></tr></tbody></table></div>
<p>I&#8217;ll try to actually fix the redirect tomorrow to take advantage of the cleanup.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbr.com/wblog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
