We have a small C program that is run by the system at start time (important as this does affect STDIN|OUT|ERR). This C program reads a few variables from the /etc/[url removed, login to view] and then uses these variables to craft an SSH cmd with appropriate parameters. The SSH connects out to an SSHD server and sets up a few portforwarding tunnels. The program works admirably for this.
We need to extend this program so that i can read the STDERR and react. In particular, three errors that would normaly be "warnings" from the ssh program we would like to make "fatal". Such that if the program reads any of the following three errors it would simply kill the ssh program and exit.
bind: Address already in use
Could not request local forwarding.
channel_setup_fwd_listener: cannot listen to port: XXXX
Included in the attached zip file:
vpn.c is the actual c program we run
[url removed, login to view] is the example of the config file variables it reads.
*note* the ssh accounts use public key authentication so no passwords are exchanged.
Also, the program _MUST_ be verfied to run in the background as kicked off at startup script or from a cron job. We have had this developed as a foreground application in the past only to have it fail the minute you try to run it from the background with no controlling tty.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
FreeBSD [url removed, login to view]