[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 2/4] Drop also supplementary groups when dropping priv
From: |
Miroslav Lichvar |
Subject: |
[gpsd-dev] [PATCH 2/4] Drop also supplementary groups when dropping privileges. |
Date: |
Fri, 22 Nov 2013 18:19:41 +0100 |
---
gpsd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gpsd.c b/gpsd.c
index c77f684..76d1850 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2059,6 +2059,10 @@ int main(int argc, char *argv[])
* of any compromises in the code. It requires that all GPS
* devices have their group read/write permissions set.
*/
+ if (setgroups(0, NULL) != 0)
+ gpsd_report(context.debug, LOG_ERROR,
+ "setgroups() failed, errno %s\n",
+ strerror(errno));
/address@hidden@*/
#ifdef GPSD_GROUP
{
--
1.8.3.1