Blame SOURCES/arpwatch-2.1a15-dropgroup.patch

1b6bc8
diff -up arpwatch-2.1a15/arpwatch.c.dropgroup arpwatch-2.1a15/arpwatch.c
1b6bc8
--- arpwatch-2.1a15/arpwatch.c.dropgroup	2012-05-31 11:47:13.327901902 +0200
1b6bc8
+++ arpwatch-2.1a15/arpwatch.c	2012-05-31 11:48:04.859900061 +0200
1b6bc8
@@ -147,7 +147,7 @@ void dropprivileges(const char* user)
1b6bc8
 	struct passwd* pw;
1b6bc8
 	pw = getpwnam( user );
1b6bc8
 	if ( pw ) {
1b6bc8
-		if ( initgroups(pw->pw_name, NULL) != 0 || setgid(pw->pw_gid) != 0 ||
1b6bc8
+		if ( setgid(pw->pw_gid) != 0 || setgroups(0, NULL) != 0 ||
1b6bc8
 				 setuid(pw->pw_uid) != 0 ) {
1b6bc8
 			syslog(LOG_ERR, "Couldn't change to '%.32s' uid=%d gid=%d", user,
1b6bc8
 						 pw->pw_uid, pw->pw_gid);