Changeset ea80d58 in rtems-libbsd
- Timestamp:
- 05/11/22 06:09:03 (2 months ago)
- Branches:
- 5-freebsd-12
- Children:
- f05e625
- Parents:
- 45c9bd2
- git-author:
- Sebastian Huber <sebastian.huber@…> (05/11/22 06:09:03)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (05/12/22 05:52:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freebsd/contrib/tcpdump/tcpdump.c
r45c9bd2 rea80d58 208 208 static void warning(FORMAT_STRING(const char *), ...) PRINTFLIKE(1, 2); 209 209 static void exit_tcpdump(int) NORETURN; 210 #ifndef __rtems__ 210 211 static RETSIGTYPE cleanup(int); 211 212 static RETSIGTYPE child_cleanup(int); 213 #endif /* __rtems__ */ 212 214 static void print_version(void); 213 215 static void print_usage(void); … … 221 223 static void dump_packet_and_trunc(u_char *, const struct pcap_pkthdr *, const u_char *); 222 224 static void dump_packet(u_char *, const struct pcap_pkthdr *, const u_char *); 225 #ifndef __rtems__ 223 226 static void droproot(const char *, const char *); 224 227 … … 234 237 static void verbose_stats_dump(int sig); 235 238 #endif 239 #endif /* __rtems__ */ 236 240 237 241 static void info(int); … … 625 629 }; 626 630 631 #ifndef __rtems__ 627 632 #ifndef _WIN32 628 633 /* Drop root privileges and chroot if necessary */ … … 656 661 } 657 662 #else 658 #ifndef __rtems__659 663 if (initgroups(pw->pw_name, pw->pw_gid) != 0 || 660 664 setgid(pw->pw_gid) != 0 || setuid(pw->pw_uid) != 0) { … … 669 673 fprintf(stderr, "dropped privs to %s\n", username); 670 674 } 671 #endif /* __rtems__ */672 675 #endif /* HAVE_LIBCAP_NG */ 673 676 } … … 691 694 } 692 695 #endif /* _WIN32 */ 696 #endif /* __rtems__ */ 693 697 694 698 static int … … 1295 1299 const char *dlt_name; 1296 1300 struct bpf_program fcode; 1301 #ifndef __rtems__ 1297 1302 #ifndef _WIN32 1298 1303 RETSIGTYPE (*oldhandler)(int); 1299 1304 #endif 1305 #endif /* __rtems__ */ 1300 1306 struct dump_info dumpinfo; 1301 1307 u_char *pcap_userdata; 1302 1308 char ebuf[PCAP_ERRBUF_SIZE]; 1303 1309 char VFileLine[PATH_MAX + 1]; 1310 #ifndef __rtems__ 1304 1311 char *username = NULL; 1305 1312 char *chroot_dir = NULL; 1313 #endif /* __rtems__ */ 1306 1314 char *ret = NULL; 1307 1315 char *end; … … 1675 1683 break; 1676 1684 1685 #ifndef __rtems__ 1677 1686 case 'Z': 1678 1687 username = optarg; 1679 1688 break; 1689 #endif /* __rtems__ */ 1680 1690 1681 1691 case '#': … … 1974 1984 init_print(ndo, localnet, netmask, timezone_offset); 1975 1985 1986 #ifndef __rtems__ 1976 1987 #ifndef _WIN32 1977 1988 (void)setsignal(SIGPIPE, cleanup); … … 2041 2052 } 2042 2053 #endif /* _WIN32 */ 2054 #endif /* __rtems__ */ 2043 2055 2044 2056 if (pcap_setfilter(pd, &fcode) < 0) … … 2148 2160 } 2149 2161 2162 #ifndef __rtems__ 2150 2163 #ifdef SIGNAL_REQ_INFO 2151 2164 /* … … 2172 2185 #endif 2173 2186 } 2187 #endif /* __rtems__ */ 2174 2188 2175 2189 if (RFileName == NULL) { … … 2345 2359 } 2346 2360 2361 #ifndef __rtems__ 2347 2362 /* make a clean exit on interrupts */ 2348 2363 static RETSIGTYPE … … 2397 2412 } 2398 2413 #endif /* HAVE_FORK && HAVE_VFORK */ 2414 #endif /* __rtems__ */ 2399 2415 2400 2416 static void … … 2757 2773 #endif 2758 2774 2775 #ifndef __rtems__ 2759 2776 #ifdef SIGNAL_REQ_INFO 2760 2777 RETSIGTYPE requestinfo(int signo _U_) … … 2785 2802 } 2786 2803 #endif 2804 #endif /* __rtems__ */ 2787 2805 2788 2806 USES_APPLE_DEPRECATED_API
Note: See TracChangeset
for help on using the changeset viewer.