home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- 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
- From: richard@crowded-house.den.mmc.com (Richard Armstrong)
- Subject: Re: Executing Code during SYSTEM() calls?
- Message-ID: <1992Dec17.163545.23590@den.mmc.com>
- Sender: news@den.mmc.com (News)
- Nntp-Posting-Host: crowded-house.den.mmc.com
- Organization: Martin Marietta
- References: <1992Dec14.173329.45635@kuhub.cc.ukans.edu>
- Date: Thu, 17 Dec 1992 16:35:45 GMT
- Lines: 34
-
- In article <1992Dec14.173329.45635@kuhub.cc.ukans.edu> jwilson@kuhub.cc.ukans.edu writes:
- >I am working on writing a front end program which will transfer
- >files from a VAX/VMS system to a SUN/UNIX system via FTP. I have
- >the file handling and idiot-proofing done but I have not discovered
- >a method of using the FTP mechanism while the c code is still executing.
- >I have been using the ANSI function system(). However, once the intrepreter
- >has control of the system, I can no longer issue commands to login to the
- >sun system with USER and PASSWD. It is necessary to hide the login from
- >the user for reasons of simplicity and security. Does anyone know of a
- >mechanism which 'C' or FTP provides to accomplish this task? Any help
- >would be greatly appreciated.
- >
- >-Jason
- >jwilson@kuhub.cc.ukans.edu
-
- Look at .netrc for the sun side. You want to create a macro that executes
- when you log onto the sun. You can issue any ftp commands in this .netrc
- file. That is how I get automatic ftp logins and file transfers to happen
- without user intervention. I think this is what you were trying to do.
-
- The user still needs to issue the first user id and password, but after that,
- it can all happen automatically. Depending on how you have things setup, you
- could have that first user-id exist without a password, and have that userid
- .cshrc issue the ftp command, and immediately log out.
-
- I have to do this all the time, so if you need further assistance, then email
- me.
-
-
- --
- My company never said any of this... I didn't either.
- Richard Armstrong, Software Engineer, Martin Marietta
- Email->>>> richard@crowded-house.den.mmc.com <<<<-Email
-
-