conf: record idmap that gets written

This will serve us well in the future! Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 9d6c5eff
...@@ -2515,15 +2515,20 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid) ...@@ -2515,15 +2515,20 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid)
lxc_map_ids_exec_wrapper, lxc_map_ids_exec_wrapper,
(void *)mapbuf); (void *)mapbuf);
if (ret < 0) { if (ret < 0) {
ERROR("new%cidmap failed to write mapping: %s", ERROR("new%cidmap failed to write mapping \"%s\": %s",
u_or_g, cmd_output); u_or_g, cmd_output, mapbuf);
return -1; return -1;
} }
TRACE("new%cidmap wrote mapping \"%s\"", u_or_g, mapbuf);
} else { } else {
ret = write_id_mapping(type, pid, mapbuf, pos - mapbuf); ret = write_id_mapping(type, pid, mapbuf, pos - mapbuf);
if (ret < 0) if (ret < 0) {
ERROR("Failed to write mapping \"%s\": %s",
cmd_output, mapbuf);
return -1; return -1;
} }
TRACE("Wrote mapping \"%s\"", mapbuf);
}
memset(mapbuf, 0, sizeof(mapbuf)); memset(mapbuf, 0, sizeof(mapbuf));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment