Fix Mac sandbox meta data access
Sandbox::AllowMetadataForPath() currently allow all metadata access due to https://codereview.chromium.org/10539009/ made the for loop comparison in Sandbox::AllowMetadataForPath() always false, when we actually only want to allow access to the path and all its parent path until root. Turn the for loop to a do/while loop instead as it's a better fit, also add a test case for Sandbox::AllowMetadataForPath(). It should only affect component builds on OS X 10.6 and utility process as no other process is using this mechanism. Review URL: https://codereview.chromium.org/472513002 Cr-Commit-Position: refs/heads/master@{#289526} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289526 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment