From 1d0d800b2129a1b2521ffc603fc247daffb18850 Mon Sep 17 00:00:00 2001 From: Mateusz Moscicki Date: Mon, 26 Feb 2018 13:22:47 +0100 Subject: [PATCH] crash-manager: don't store in zip archive files referred by symlinks minicoredump (will be introduced in next commit) has an option to save /proc// files in report. As /proc//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//)" Change-Id: I0a7c9211eab1acd39da7db3930e967ddab5eceef --- src/crash-manager/crash-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crash-manager/crash-manager.c b/src/crash-manager/crash-manager.c index 4a5a44a..28d9cd0 100644 --- a/src/crash-manager/crash-manager.c +++ b/src/crash-manager/crash-manager.c @@ -762,7 +762,7 @@ static void compress(void) 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"); -- 2.7.4