Blame SOURCES/arpwatch-2.1a15-dropgroup.patch

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