Blame SOURCES/0111-a-a-i-d-t-a-cache-sanitize-umask.patch

06486d
From 9a4100678fea4d60ec93d35f4c5de2e9ad054f3a Mon Sep 17 00:00:00 2001
06486d
From: Jakub Filak <jfilak@redhat.com>
06486d
Date: Wed, 29 Apr 2015 14:13:57 +0200
06486d
Subject: [ABRT PATCH] a-a-i-d-t-a-cache: sanitize umask
06486d
06486d
We cannot trust anything when running suided program.
06486d
06486d
Related: #1216962
06486d
06486d
Signed-off-by: Jakub Filak <jfilak@redhat.com>
06486d
---
06486d
 src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c | 3 +++
06486d
 1 file changed, 3 insertions(+)
06486d
06486d
diff --git a/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c b/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c
06486d
index eb2f7c5..cd9ee7a 100644
06486d
--- a/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c
06486d
+++ b/src/plugins/abrt-action-install-debuginfo-to-abrt-cache.c
06486d
@@ -182,6 +182,9 @@ int main(int argc, char **argv)
06486d
         if (u != 0)
06486d
             strcpy(path_env, "PATH=/usr/bin:/bin:"BIN_DIR);
06486d
         putenv(path_env);
06486d
+
06486d
+        /* Use safe umask */
06486d
+        umask(0022);
06486d
     }
06486d
 
06486d
     execvp(EXECUTABLE, (char **)args);
06486d
-- 
06486d
1.8.3.1
06486d