home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18540 < prev    next >
Encoding:
Text File  |  1992-12-17  |  2.1 KB  |  47 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!crowded-house!richard
  3. From: richard@crowded-house.den.mmc.com (Richard Armstrong)
  4. Subject: Re: Executing Code during SYSTEM() calls?
  5. Message-ID: <1992Dec17.163545.23590@den.mmc.com>
  6. Sender: news@den.mmc.com (News)
  7. Nntp-Posting-Host: crowded-house.den.mmc.com
  8. Organization: Martin Marietta
  9. References: <1992Dec14.173329.45635@kuhub.cc.ukans.edu>
  10. Date: Thu, 17 Dec 1992 16:35:45 GMT
  11. Lines: 34
  12.  
  13. In article <1992Dec14.173329.45635@kuhub.cc.ukans.edu> jwilson@kuhub.cc.ukans.edu writes:
  14. >I am working on writing a front end program which will transfer
  15. >files from a VAX/VMS system to a SUN/UNIX system via FTP.  I have
  16. >the file handling and idiot-proofing done but I have not discovered
  17. >a method of using the FTP mechanism while the c code is still executing.
  18. >I have been using the ANSI function system().  However, once the intrepreter
  19. >has control of the system, I can no longer issue commands to login to the
  20. >sun system with USER and PASSWD.  It is necessary to hide the login from
  21. >the user for reasons of simplicity and security.  Does anyone know of a
  22. >mechanism which 'C' or FTP provides to accomplish this task?  Any help
  23. >would be greatly appreciated.
  24. >
  25. >-Jason
  26. >jwilson@kuhub.cc.ukans.edu
  27.  
  28. Look at .netrc for the sun side.  You want to create a macro that executes
  29. when you log onto the sun.  You can issue any ftp commands in this .netrc 
  30. file.  That is how I get automatic ftp logins and file transfers to happen
  31. without user intervention. I think this is what you were trying to do.
  32.  
  33. The user still needs to issue the first user id and password, but after that,
  34. it can all happen automatically. Depending on how you have things setup, you
  35. could have that first user-id exist without a password, and have that userid
  36. .cshrc issue the ftp command, and immediately log out.
  37.  
  38. I have to do this all the time, so if you need further assistance, then email
  39. me.
  40.  
  41.  
  42. -- 
  43. My company never said any of this... I didn't either.
  44. Richard Armstrong, Software Engineer, Martin Marietta
  45. Email->>>> richard@crowded-house.den.mmc.com <<<<-Email 
  46.  
  47.