]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: verify mds tell 'dumpcache <filename>' target does not exist 197/head
authorSage Weil <sage@inktank.com>
Wed, 3 Apr 2013 22:32:51 +0000 (15:32 -0700)
committerSage Weil <sage@inktank.com>
Wed, 3 Apr 2013 22:32:51 +0000 (15:32 -0700)
commit336c4ae7adafc62867568bfe622ed4e855e18e4c
tree5357f29c7d686922f0da32b2b6b620ef82433e98
parent0d6ddd926432821842a7e40fdb78d793ab0737bb
mds: verify mds tell 'dumpcache <filename>' target does not exist

Open target with O_CREAT|O_EXCL to ensure we don't overwrite some other
important file (like, say, /etc/passwd).  This is irritating because there
is not c++ ofstream equivalent for O_EXCL; kludge around it using
ostringstream instead.

Fixes: #3266
Signed-off-by: Sage Weil <sage@inktank.com>
src/mds/MDCache.cc