]> git.pld-linux.org Git - packages/LPRng.git/blame - LPRng-setgroups.patch
- BuildRequires: automake
[packages/LPRng.git] / LPRng-setgroups.patch
CommitLineData
259080aa 1--- LPRng-3.7.4/src/common/utilities.c.setgroups Thu Jun 7 13:21:44 2001
2+++ LPRng-3.7.4/src/common/utilities.c Thu Jun 7 13:26:48 2001
abb4ea28 3@@ -16,6 +16,12 @@
259080aa 4 #include "getopt.h"
5 #include "errorcodes.h"
6
7+/* for setgroups */
abb4ea28
JB
8+#ifndef _BSD_SOURCE
9+# define _BSD_SOURCE
10+#endif
259080aa 11+#include <grp.h>
12+
13 /**** ENDINCLUDE ****/
14
15 /*
16@@ -1287,6 +1291,10 @@
17 if( UID_root ){
18 euid = geteuid();
19 To_root(); /* set RUID/EUID to root */
20+
21+ /* drop supplemental groups - crutcher@redhat.com */
22+ setgroups(0, NULL);
23+
24 status = setgid( DaemonGID );
25 err = errno;
26 if( To_uid( euid ) ){
This page took 0.031271 seconds and 4 git commands to generate.