--- ./tcpdump.c.orig 2005-11-01 22:43:16.000000000 +0100 +++ ./tcpdump.c 2005-11-01 22:50:29.000000000 +0100 @@ -496,7 +496,7 @@ opterr = 0; while ( - (op = getopt(argc, argv, "aA" B_FLAG "c:C:d" D_FLAG "eE:fF:i:lLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:YZ:")) != -1) + (op = getopt(argc, argv, "aA" B_FLAG "c:C:d" D_FLAG "eE:fF:i:j:lLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:YZ:")) != -1) switch (op) { case 'a': @@ -605,6 +605,10 @@ device = optarg; break; + case 'j': + chroot_dir = optarg; + break; + case 'l': #ifdef WIN32 /* @@ -1414,7 +1418,7 @@ (void)fprintf(stderr, "\t\t[ -W filecount ] [ -y datalinktype ] [ -Z user ]\n"); (void)fprintf(stderr, -"\t\t[ expression ]\n"); +"\t\t[ -j chroot ] [ expression ]\n"); exit(1); } --- ./tcpdump.1.orig 2005-11-01 22:50:41.000000000 +0100 +++ ./tcpdump.1 2005-11-01 22:57:42.000000000 +0100 @@ -50,6 +50,10 @@ .I interface ] [ +.B \-j +.I chroot +] +[ .B \-m .I module ] @@ -374,6 +378,14 @@ .I interface argument. .TP +.B \-j +If the chroot option was compiled in, then the process will change its +root to the \fIchroot\fP directory if specified, or the compiled-in +directory otherwise. Check your rights when using chroot with +.B \-C +/ +.B \-W . +.TP .B \-l Make stdout line buffered. Useful if you want to see the data