<?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>Casaba Security &#187; CSIDL</title>
	<atom:link href="http://www.casaba.com/blog/tag/csidl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.casaba.com/blog</link>
	<description>Building and breaking software and robots</description>
	<lastBuildDate>Wed, 11 Jan 2012 18:08:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CSIDL &#8211; Shell constants, enumerations, and flags</title>
		<link>http://www.casaba.com/blog/2006/12/csidl-shell-constants-enumerations-and-flags/</link>
		<comments>http://www.casaba.com/blog/2006/12/csidl-shell-constants-enumerations-and-flags/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 08:00:00 +0000</pubDate>
		<dc:creator>Chris Weber</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSIDL]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I worked on an application which had a couple of requirements: Allow users access to their local drive content within a defined scope (e.g. either the entire drive, or the My Documents folder only) Prevent users from accessing files outside of the defined scope. So they shouldn’t be able to access network drives, USB keys, [...]]]></description>
			<content:encoded><![CDATA[<p>I worked on an application which had a couple of requirements:</p>
<ol>
<li>Allow users access to their local drive content within a defined <strong>scope </strong>(e.g. either the entire drive, or the My Documents folder only)</li>
<li>Prevent users from accessing files outside of the defined <strong>scope</strong>. So they shouldn’t be able to access network drives, USB keys, etc.</li>
</ol>
<p>To acheive this, the shell constants were used, as defined in the Windows SDK.<br />
<a set="yes" linkindex="62" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp" title="CSIDL">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp </a></p>
<p>This worked well, and after we looked at the code we actually ran a battery of tests to confirm. So for example we tried the following types of canonicalizations:</p>
<ul>
<li>\\host\share\file</li>
<li>\\?\folder\file</li>
<li>\\10.10.10.10\share\file</li>
<li>\\.\folder\file</li>
</ul>
<p>We kept going, and tried breaking out of the local scope as well:</p>
<ul>
<li>..\..\..\..\boot.ini</li>
<li>../../../../boot.ini</li>
<li>..%2fboot.ini</li>
</ul>
<p>And all that sort of stuff. Using the CSIDL constants proved successful, and we could see this through debugging. Everything we entered was merely relative to the constant value, there was no way to change it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.casaba.com/blog/2006/12/csidl-shell-constants-enumerations-and-flags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

