tcpdump-4.0.0-3.20090921gitdf3cb4.2.el6-local.patches at [def5a6d71c]

File archive/tcpdump-4.0.0-3.20090921gitdf3cb4.2.el6-local.patches artifact 5cdb9b1556 part of check-in def5a6d71c


--- tcpdump/tcpdump.c	2014-02-20 13:04:20.077631000 -0600
+++ tcpdump-1rsk/tcpdump.c	2014-02-20 13:03:16.942631000 -0600
@@ -387,18 +387,20 @@
 #define U_FLAG
 #endif
 
-#ifndef WIN32
 /* Drop root privileges and chroot if necessary */
 static void
 droproot(const char *username, const char *chroot_dir)
 {
+#ifndef WIN32
 	struct passwd *pw = NULL;
+#endif
 
 	if (chroot_dir && !username) {
 		fprintf(stderr, "tcpdump: Chroot without dropping root is insecure\n");
 		exit(1);
 	}
 	
+#ifndef WIN32
 	pw = getpwnam(username);
 	if (pw) {
 		if (chroot_dir) {
@@ -423,8 +425,8 @@
 		    username);
 		exit(1);
 	}
+#endif
 }
-#endif /* WIN32 */
 
 static int
 getWflagChars(int x)