l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 2: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2002 Jul 09 11:47

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] running service as a different user
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] running service as a different user



On Tue, Jul 09, 2002 at 10:46:25AM -0700, Jan Wynholds wrote:
> Can't you use xinetd?  I think it might be what you're looking for.

Jan,

  That is a good concept (using inetd to start services) but I
don't think it will work in this case, for this type of server.

  I don't know if this post contains enough detail, but I'm in a hurry.


A server process has to be written to handle that.  There are
generally two types of server processes:
- ones that stay running all the time and are started at bootup.
  typically they maintain state from session to session, are designed to
  handle multiple connections at the same time, and bind their own ports.
- ones that only handle one request at a time and are started by inetd
  when a connection attempt comes in and exit after the request is 
  complete, these use stdin/stdout.

  Since there are some steps required to bind a socket for incoming
connections if you are running stand alone and you just use stdin/stdout
if you are started from inetd, the server process has to be coded
to pick an operating mode (maybe based on command line options).

  Some daemons are built to operate in both modes (can be run from inetd
or from init scripts)... sshd is an example.  Some operate in only inetd
mode (like telnetd), and some only operate in stand alone (jabberd
appears to be one of these).

  Anyway if I understand the purpose of jabberd it doesn't make sense
to operate from inetd.  It is a text message passing daemon for people,
so in order to be useful you need multiple clients connected to it to
be able to pass text messages between them.
  If the process is started by inetd, you would get one server process
per client connection, and while you might have 50 people connected
they each would have no one else to talk to.

    TTFN,
      Mike
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.