From: Sage Weil Date: Fri, 22 Mar 2013 20:25:49 +0000 (-0700) Subject: common/MemoryModel: remove logging to /tmp/memlog X-Git-Tag: v0.56.4~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=664ffa7d2178e486b00fa0706067f19b1bb9ab82;p=ceph.git common/MemoryModel: remove logging to /tmp/memlog This was a hack for dev purposes ages ago; remove it. The predictable filename is a security issue. CVE-2013-1882 Reported-by: Michael Scherer Signed-off-by: Sage Weil Reviewed-by: Dan Mick (cherry picked from commit c524e2e01da41ab5b6362c117939ea1efbd98095) --- diff --git a/src/common/MemoryModel.cc b/src/common/MemoryModel.cc index b21ed6133bc3..f737a7b88d6d 100644 --- a/src/common/MemoryModel.cc +++ b/src/common/MemoryModel.cc @@ -97,19 +97,7 @@ void MemoryModel::_sample(snap *psnap) psnap->malloc = mi.uordblks >> 10; psnap->mmap = mi.hblks >> 10; - - - ofstream log("/tmp/memlog", ios::app); - log << "heap " << heap - << "\trss " << psnap->rss - << "\tmi\t" << mi.arena - << "\t" << mi.ordblks - << "\t" << mi.uordblks / 1024 - << "\t" << mi.fordblks / 1024 - << "\t" << mi.hblks - << "\t" << mi.hblkhd / 1024 - << std::endl; #else -#warning "Not implemented!" +#warning "mallinfo not implemented" #endif }