home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / security / misc / 1774 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.6 KB  |  43 lines

  1. Newsgroups: comp.security.misc
  2. Path: sparky!uunet!gumby!destroyer!cs.ubc.ca!newsserver.sfu.ca!howesb
  3. From: howesb@monashee.sfu.ca (Charles Howes)
  4. Subject: Re: Ftp'ing out of a chroot()ed environment
  5. Message-ID: <1992Nov17.030943.4561@sfu.ca>
  6. Sender: news@sfu.ca
  7. Organization: Simon Fraser University, Burnaby, B.C., Canada
  8. References: <1e8od6INN1b4@ef2007.efhd.ford.com> <BxtxxJ.K4n@news.iastate.edu>
  9. Date: Tue, 17 Nov 1992 03:09:43 GMT
  10. Lines: 31
  11.  
  12. >smd@sl0091.srl.ford.com (Steve Dahmen) writes:
  13. ] Does anybody understand chroot and ftp/telnet enough to tell me why
  14. ] I can't get ftp nor telnet to run in my chrooted account??  I'd like
  15. ] to set up a user zone to allow simple ftp/telnet through without opening
  16. ] my whole system.
  17. ] I did a dump -n on the binaries and ensured the requested libraries are
  18. ] available in the chrooted environment.  Do I need anything special in
  19. ] /etc (I have resolv.conf) or /dev???
  20. ] Help.
  21.  
  22. I recommend doing a 'trace' on telnet in the normal environment, and
  23. massaging the output of that to get a list of the directories and files you
  24. need to migrate.  Here's a new-awk script that converts the trace output
  25. file into the appropriate commands:
  26. =========================fix.awk=============================================
  27. $1 ~ /^(open|stat|creat|unlink)$/ {
  28. sub("^[^\"]*\"","");
  29. sub("\".*$","");
  30. for (x=2;x<=length($0);x++)
  31.   if (substr($0,x,1)=="/") print "mkdir ~ftp"substr($0,1,x)
  32. if ($0 ~ /\/./) print "cp "$0" ~ftp"$0
  33. }
  34. =============================================================================
  35. So type:
  36.   trace -o output /usr/ucb/ftp somehost.edu
  37.   nawk -f fix.awk output > file1
  38.   sort -u < file1 > result
  39.   vi result
  40.   source result
  41.