home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10354 < prev    next >
Encoding:
Text File  |  1992-12-20  |  2.2 KB  |  60 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!newsfeed.rice.edu!rice!news.Rice.edu!rich
  3. From: rich@Rice.edu (& Murphey)
  4. Subject: Re: [386bsd] ftpd bugfix
  5. In-Reply-To: gtoal@robobar.co.uk's message of Thu, 17 Dec 1992 21:15:39 +0000
  6. Message-ID: <RICH.92Dec17231903@superego.Rice.edu>
  7. Sender: news@rice.edu (News)
  8. Reply-To: Rich@rice.edu
  9. Organization: Department of Electrical and Computer Engineering, Rice
  10.     University
  11. References: <9212172115.aa05898@broccoli.robobar.co.uk>
  12. Date: Fri, 18 Dec 1992 05:19:03 GMT
  13. Lines: 45
  14.  
  15. >>>>> In article <9212172115.aa05898@broccoli.robobar.co.uk>, gtoal@robobar.co.uk (Graham Toal) writes:
  16.  
  17. Graham> Thanks to pauls@umich, we now know the reason for occassional problems
  18. Graham> with the new ftp server that allows you to fetch whole directories as
  19. Graham> .tar files.  What happens is that if the tar finds an unreadable file,
  20. Graham> it skips it and outputs an error message to the 'screen' - unfortunately
  21. Graham> because of the way the job is piped into ftp this ends up in the tar
  22. Graham> file which then fails to unpack properly.
  23.  
  24. Graham> The interim solution is to make sure all your files are permitted!
  25. Graham> The long-term solution is to fix the ftpd code so that error messages
  26. Graham> are directed somewhere else, and if possible reported to the ftp client.
  27.  
  28. Graham> Graham
  29.  
  30. Thanks very much for tracking this down!
  31.  
  32. The following patch fixes the bug Graham describes.  We still need to
  33. add error reporting, but this will help meanwhile.  Any comments on
  34. that are welcome!
  35.  
  36. I'll update the sources and binaries on ref.tfs.com (140.145.254.251)
  37. in /usr/packages/ftpd-*.tar.Z and post another followup. Rich
  38.  
  39.  
  40. diff -c -r1.1 popen.c
  41. *** /tmp/,RCSt1012643    Thu Dec 17 23:05:46 1992
  42. --- popen.c    Thu Dec 17 23:05:02 1992
  43. ***************
  44. *** 108,114 ****
  45.           if (*type == 'r') {
  46.               if (pdes[1] != 1) {
  47.                   dup2(pdes[1], 1);
  48. !                 dup2(pdes[1], 2);    /* stderr, too! */
  49.                   (void)close(pdes[1]);
  50.               }
  51.               (void)close(pdes[0]);
  52. --- 108,114 ----
  53.           if (*type == 'r') {
  54.               if (pdes[1] != 1) {
  55.                   dup2(pdes[1], 1);
  56. !                 /* dup2(pdes[1], 2);    /* stderr, too! */
  57.                   (void)close(pdes[1]);
  58.               }
  59.               (void)close(pdes[0]);
  60.