Switch user ID/root directory with -Z before opening savefiles for output.

In addition to Paul's change, I added a comment explaining why we do
this, and explaining that doing so after opening the first savefile
doesn't help with subsequent savefiles, so you'll have to come up with a
better fix if you want the savefiles opened by the original UID or
outside the chroot.

Reviewed-By: Guy Harris <guy@alum.mit.edu>
2 files changed
tree: b25db2ed8e7c1153db977eeaaba1260fd4d17373
  1. lbl/
  2. missing/
  3. tests/
  4. Win32/
  5. win32/
  6. .cvsignore
  7. .gitignore
  8. acconfig.h
  9. aclocal.m4
  10. addrtoname.c
  11. addrtoname.h
  12. af.c
  13. af.h
  14. ah.h
  15. aodv.h
  16. appletalk.h
  17. arcnet.h
  18. atime.awk
  19. atm.h
  20. atmuni31.h
  21. bgp.h
  22. bootp.h
  23. bpf_dump.c
  24. CHANGES
  25. chdlc.h
  26. checksum.c
  27. config.guess
  28. config.h.in
  29. config.sub
  30. configure
  31. configure.in
  32. cpack.c
  33. cpack.h
  34. CREDITS
  35. dccp.h
  36. decnet.h
  37. decode_prefix.h
  38. enc.h
  39. esp.h
  40. ether.h
  41. ethertype.h
  42. extract.h
  43. fddi.h
  44. forces.h
  45. gmpls.c
  46. gmpls.h
  47. gmt2local.c
  48. gmt2local.h
  49. icmp6.h
  50. ieee802_11.h
  51. ieee802_11_radio.h
  52. igrp.h
  53. install-sh
  54. INSTALL.txt
  55. interface.h
  56. ip.h
  57. ip6.h
  58. ipfc.h
  59. ipnet.h
  60. ipproto.c
  61. ipproto.h
  62. ipsec_doi.h
  63. ipx.h
  64. isakmp.h
  65. l2tp.h
  66. l2vpn.c
  67. l2vpn.h
  68. lane.h
  69. LICENSE
  70. llc.h
  71. machdep.c
  72. machdep.h
  73. Makefile-devel-adds
  74. Makefile.in
  75. makemib
  76. mib.h
  77. mkdep
  78. mpls.h
  79. nameser.h
  80. netbios.h
  81. netdissect.h
  82. nfs.h
  83. nfsfh.h
  84. nlpid.c
  85. nlpid.h
  86. ntp.h
  87. oakley.h
  88. ospf.h
  89. ospf6.h
  90. oui.c
  91. oui.h
  92. packetdat.awk
  93. parsenfsfh.c
  94. pcap-missing.h
  95. pcap_dump_ftell.c
  96. PLATFORMS
  97. pmap_prot.h
  98. ppp.h
  99. print-802_11.c
  100. print-802_15_4.c
  101. print-ah.c
  102. print-aodv.c
  103. print-ap1394.c
  104. print-arcnet.c
  105. print-arp.c
  106. print-ascii.c
  107. print-atalk.c
  108. print-atm.c
  109. print-beep.c
  110. print-bfd.c
  111. print-bgp.c
  112. print-bootp.c
  113. print-bt.c
  114. print-cdp.c
  115. print-cfm.c
  116. print-chdlc.c
  117. print-cip.c
  118. print-cnfp.c
  119. print-dccp.c
  120. print-decnet.c
  121. print-dhcp6.c
  122. print-domain.c
  123. print-dtp.c
  124. print-dvmrp.c
  125. print-eap.c
  126. print-egp.c
  127. print-eigrp.c
  128. print-enc.c
  129. print-esp.c
  130. print-ether.c
  131. print-fddi.c
  132. print-forces.c
  133. print-fr.c
  134. print-frag6.c
  135. print-gre.c
  136. print-hsrp.c
  137. print-icmp.c
  138. print-icmp6.c
  139. print-igmp.c
  140. print-igrp.c
  141. print-ip.c
  142. print-ip6.c
  143. print-ip6opts.c
  144. print-ipcomp.c
  145. print-ipfc.c
  146. print-ipnet.c
  147. print-ipx.c
  148. print-isakmp.c
  149. print-isoclns.c
  150. print-juniper.c
  151. print-krb.c
  152. print-l2tp.c
  153. print-lane.c
  154. print-ldp.c
  155. print-llc.c
  156. print-lldp.c
  157. print-lmp.c
  158. print-lspping.c
  159. print-lwapp.c
  160. print-lwres.c
  161. print-mobile.c
  162. print-mobility.c
  163. print-mpcp.c
  164. print-mpls.c
  165. print-msdp.c
  166. print-netbios.c
  167. print-nfs.c
  168. print-ntp.c
  169. print-null.c
  170. print-olsr.c
  171. print-ospf.c
  172. print-ospf6.c
  173. print-pflog.c
  174. print-pgm.c
  175. print-pim.c
  176. print-ppp.c
  177. print-pppoe.c
  178. print-pptp.c
  179. print-radius.c
  180. print-raw.c
  181. print-rip.c
  182. print-ripng.c
  183. print-rrcp.c
  184. print-rsvp.c
  185. print-rt6.c
  186. print-rx.c
  187. print-sctp.c
  188. print-sflow.c
  189. print-sip.c
  190. print-sl.c
  191. print-sll.c
  192. print-slow.c
  193. print-smb.c
  194. print-snmp.c
  195. print-stp.c
  196. print-sunatm.c
  197. print-sunrpc.c
  198. print-symantec.c
  199. print-syslog.c
  200. print-tcp.c
  201. print-telnet.c
  202. print-tftp.c
  203. print-timed.c
  204. print-token.c
  205. print-udld.c
  206. print-udp.c
  207. print-usb.c
  208. print-vjc.c
  209. print-vqp.c
  210. print-vrrp.c
  211. print-vtp.c
  212. print-wb.c
  213. print-zephyr.c
  214. README
  215. Readme.Win32
  216. route6d.h
  217. rpc_auth.h
  218. rpc_msg.h
  219. rx.h
  220. sctpConstants.h
  221. sctpHeader.h
  222. send-ack.awk
  223. setsignal.c
  224. setsignal.h
  225. signature.c
  226. signature.h
  227. slcompress.h
  228. slip.h
  229. sll.h
  230. smb.h
  231. smbutil.c
  232. stime.awk
  233. strcasecmp.c
  234. tcp.h
  235. tcpdump-stdinc.h
  236. tcpdump.1.in
  237. tcpdump.c
  238. telnet.h
  239. tftp.h
  240. timed.h
  241. TODO
  242. token.h
  243. udp.h
  244. util.c
  245. VERSION
  246. vfprintf.c