
Hi, I use write_xml() function and boost-1.46.0-4 on arch linux. void create() { ... out_file.save("/machines/"+name); .... void serializer::save (const std::string &filename) { boost::property_tree::xml_parser::xml_writer_settings<char> gramma(' ',8); write_xml(filename, pt, std::locale(), gramma); } This function don't chroot. readlink -f /proc/5682/cwd /home/iwan Write_xml() create the /machines/+name But it must create a path /home/iwan/machines/+name Why? It is bug? I am sorry for my bad english.

I use write_xml() function and boost-1.46.0-4 on arch linux.
void create() { ... out_file.save("/machines/"+name); <...>
Write_xml() create the /machines/+name But it must create a path /home/iwan/machines/+name
Why? It is bug?
/machines/name is absolute path, isn't it? What if you call fopen("/machines/name", "w")? I guess it will create the file in /machines as well.
participants (2)
-
Igor R
-
Иван