From d49740e0a4fd7ea4348f629cbde518653e963d13 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Tue, 7 Nov 2017 09:34:34 +0000 Subject: [PATCH] Bump version and add the warning that this program needs to be run as root in the usage info --- main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 9795064..e598a2c 100644 --- a/main.cpp +++ b/main.cpp @@ -19,7 +19,7 @@ #include extern const char* __progname; -const char* version = "1.6.2"; +const char* version = "1.6.3"; static @@ -44,6 +44,10 @@ static void PrintHelpAndExit() { std::cout << __progname << " " << version << std::endl; + if (geteuid() != 0) { + std::cout << "WARNING: This program needs to be run as root." << std::endl; + std::cout << std::endl; + } std::cout << "Usage:" << std::endl; std::cout << " -h, --help Print usage" << std::endl; std::cout << " -c, --conf Specify configuration file" << std::endl;