Re: tcpsvd vs. tcpserver
Gerrit Pape <[email protected]>
| Newsgroups | gmane.comp.misc.pape.general |
|---|---|
| Message-ID | <20040923155534.19215.qmail@9bc230d5c4d528.315fe32.mid.smarden.org> |
On Wed, Sep 22, 2004 at 06:48:57PM -0600, Vincent Danen wrote: > I'd like to mimic the tcpserver behaviour as much as possible, so I'd > perfer to use cdb files rather than directories, although it looks to > me like there isn't much difference since the directories are used to > build the cdb files (at least that's what I understand). Before I dive Yes, the constant database for ipsvd is created from an instructions directory using ipsvd-cdb(8). > With tcpserver if I use -X, it tells tcpserver to allow everything if > foo.cdb doesn't exist. Does tcpsvd (and the others) do this > automatically? Or is the default to deny? There is no -X (or similar) > switch in tcpsvd that I can see. If an ipsvd has trouble opening or reading the instructions directory or cdb, it closes/drops the connection. So if the cdb doesn't exist, the connection is denied; a feature similar to tcpserver's -X option isn't supported currently. > I would also suspect that using: > > tcpserver -c30 -HRXv -llocalhost -x /etc/tcprules.d/cvspserver.cdb 0 > cvspserver /usr/sbin/cvspserver 2>&1 > > is the same as: > > tcpsvd -c 30 -v -l localhost -x /etc/tcprules.d/cvspserver.cdb 0 > cvspserver /usr/sbin/cvspserver 2>&1 > > correct? Yes, except for the -X option, and that the cdbs are not compatible, you can't use a cdb created with tcprules with ipsvd(7), you would need to create a new one using ipsvd-cdb(8), or use the directory directly. > I suppose that using the directories would be simplest, but I'm trying > to make things as easy as possible because this is for a Linux server > distribution that I'm working on, so it needs to be fairly simple for > others to use. Using cdb files with tcpserver was simple... one config > file, one cdb. Keeps things easy. This directory scheme doesn't seem > quite as straightforward. =) ipsvd supports more instructions than tcprules, and may provide more instructions in the future. Using a directory to define the per-peer instructions is more flexible than a single config file. It also speeds up access to the instructions if no cdb is used. I think the directory scheme is straightforward if you're used to it, see ipsvd-instruct(5) for reference, and the examples[0] to get an idea. And here are some hints on how to create an instructions directory from a tcpserver rules file: http://article.gmane.org/gmane.comp.misc.pape.general/530 [0] http://smarden.org/ipsvd/examples.html#instruct HTH, Gerrit.