From b805963b3a7d49ff90dabae9cf3086e7bc6f1517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Friedrich=20Scho=CC=88ller?= Date: Wed, 22 May 2013 02:13:23 +0200 Subject: [PATCH] Throw exception when trying to drop privileges on windows --- src/worker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/worker.cpp b/src/worker.cpp index d183d2b..0b9e672 100644 --- a/src/worker.cpp +++ b/src/worker.cpp @@ -195,7 +195,9 @@ void Worker::stop() void Worker::dropPrivileges() { -#ifndef WIN32 +#ifdef WIN32 + throw Exception("not supported"); +#else if (uid <= 0 || privilegesDropped) return;