so the exported auth can be re-imported.
Fixes: http://tracker.ceph.com/issues/22227
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
1f9e54ea00d6e31136a8157b96bc0cbf70301961)
Conflicts:
src/auth/KeyRing.cc
- namespace refactor took place post-luminous
#include <memory>
#include <sstream>
#include <algorithm>
+#include <boost/algorithm/string/replace.hpp>
#include "auth/KeyRing.h"
#include "common/config.h"
#include "common/debug.h"
bufferlist::iterator dataiter = q->second.begin();
string caps;
::decode(caps, dataiter);
+ boost::replace_all(caps, "\"", "\\\"");
out << "\tcaps " << q->first << " = \"" << caps << '"' << std::endl;
}
}