summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2016-12-02 08:47:03 -0500
committerFurkan Sahin <furkan-dev@proton.me>2016-12-02 08:47:03 -0500
commitca8a4391fa7dcebe133510e7e3ad99694d369441 (patch)
tree6732549afe4b7aacdddbc4a041435fd184ffcef4
parente218de2dbe0c6b287a1bff9e2334564d02da25f8 (diff)
Unset LD_PRELOAD on startup (before dropping root)
LD_PRELOAD enables keyloggers to easily be made. This solution isn't perfect - really a secure system wouldn't have LD_PRELOAD at all. It was a stupid idea in the first place.
-rw-r--r--sway/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c
index d396089c..1db88da2 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -220,6 +220,8 @@ int main(int argc, char **argv) {
" --get-socketpath Gets the IPC socket path and prints it, then exits.\n"
"\n";
+ unsetenv("LD_PRELOAD"); // Security
+
int c;
while (1) {
int option_index = 0;