Questions tagged [inetd]

37 questions
8
votes
3 answers

Recovering IP/Port from Socket Descriptor

I'm writing a clone of inetd in which I must run a server that prints the IP and port of the client connecting to it. As I overwrite STDIN and STDOUT with the socket descriptor, my initial solution to do this was to recover the sockaddr_in…
konr
  • 2,545
  • 2
  • 20
  • 38
8
votes
2 answers

How can I turn either a Unix POSIX file descriptor or standard input Handle into a Socket?

In inetd and systemd type systems, it is possible for the system to bind a socket and launch the application with the socket already existing, for example to provide socket based service starting. I would like to take advantage of this functionality…
ocharles
  • 6,172
  • 2
  • 35
  • 46
6
votes
5 answers

To inetd or not to inetd... when should I use inetd for my network server program?

Can anyone give a concise set of real-world considerations that would drive the choice of whether or not to use inetd to manage a program that acts as a network server? (If inetd is used, I think it alters the requirements around networking code in…
brabster
  • 42,504
  • 27
  • 146
  • 186
5
votes
1 answer

Accessing a symlink over tftp

I am using GNU inetd and tftpd (under cygwin, but that shouldn't matter), and I need to have many symbolic links pointing to only a few different files, which should be accessible via tftp. tftp directory looks like this: lrwxrwxrwx 1 12 Jun 4…
Ulrik
  • 1,131
  • 4
  • 19
  • 37
4
votes
5 answers

Why can't gdb attach to server application summoned with inetd?

I have a server application that can be summoned for the client using inetd. However, if I try to attach to the server process that was launched with inetd, I get the following response: ptrace: Operation not permitted. gdb --annotate=3…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
3
votes
1 answer

Using STDIN/STDOUT as a socket

I'm having a client process launch a server process with xinetd. As I understand it, the server come to life being able to read from the client via its STDIN, and write to the client via its STDOUT. For various reasons (mainly having the server be…
Chap
  • 3,649
  • 2
  • 46
  • 84
2
votes
1 answer

Getting client IP from Ruby script through xinetd

How can I get the client IP Address from inside a Ruby script that is launched by xinetd through a stream socket? In PHP I would just use stream_socket_get_name(STDIN, true); Thanks in advance!
Eduardo Sampaio
  • 589
  • 6
  • 15
1
vote
1 answer

Handle SSL connections from an inetd ruby script

I'd like to run a Ruby script that handles encrypted communications from inetd. As I need the certificate information for further processing, I can't "offload" the SSL to something like stunnel. In order to do so, I'd have to somehow use STDIN and…
icanhasserver
  • 1,054
  • 10
  • 11
1
vote
3 answers

Xvnc4 started from xinetd only displays empty gray X screen

I'm attempting to setup an Ubuntu 10.10 box so that anyone can connect to port 5900 and be greeted by the gdm login manager. To do so, I added a vnc entry in /etc/services and I am starting Xvnc4 using this xinetd config file: service vnc { …
scott8035
  • 424
  • 1
  • 6
  • 15
1
vote
0 answers

Are there any known Linux inetd/"wait"-capable web servers with graceful idle shutdown?

I would like to start a web server on-demand as an inetd "tcp/wait" service which shuts itself down after a programmable period of inactivity. Many web servers already support inetd "tcp/nowait" mode, but this mode has the disadvantage that a new…
1
vote
2 answers

Method to send an encryption key over an insecure connection?

I am using Botan utility to perform encryption. When I initialize my connection to a remote machine using SSH, I am able to trade keys over the secure SSH connection. However, sometimes I use inetd to establish the connection, and in this case,…
WilliamKF
  • 41,123
  • 68
  • 193
  • 295
1
vote
1 answer

Starting a Process When a Port is Connected To

I want to create a single client that issues unicast requests for data from any of many workstations on the same LAN. The client will likely run Linux, but the workstations may run any OS. Is it possible to avoid running a daemon on each of the…
Brian
  • 1,351
  • 2
  • 15
  • 29
1
vote
1 answer

Terminating TFTPD after file transfer

I am using inetutils tftpd which is started via inetd using the following entry in inetd.conf: tftp dgram udp wait root /bin/tftpd -p -u root -s /home (ignore the use of root account and /home directory, it's just for testing…
Ulrik
  • 1,131
  • 4
  • 19
  • 37
1
vote
2 answers

How to get client IP from java server through xinetd?

I am running a small java server through xinetd superserver. I'd like to get the originating client IP but I can't because streams are between xinetd and java (stin/stdout). Does somebody know how to get the client IP, without looking to xinetd…
Antares
  • 177
  • 2
  • 12
1
vote
2 answers

Using xinetd/inetd, why should servers call fflush()?

All program on xinetd (which I've read) call fflush(). Why? For example, Inetd-Wikipedia #include #include int main(int argc, char **argv) { const char *fn = argv[1]; FILE *fp = fopen(fn, "a+"); if(fp == NULL) …
aki33524
  • 176
  • 1
  • 8
1
2 3