swat setup

James Sutherland jas88 at cam.ac.uk
Tue May 9 19:22:53 GMT 2000

On Tue, 9 May 2000, Steve Langasek wrote:
> On Wed, 10 May 2000, James Sutherland wrote:
> > On Wed, 10 May 2000, Ron Alexander wrote:
> > > What is the significance of the .400 in the following
> > > swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat
> > <service name> <socket type> <protocol> <flags> <user> <server path>
> > <args>
> > In this case: Service called "swat", running over tcp stream sockets, for
> > which the server is /usr/local/samba/bin/swat, which should be run as user
> > "root" with arguments "swat". "nowait" here is only relevant to dgram
> > sockets, not streams. The ".400" means that inetd should set a maximum
> > limit of 400 new sessions opened in a 60 second interval; the default is
> > 40.
> > > Also, what is the final token 'swat' there for. I thought it was for
> > > arguments to the server. My manual states do NOT enter the name of the
> > > server.
> > The swat man page does include this final "swat" at the end of the
> > inetd.conf entry, but doesn't explain what it's for...
> The first argument after the server path is actually used as arg #0,
> i.e., the name used when invoking the server.  This is particularly
> useful when using tcp wrappers, since tcpd uses argv[0] to find the
> server it's supposed to call on success.  For most other programs it
> doesn't matter, but it doesn't hurt and it can help, so as I rule I
> put it in there when adding entries to inetd.conf.

Of course - "args" as in literally, the contents of argv[].

Some programs depend on this to know how to function, too; bzip2 does
this, for example, IIRC. The binaries for "bzip2", "bunzip2", "bzcat" etc.
are all the same file, hardlinked, but it reads argv[0] and functions

It might be nice if this were documented in the man page, of course...


More information about the samba-technical mailing list