Error Reading Information On Service Telnet Bad File Descriptor
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Connect Bad File Descriptor
About Us Learn more about Stack Overflow the company Business Learn more about bad file descriptor c hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why am I getting a bad file descriptor error? up vote 2 down vote favorite I am trying to write a short program that acts like a client, like telnet. I receive from the user input like so: www.google.com 80 (the port number) and /index.html However, I get some errors. When I write some debug information, it says that I have a bad file descriptor and Read Failed on file descriptor 100 messagesize = 0. struct hostent * pHostInfo; struct sockaddr_in Address; long nHostAddress; char pBuffer[BUFFER_SIZE]; unsigned nReadAmount; int nHostPort = atoi(port); vector
The telnet protocol uses unencrypted network communication, which means that data from the login session, including passwords and all other information transmitted during the session, can be stolen by eavesdroppers on the network. The telnet protocol is also subject to man-in-the-middle attacks. Mitigation: If an enabled telnet daemon is configured to only allow encrypted sessions, http://stackoverflow.com/questions/7406290/why-am-i-getting-a-bad-file-descriptor-error such as with Kerberos or the use of encrypted network tunnels, the risk of exposing sensitive information is mitigated. STIG Date Oracle Linux 6 Security Technical Implementation Guide 2015-06-09 Details Check Text ( C-53075r1_chk ) To check that the "telnet" service is disabled in system boot https://www.stigviewer.com/stig/oracle_linux_6/2015-06-09/finding/V-50553 configuration, run the following command: # chkconfig "telnet" --listOutput should indicate the "telnet" service has either not been installed, or has been disabled, as shown in the example below:# chkconfig "telnet" --listtelnet offORerror reading information on service telnet: No such file or directoryIf the service is running, this is a finding. Fix Text (F-55351r1_fix) The "telnet" service can be disabled with the following command: # chkconfig telnet off Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus Scope, Define, and Maintain Regulatory Demands Online in Minutes. LEARN MORE Contact 244 Lafayette CircleLafayette, CA 94549 PHONE 510.962.5192FAX 866.924.3791info@unifiedcompliance.com Quick Links Home Company Products Partners Peer Review Contact Support Legal Stay connected with UCF Twitter Facebook LinkedIn © 2015 Network Frontiers LLCAll right reserved. Stay connected with UCF Twitter Facebook LinkedIn
a Support Case Contact Support Policies and Warranties Documentation Products BIG-IP LTM BIG-IP AAM BIG-IP AFM BIG-IP Analytics BIG-IP APM BIG-IP ASM http://support.f5.com/kb/en-us/products/arx/manuals/product/arx-cli-maintenance-6-3-0/troubleshoot.html BIG-IP DNS BIG-IP GTM BIG-IP Link Controller BIG-IP PEM BIG-IQ Centralized https://www.stunnel.org/faq.html Management FirePass Mobile & App Store Apps F5 iWorkflow DDoS Hybrid Defender SSL Orchestrator View all Products Architectures Amazon Web Services Services Consulting Training Certification Support Programs Need Additional Help? Open a Support Case Contact Support Policies and Warranties Downloads BIG-IP bad file 12.x BIG-IP 11.x BIG-IP 10.x BIG-IP 9.x BIG-IQ Enterprise Manager 3.x FirePass Platform / EUD See All Downloads AskF5 Home Products ARX ARX CLI Maintenance Guide Troubleshooting Tools Applies To: Show Versions ARX 6.3.0 Manual Chapter: Troubleshooting Tools Table of Contents | <
or SSLeay. In that case you should download and compile one of them. OpenSSL can be found at www.openssl.org. The other possibility is that you installed your SSL library in a non-standard place. Use the --with-ssl directive when running configure to tell it where this directory is. Configure is not finding my TCP Wrapper installation You probably have it in a non-standard place, i.e. somewhere that gcc cannot find it on its own. Lets say you had your tcp wrappers installed in /opt/tcpd_7.6. To help gcc find your include files and libraries, you should set three environment variables as follows: CFLAGS="$CFLAGS -I/opt/tcpd_7.6/include" CPPFLAGS="$CPPFLAGS -I/opt/tcpd_7.6/include" LDFLAGS="$LDFLAGS -L/opt/tcpd_7.6/lib" export CFLAGS CPPFLAGS LDFLAGS And then re-run configure. This is the generic way to have configure find specific libraries, and is not specific to stunnel itself. What to do when stunnel fails Firstly, the most important things to try when you are having trouble running stunnel is to: run with full debug mode debug = 7 if running the daemon, run it in the foreground foreground = yes Doing this gives you the best chance of catching the errors in the log on the screen. I do not have the openssl binary / Cannot make stunnel.pem! If you do not have the openssl program (for example you are using the pre-compiled version of stunnel on a Windows machine) then you need to generate an stunnel.pem file in some other manner. You can find a spare Unix workstation that does have OpenSSL installed, for example. When I run stunnel, it just sits there, it does not listen for requests! You are probably missing the [service] definition in your config. For example: pid = /stunnel.pid setuid = nobody setgid = nobody debug = local6.err foreground = no client = yes [mysyslog] accept = localhost:syslog connect = logging:syslogs Without that [mysyslog] line, stunnel assumes you want to operate in inetd-style mode. I get the error "Wrong permissions on stunnel.pem" I get the error stunnel[