Fixed "not supported" error on Windows

This commit is contained in:
Friedrich Schöller 2016-01-05 16:05:10 +01:00
parent 74bad3b702
commit 032089ce7a

View File

@ -195,12 +195,12 @@ void Worker::stop()
void Worker::dropPrivileges()
{
#ifdef WIN32
throw Exception("not supported");
#else
if (uid <= 0 || privilegesDropped)
return;
#ifdef WIN32
throw Exception("dropping privileges not supported");
#else
syslog(LOG_INFO, "dropping privileges");
if (setgid(gid) == -1)