Skip to content

Commit

Permalink
Fix uid < 0 always false check
Browse files Browse the repository at this point in the history
  • Loading branch information
ambakshi committed May 22, 2015
1 parent ab49e91 commit 6b0e98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void drop_privileges()
{
LogSpam << "drop_privileges()";
uid_t uid = dropped_uid();
if (uid < 0)
if (uid == (uid_t)-1)
{
throw std::runtime_error("User " + user.get() + " is not known.");
}
Expand Down

0 comments on commit 6b0e98a

Please sign in to comment.