minicoredump (will be introduced in next commit) has an option to save
/proc/<pid>/ files in report. As /proc/<pid>/fd/* contains symlinks, the
created archive will contain the contents of these fds. This is
undesirable as files might be quite big and contain private (sensitive)
data.
This commit adds -y option to zip, which will allow storing symlinks to
actual files instead of their contents (as it was available originally
under /proc/<pid>/)"
Change-Id: I0a7c9211eab1acd39da7db3930e967ddab5eceef
return;
}
- ret = snprintf(command, sizeof(command), "cd %s && /bin/zip -r %s %s > /dev/null 2>&1",
+ ret = snprintf(command, sizeof(command), "cd %s && /bin/zip -y -r %s %s > /dev/null 2>&1",
crash_info.temp_dir, zip_path, crash_info.name);
if (ret < 0) {
_E("Failed to snprintf for zip command");