Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Update error message when program started as root
Browse files Browse the repository at this point in the history
1. Also fixing some typos in main.cpp
  • Loading branch information
aditya-shantanu committed May 30, 2017
1 parent e81cb4a commit 9ce08a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bool g_InVerbose;
//
std::unordered_map<std::string, class ServerInfo*> g_ServerInfoMap;

// Global variable used to determine if logfile path was givem;
// Global variable used to determine if log file path was given;
//
bool g_UseLogFile;

Expand Down Expand Up @@ -345,7 +345,7 @@ CheckAllSetPaths(void)
status = CheckIfDirectoryExists(g_UserPaths.m_dumpPath.c_str());
if (status)
{
fprintf(stderr, "Dump direcotry '%s' should not exist at startup\n",
fprintf(stderr, "Dump directory '%s' should not exist at startup\n",
g_UserPaths.m_dumpPath.c_str());
assert(0);
}
Expand Down Expand Up @@ -705,7 +705,8 @@ main(
// Rejecting request if root is trying to run this
if ((getuid() == 0) || (geteuid() == 0))
{
fprintf(stderr, "Running as root opens unwanted security holes\n");
fprintf(stderr, "DBFS should not be started with root privileges. "
"Please exit root before starting DBFS.\n");
result = -1;
}

Expand Down

0 comments on commit 9ce08a0

Please sign in to comment.