This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re[2]: rbldnsd


Saturday, September 18, 2004, 12:41:19 PM, Brian responded:

BB> On Sat, September 18, 2004 3:28 pm, Robert Menschel said:
>> Has anyone installed rbldnsd under Cygwin?
>>
>> ...
>> I'm hoping someone has already been
>> through this and can give me a list of things to do/check.
>>
>> If not, I'll repeat the process here, document my actions step by step,
>> and see if someone can find something wrong with what I'm doing.

BB> What was the error message/failure message/etc?  We can't help you if
BB> you don't give us any details on what happened exactly.

Actually, I was hoping someone had already gone through this, and had the
steps used, so I could follow those without causing people to struggle
with my specific symptoms.  Since that's apparently not the case, here
is my history and my symptoms:

System:
    Processor:          GenuineIntel Family 15 Model 2 2.8 GHz Stepping 9 (2 CPUs)
    Math Support:       Present
    BIOS:               A M I  - 8000313 BIOS Date: 08/13/03 17:47:19 Ver: 08.00.08 BIOS Date: 08/13/03
    Bus Type:           PCI, ISA, USB
    Ports:              1 Parallel, 2 Serial
    Memory:             1024 MB  (36% Utilized)
    Floppy Disks:       1.44 MB
    Hard Disks:         152.67 GB
    Multimedia:         Sound, CD-ROM
    Video:              800 x 600 in 64K Colors, NVIDIA GeForce4 MX 440 with AGP8X Ver. 6.14
    < Operating System >
    Windows:            5.1 (Build 2600)  (Windows XP SP2)
    Net Clients:        Microsoft Terminal Services
                        Microsoft Windows Network
                        Web Client Network
    Cygwin DLL version info:
        DLL version: 1.5.11
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 116
        Shared data: 4
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix:
        Build date: Sat Sep 4 23:17:09 EDT 2004
        Shared id: cygwin1S4

1) I downloaded rbldnsd_0.993.1.tar.gz from the website at
http://www.corpit.ru/mjt/rbldnsd.html into my $HOME/misc.installs
directory. I expanded the tarball into
$HOME/misc.installs/rbldnsd-0.993.1

2) I ran that directory's configure script, which created Makefile and
config.h

3) I used the "make" command to generate rbldnsd.exe; this generated some
warnings. If the program were running, but unable to match any DNS
requests against the zone files, I'd blame it on these warnings. I don't
think these warnings would create the problems I'm having now.
> make
 rbldnsd VERSION="0.993.1 (29 Jul 2004)"
gcc -Wall -W -O2  -c rbldnsd.c -DVERSION="\"0.993.1 (29 Jul 2004)\""
gcc -Wall -W -O2  -c rbldnsd_zones.c
rbldnsd_zones.c:194:2: warning: #warning NS record compatibility mode: remove for 1.0 final
gcc -Wall -W -O2  -c rbldnsd_packet.c
gcc -Wall -W -O2  -c rbldnsd_ip4set.c
rbldnsd_ip4set.c: In function `ds_ip4set_line':
rbldnsd_ip4set.c:117: warning: unsigned int format, long unsigned int arg (arg 3)
rbldnsd_ip4set.c: In function `ds_ip4set_dump':
rbldnsd_ip4set.c:272: warning: unsigned int format, long unsigned int arg (arg 3)
rbldnsd_ip4set.c:272: warning: unsigned int format, long unsigned int arg (arg 4)
rbldnsd_ip4set.c:272: warning: unsigned int format, long unsigned int arg (arg 5)
rbldnsd_ip4set.c:272: warning: unsigned int format, ip4addr_t arg (arg 6)
rbldnsd_ip4set.c:288: warning: unsigned int format, long unsigned int arg (arg 3)
rbldnsd_ip4set.c:288: warning: unsigned int format, long unsigned int arg (arg 4)
rbldnsd_ip4set.c:288: warning: unsigned int format, ip4addr_t arg (arg 5)
rbldnsd_ip4set.c:303: warning: unsigned int format, long unsigned int arg (arg 3)
rbldnsd_ip4set.c:303: warning: unsigned int format, ip4addr_t arg (arg 4)
rbldnsd_ip4set.c:310: warning: unsigned int format, ip4addr_t arg (arg 3)
gcc -Wall -W -O2  -c rbldnsd_ip4tset.c
rbldnsd_ip4tset.c: In function `ds_ip4tset_dump':
rbldnsd_ip4tset.c:140: warning: unsigned int format, long unsigned int arg (arg 3)
rbldnsd_ip4tset.c:140: warning: unsigned int format, long unsigned int arg (arg 4)
rbldnsd_ip4tset.c:140: warning: unsigned int format, long unsigned int arg (arg 5)
rbldnsd_ip4tset.c:140: warning: unsigned int format, ip4addr_t arg (arg 6)
gcc -Wall -W -O2  -c rbldnsd_ip4trie.c
rbldnsd_ip4trie.c: In function `ds_ip4trie_line':
rbldnsd_ip4trie.c:206: warning: unsigned int format, long unsigned int arg (arg 3)
gcc -Wall -W -O2  -c rbldnsd_dnset.c
gcc -Wall -W -O2  -c rbldnsd_generic.c
gcc -Wall -W -O2  -c rbldnsd_combined.c
gcc -Wall -W -O2  -c rbldnsd_hooks.c
gcc -Wall -W -O2  -c rbldnsd_util.c
gcc -Wall -W -O2  -c dns_ptodn.c
gcc -Wall -W -O2  -c dns_dntop.c
gcc -Wall -W -O2  -c dns_dntol.c
gcc -Wall -W -O2  -c dns_dnlen.c
gcc -Wall -W -O2  -c dns_dnlabels.c
gcc -Wall -W -O2  -c dns_dnequ.c
gcc -Wall -W -O2  -c dns_dnreverse.c
gcc -Wall -W -O2  -c dns_findname.c
awk -f dns_maketab.awk dns.h > dns_nametab.c.tmp
mv -f dns_nametab.c.tmp dns_nametab.c
gcc -Wall -W -O2  -c dns_nametab.c
gcc -Wall -W -O2  -c ip4parse.c
gcc -Wall -W -O2  -c ip4atos.c
gcc -Wall -W -O2  -c ip4mask.c
gcc -Wall -W -O2  -c mempool.c
rm -f librbldnsd.a
ar rv librbldnsd.a dns_ptodn.o dns_dntop.o dns_dntol.o dns_dnlen.o
dns_dnlabels.o dns_dnequ.o dns_dnreverse.o dns_findname.o dns_nametab.o
ip4parse.o ip4atos.o ip4mask.o mempool.o  
ar: creating librbldnsd.a
a - dns_ptodn.o
a - dns_dntop.o
a - dns_dntol.o
a - dns_dnlen.o
a - dns_dnlabels.o
a - dns_dnequ.o
a - dns_dnreverse.o
a - dns_findname.o
a - dns_nametab.o
a - ip4parse.o
a - ip4atos.o
a - ip4mask.o
a - mempool.o
ranlib librbldnsd.a
gcc -Wall -W -O2 -o rbldnsd rbldnsd.o rbldnsd_zones.o rbldnsd_packet.o
rbldnsd_ip4set.o rbldnsd_ip4tset.o rbldnsd_ip4trie.o rbldnsd_dnset.o
rbldnsd_generic.o rbldnsd_combined.o rbldnsd_hooks.o rbldnsd_util.o
librbldnsd.a  


4) I copied rbldnsd.exe to /usr/sbin with
> cp -p rbldnsd.exe /usr/sbin/
(Is there a better place to put executables like this, which are
system-oriented and not user-oriented?)

5) I then created /usr/sbin/rbldnsd.sh:
/usr/sbin/rbldnsd -u system:system -p /var/run/rbldnsd.pid -c 60m -f    \
      -r /var/rbldnsd -b 127.0.0.1/53                                   \
      ws.surbl.org:dnset:ws.surbl.org.rbldnsd                           \
      sc.surbl.org:dnset:sc.surbl.org.rbldnsd                           \
      list.dsbl.org:ip4set:list.dsbl.org.rbldns >/var/tmp/rbldnsd.log

6) I used rsync to obtain copies of the zone files, and placed them into
the /var/rbldnsd directory created for this purpose (and pointed to
through the -r parameter above):
> ls -lF /var/rbldnsd
total 9674
-rw-r--r--    1 Owner    None         7249 Sep 10 18:16 ab.surbl.org.rbldnsd
-rw-r--r--    1 Owner    None       102587 Sep 10 18:17 be.surbl.org.rbldnsd
-rw-r--r--    1 Owner    None      1508463 Sep 10 18:20 ds.surbl.org.rbldnsd
-rw-r--r--    1 Owner    None      6683200 Sep 10 18:32 multi.surbl.org.rbldnsd
-rw-r--r--    1 Owner    None       543691 Sep 10 18:33 ob.surbl.org.rbldnsd
-rw-r--r--    1 Owner    None       301046 Sep 10 18:33 pj.surbl.org.rbldnsd
-rw-r--r--    1 Owner    None        16843 Sep 10 18:33 sc.surbl.org.rbldnsd
-rw-r--r--    1 Owner    None       738323 Sep 10 18:34 ws.surbl.org.rbldnsd

7) Executing the script as above, manually, I get the error message:
rbldnsd: unable to setuid(18:18): Permission denied
where /etc/passwd shows user SYSTEM as user 18, and /etc/group shows
SYSTEM as group 18. That surprises me, since as the one and only user on
this system, I have root privileges, and I would have through the setuid
would have worked.

8) If I remove the -u system:system parameter, I get
rbldnsd: unable to stat file `ws.surbl.org.rbldnsd': No such file or directory
rbldnsd: unable to stat file `sc.surbl.org.rbldnsd': No such file or directory
rbldnsd: unable to stat file `list.dsbl.org.rbldns': No such file or directory
rbldnsd: zone ws.surbl.org: zone will not be serviced
rbldnsd: zone sc.surbl.org: zone will not be serviced
rbldnsd: zone list.dsbl.org: zone will not be serviced
rbldnsd: zone loading errors, aborting

Note that the /var/rbldnsd directory has these permissions:
drwxr-xr-x+   2 Owner    None            0 Sep 11 22:57 /var/rbldnsd/

Interestingly, the /var/tmp/rbldnsd.log shows:
> cat /var/tmp/rbldnsd.log
rbldnsd: listening on 127.0.0.1/53
rbldnsd: zones reloaded, time 0.3e/0.0u sec, mem arena=56 free=2 mmap=0 Kb

When I do a "ps -ef" on the system, there is no rbldnsd process:
> ps -ef | sort
     UID     PID    PPID TTY     STIME COMMAND
   Owner    4220       1 con  12:33:42 /usr/bin/bash
   Owner    4316    5672 con  14:04:47 /usr/bin/bash
   Owner    4468    4316 con  15:52:09 /usr/bin/perl
   Owner    5344    4220 con  16:25:03 /usr/bin/ps
   Owner    5672       1 con  11:38:30 /usr/bin/bash
   Owner    5976    4220 con  16:25:03 /usr/bin/bash
  SYSTEM    1736       1   ?  08:24:50 /usr/bin/cygrunsrv
  SYSTEM    1792    1736   ?  08:24:50 /usr/sbin/cron
  SYSTEM    1840       1   ?  08:24:51 /usr/bin/cygrunsrv
  SYSTEM    1876    1840 con  08:24:51 /sbin/init

And that's as far as I've gotten.

I suspect my problem is with setup under Cygwin, which is why I came here
first, rather than to the rbldnsd support list; I'll go there next if
nobody here can help me figure this out.

Thanks again for any guidance.

Bob Menschel




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]