diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-01-17 22:23:36 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-01-17 22:23:36 +0000 |
commit | 782e1cfe59bc1d819c549a2d7a3459448c1a088d (patch) | |
tree | 9f631451a3e0572e87d165f6aae504476d10ce7a /bin/bbstored | |
parent | 7f228e13623761c744f98d9cfde8144439085e59 (diff) |
Buffer store file integrity checks (refs #3)
Diffstat (limited to 'bin/bbstored')
-rw-r--r-- | bin/bbstored/BackupCommands.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/bbstored/BackupCommands.cpp b/bin/bbstored/BackupCommands.cpp index cf8025e4..fd19713d 100644 --- a/bin/bbstored/BackupCommands.cpp +++ b/bin/bbstored/BackupCommands.cpp @@ -30,6 +30,7 @@ #include "RaidFileController.h" #include "FileStream.h" #include "InvisibleTempFileStream.h" +#include "BufferedStream.h" #include "MemLeakFindOn.h" @@ -388,9 +389,10 @@ std::auto_ptr<ProtocolObject> BackupProtocolServerGetFile::DoCommand(BackupProto // Open the object std::auto_ptr<IOStream> object(rContext.OpenObject(mObjectID)); + BufferedStream buf(*object); // Verify it - if(!BackupStoreFile::VerifyEncodedFileFormat(*object)) + if(!BackupStoreFile::VerifyEncodedFileFormat(buf)) { return std::auto_ptr<ProtocolObject>(new BackupProtocolServerError( BackupProtocolServerError::ErrorType, BackupProtocolServerError::Err_FileDoesNotVerify)); |