fix encfsctl cat when iv chaining is enabled. Fixes issue #132

git-svn-id: http://encfs.googlecode.com/svn/trunk@77 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
Valient Gough 2012-04-26 02:15:38 +00:00
parent 687b51a7e5
commit b28b97999e
3 changed files with 3 additions and 14 deletions

View File

@ -742,14 +742,6 @@ shared_ptr<FileNode> DirNode::renameNode( const char *from, const char *to,
return node;
}
shared_ptr<FileNode> DirNode::directLookup( const char *path )
{
return shared_ptr<FileNode>(
new FileNode( this,
fsConfig,
"unknown", path ));
}
shared_ptr<FileNode> DirNode::findOrCreate( const char *plainName)
{
shared_ptr<FileNode> node;

View File

@ -108,10 +108,6 @@ public:
shared_ptr<FileNode> openNode( const char *plaintextName,
const char *requestor, int flags, int *openResult );
/* For internal use - open a cipher file directly
*/
shared_ptr<FileNode> directLookup( const char *realPath );
std::string cipherPath( const char *plaintextPath );
std::string cipherPathWithoutRoot( const char *plaintextPath );
std::string plainPath( const char *cipherPath );

View File

@ -411,8 +411,9 @@ int processContents( const shared_ptr<EncFS_Root> &rootInfo,
if(!node)
{
// try opening directly, so a cipher-path can be passed in
node = rootInfo->root->directLookup( path );
// try treating filename as an enciphered path
string plainName = rootInfo->root->plainPath( path );
node = rootInfo->root->lookupNode( plainName.c_str(), "encfsctl" );
if(node)
{
errCode = node->open( O_RDONLY );