summaryrefslogtreecommitdiff
path: root/src/FallocFileAllocationIterator.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-05-22 20:57:33 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-05-22 20:57:33 +0900
commit9d40c47799bbec12bb02f7579736fbc1fcc35c08 (patch)
tree0ef02a9f17d6550667aa745829ff5146b1ccf6a6 /src/FallocFileAllocationIterator.cc
parent9727b5b256bb12cff42e6aa230ba2020a933562f (diff)
parent0b906f40f1204e79cb43af3867468ab02a371075 (diff)
Merge branch 'master' into dynamic-select-file
Diffstat (limited to 'src/FallocFileAllocationIterator.cc')
-rw-r--r--src/FallocFileAllocationIterator.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/FallocFileAllocationIterator.cc b/src/FallocFileAllocationIterator.cc
index 04590557..ec64c539 100644
--- a/src/FallocFileAllocationIterator.cc
+++ b/src/FallocFileAllocationIterator.cc
@@ -39,28 +39,11 @@
namespace aria2 {
-#ifdef __MINGW32__
-bool FallocFileAllocationIterator::gainPrivilegeAttempted_ = false;
-#endif // __MINGW32__
-
FallocFileAllocationIterator::FallocFileAllocationIterator(BinaryStream* stream,
int64_t offset,
int64_t totalLength)
: stream_(stream), offset_(offset), totalLength_(totalLength)
{
-#ifdef __MINGW32__
- // Windows build: --file-allocation=falloc uses SetFileValidData
- // which requires SE_MANAGE_VOLUME_NAME privilege. SetFileValidData
- // has security implications (see
- // https://msdn.microsoft.com/en-us/library/windows/desktop/aa365544%28v=vs.85%29.aspx).
- if (!gainPrivilegeAttempted_) {
- if (!util::gainPrivilege(SE_MANAGE_VOLUME_NAME)) {
- A2_LOG_WARN("--file-allocation=falloc will not work properly.");
- }
-
- gainPrivilegeAttempted_ = true;
- }
-#endif // __MINGW32__
}
void FallocFileAllocationIterator::allocateChunk()