summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-01 16:30:19 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-01 16:30:19 +0200
commit3d5abae17b08fab3e418da2c7cfe98652ff63f5d (patch)
tree304c20862239844f4558a194526415acab730b8f
parent8d4d1c74579b52b32b9484a7a7ce4d6b0d9dab94 (diff)
downloadserenity-3d5abae17b08fab3e418da2c7cfe98652ff63f5d.zip
lsof: Fix some minor issues
Correct copyright year, fix a comment and add missing veil lock.
-rw-r--r--Userland/lsof.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/lsof.cpp b/Userland/lsof.cpp
index 795b16cbc3..510e59c8fc 100644
--- a/Userland/lsof.cpp
+++ b/Userland/lsof.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020, Maciej Zygmanowski <sppmacd@pm.me>
+ * Copyright (c) 2020, Maciej Zygmanowski <sppmacd@pm.me>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -88,10 +88,12 @@ int main(int argc, char* argv[])
// needed by ProcessStatisticsReader::get_all()
if (unveil("/etc/passwd", "r") < 0) {
- perror("unveil /proc");
+ perror("unveil /etc/passwd");
return 1;
}
+ unveil(nullptr, nullptr);
+
bool arg_all_processes { false };
int arg_fd { -1 };
const char* arg_uid { nullptr };